changeset 0:5339bac740c7 branch_net

=branch_net zweiter versuch
author wuha
date Wed, 17 Sep 2008 11:01:52 +0000
parents
children 5a125ff6877f
files items.xml monsters.xml src/core/Makefile src/core/Makefile.objs src/core/action.cpp src/core/action.h src/core/archer.cpp src/core/archer.h src/core/charconv.h src/core/clientnetwork.cpp src/core/clientnetwork.h src/core/command.h src/core/constants.h src/core/creature.cpp src/core/creature.h src/core/creaturestruct.h src/core/damage.cpp src/core/damage.h src/core/debug.cpp src/core/debug.h src/core/dmgprojectile.cpp src/core/dmgprojectile.h src/core/document.cpp src/core/document.h src/core/dropitem.cpp src/core/dropitem.h src/core/dropslot.h src/core/fixedobject.cpp src/core/fixedobject.h src/core/gettext.h src/core/goblin.cpp src/core/goblin.h src/core/gridunit.cpp src/core/gridunit.h src/core/item.cpp src/core/item.h src/core/itemfactory.cpp src/core/itemfactory.h src/core/itemlist.cpp src/core/itemlist.h src/core/itemloader.cpp src/core/itemloader.h src/core/mage.cpp src/core/mage.h src/core/main.cpp src/core/main_test.cpp src/core/mapcreator.cpp src/core/mapgenerator.cpp src/core/mapgenerator.h src/core/matrix2d.h src/core/monster.cpp src/core/monster.h src/core/monsterbase.h src/core/network.cpp src/core/network.h src/core/networkstruct.cpp src/core/networkstruct.h src/core/objectfactory.cpp src/core/objectfactory.h src/core/objectloader.cpp src/core/objectloader.h src/core/party.cpp src/core/party.h src/core/pathfind.cpp src/core/pathfind.h src/core/player.cpp src/core/player.h src/core/priest.cpp src/core/priest.h src/core/projectile.cpp src/core/projectile.h src/core/random.cpp src/core/random.h src/core/region.cpp src/core/region.h src/core/server.cpp src/core/server.h src/core/serveraction.h src/core/serveritem.cpp src/core/serveritem.h src/core/servernetwork.cpp src/core/servernetwork.h src/core/serverwobject.cpp src/core/serverwobject.h src/core/spawnpoint.cpp src/core/spawnpoint.h src/core/tiles.h src/core/timer.h src/core/trade.cpp src/core/trade.h src/core/trader.cpp src/core/trader.h src/core/warrior.cpp src/core/warrior.h src/core/world.cpp src/core/world.h src/core/worldobject.cpp src/core/worldobject.h src/gl_gui/Makefile src/gl_gui/Makefile.objs src/gl_gui/config src/gl_gui/main.cpp src/gl_gui/window_main_gl.cpp src/gl_gui/window_main_gl.h src/gui/Makefile src/gui/Makefile.objs src/gui/client.cpp src/gui/client.h src/gui/clientmplayer.cpp src/gui/clientmplayer.h src/gui/clientwobject.cpp src/gui/clientwobject.h src/gui/main_gui.cpp src/gui/mainwindow.cpp src/gui/mainwindow.h src/gui/numberedwindow.cpp src/gui/numberedwindow.h src/gui/scene.cpp src/gui/scene.h src/tinyxml/docs/annotated.html src/tinyxml/docs/classTiXmlAttribute-members.html src/tinyxml/docs/classTiXmlAttribute.html src/tinyxml/docs/classTiXmlAttribute.png src/tinyxml/docs/classTiXmlBase-members.html src/tinyxml/docs/classTiXmlBase.html src/tinyxml/docs/classTiXmlBase.png src/tinyxml/docs/classTiXmlComment-members.html src/tinyxml/docs/classTiXmlComment.html src/tinyxml/docs/classTiXmlComment.png src/tinyxml/docs/classTiXmlDeclaration-members.html src/tinyxml/docs/classTiXmlDeclaration.html src/tinyxml/docs/classTiXmlDeclaration.png src/tinyxml/docs/classTiXmlDocument-members.html src/tinyxml/docs/classTiXmlDocument.html src/tinyxml/docs/classTiXmlDocument.png src/tinyxml/docs/classTiXmlElement-members.html src/tinyxml/docs/classTiXmlElement.html src/tinyxml/docs/classTiXmlElement.png src/tinyxml/docs/classTiXmlHandle-members.html src/tinyxml/docs/classTiXmlHandle.html src/tinyxml/docs/classTiXmlNode-members.html src/tinyxml/docs/classTiXmlNode.html src/tinyxml/docs/classTiXmlNode.png src/tinyxml/docs/classTiXmlPrinter-members.html src/tinyxml/docs/classTiXmlPrinter.html src/tinyxml/docs/classTiXmlPrinter.png src/tinyxml/docs/classTiXmlText-members.html src/tinyxml/docs/classTiXmlText.html src/tinyxml/docs/classTiXmlText.png src/tinyxml/docs/classTiXmlUnknown-members.html src/tinyxml/docs/classTiXmlUnknown.html src/tinyxml/docs/classTiXmlUnknown.png src/tinyxml/docs/classTiXmlVisitor-members.html src/tinyxml/docs/classTiXmlVisitor.html src/tinyxml/docs/classTiXmlVisitor.png src/tinyxml/docs/deprecated.html src/tinyxml/docs/doxygen.css src/tinyxml/docs/doxygen.png src/tinyxml/docs/files.html src/tinyxml/docs/functions.html src/tinyxml/docs/functions_enum.html src/tinyxml/docs/functions_func.html src/tinyxml/docs/functions_rela.html src/tinyxml/docs/functions_vars.html src/tinyxml/docs/hierarchy.html src/tinyxml/docs/index.html src/tinyxml/docs/pages.html src/tinyxml/docs/tab_b.gif src/tinyxml/docs/tab_l.gif src/tinyxml/docs/tab_r.gif src/tinyxml/docs/tabs.css src/tinyxml/docs/tinystr_8h-source.html src/tinyxml/docs/tinyxml_8h-source.html src/tinyxml/docs/tutorial0.html src/tinyxml/tinystr.cpp src/tinyxml/tinystr.h src/tinyxml/tinyxml.cpp src/tinyxml/tinyxml.h src/tinyxml/tinyxmlerror.cpp src/tinyxml/tinyxmlparser.cpp translation/de/LC_MESSAGES/sumwars.mo translation/de/LC_MESSAGES/sumwars.po translation/en/LC_MESSAGES/sumwars.mo translation/en/LC_MESSAGES/sumwars.po translation/generate_mo.sh translation/sumwars.pot
diffstat 186 files changed, 55069 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/items.xml	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,63 @@
+<?xml version="1.0" ?>
+
+<!-- Bei Gegenstaenden, die keine Waffen sind kann "WeaponAttribute" weggelassen werden. -->
+
+<!-- general
+<Item type="weapon" subtype="short_sw" size="medium">
+	<Mesh file="sword.mesh" />
+	<Attribute
+		level_requirement="char"
+		character_requirement="char"
+		price="int"
+		min_enchant="30"
+		max_enchant="120"
+	/>
+	<UseupEffect />
+	<EquipEffect />
+	<WeaponAttribute
+		damage_min_physical="5"
+		damage_max_physical="10"
+		damage_min_air="0"
+		damage_max_air="0"
+		damage_min_ice="0"
+		damage_max_ice="0"
+		damage_min_fire="0"
+		damage_max_fire="0"
+		damage_attack="20"
+		damage_power="30"
+		attack_range="1.0"
+		two_handed="no"
+		dattack_speed="500"
+	/>
+	<DropChance
+		level="int"
+		probability="float"
+	/>
+</Item>
+-->
+
+
+<!-- Short Sword -->
+<Item type="weapon" subtype="short_sw" size="medium">
+	<Mesh file="sword.mesh" />
+	<Attribute
+		price="150"
+		min_enchant="30"
+		max_enchant="120"
+	/>
+	<EquipEffect />
+	<WeaponAttribute
+		damage_min_physical="5"
+		damage_max_physical="10"
+		damage_attack="20"
+		damage_power="30"
+		attack_range="1.0"
+		two_handed="no"
+		dattack_speed="500"
+	/>
+	<DropChance
+		level="0"
+		probability="1.0"
+	/>
+</Item>
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/monsters.xml	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,49 @@
+<?xml version="1.0" ?>
+
+
+<!-- Goblin -->
+<!-- 3871 = 0xf1f -->
+<Monster type="MONSTER" subtype="GOBLIN" fraction="MONSTER" category="GOBLIN">
+	<Dropslots p0="0.1" p1="0.2" p2="0.2" p3="0.2" />
+	<Dropslot0 min_level="0" max_level="20" magic_prob="0.3" magic_power="500" />
+	<Dropslot1 min_level="0" max_level="10" magic_prob="0.3" magic_power="1000" />
+	
+	<BasicAttributes
+		max_experience="100000"
+		level="1"
+		max_health="15"
+		armor="10"
+		block="0"
+		attack="10"
+		strength="15"
+		dexterity="10"
+		magic_power="5"
+		willpower="10"
+		resistances_physical="0"
+		resistances_air="0"
+		resistances_ice="0"
+		resistances_fire="0"
+		resistances_cap_physical="50"
+		resistances_cap_air="50"
+		resistances_cap_ice="50"
+		resistances_cap_fire="50"
+		walk_speed="2000"
+		attack_speed="1500"
+		step_length="0.5"
+		abilities0="3871"
+		abilities1="0"
+		abilities2="0"
+		abilities3="0"
+		abilities4="0"
+		abilities5="0"
+		attack_range="1"
+		special_flags="0"
+		immunity="0"
+	/>
+	
+	<Geometry radius="0.5" />
+	
+	<AI ai_sight_range="8" />
+</Monster>
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/Makefile	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,52 @@
+# Debug level in build time
+# 	-1	deactivate all log messages
+# 	0	allow only error messages
+# 	1	allow also warnings
+# 	2	allow info messages
+# 	3	allow debug messages
+DEBUG_LEVEL = 5 
+
+# executable file for project
+START    = server_app
+RUN      = ./$(START)
+
+
+LIBS = RakNet OIS
+LDFLAGS = $(shell pkg-config --libs $(LIBS))
+LOADLIBES =
+LDLIBS = $(LDFLAGS) -lm -lrt
+CFLAGS = -g
+CXXFLAGS = $(shell pkg-config --cflags $(LIBS)) $(CFLAGS)
+OBJS = $(shell cat ./Makefile.objs )
+DIRS = $(shell find . -mindepth 1 -maxdepth 1 -type d -not -iname .svn )
+
+CXXFLAGS += -DDEBUG_LEVEL=$(DEBUG_LEVEL)
+
+build: compile $(RUN)
+
+
+compile: $(OBJS)
+	@for dir in $(DIRS) ; do \
+		cd $$dir ; \
+		$(MAKE) $(TARGET) ; \
+		cd .. ; \
+	done
+	
+link: compile
+	$(CXX) $(CXXFLAGS) -o $(RUN) $(OBJS) $(LDLIBS)
+
+$(RUN): link
+
+
+run: $(RUN)
+	  $(RUN) $(HOST) $(PROTOCOL)
+
+
+%.o : %.c
+	$(CC) $(CFLAGS) -o $@ -c $<
+
+%.o : %.cpp
+	$(CXX) $(CXXFLAGS) -o $@ -c $<
+
+clean :	
+	rm -f $(OBJS) $(RUN)
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/Makefile.objs	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,42 @@
+trade.o
+world.o
+main.o
+objectfactory.o
+objectloader.o
+itemlist.o
+gridunit.o
+servernetwork.o
+action.o
+worldobject.o
+networkstruct.o
+projectile.o
+party.o
+debug.o
+item.o
+dropitem.o
+dmgprojectile.o
+creature.o
+pathfind.o
+fixedobject.o
+serverwobject.o
+player.o
+warrior.o
+monster.o
+mage.o
+archer.o
+priest.o
+itemfactory.o
+itemloader.o
+serveritem.o
+damage.o
+random.o
+region.o
+server.o
+spawnpoint.o
+document.o
+network.o
+
+../tinyxml/tinyxml.o
+../tinyxml/tinyxmlparser.o
+../tinyxml/tinyxmlerror.o
+../tinyxml/tinystr.o
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/action.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,1707 @@
+#include "action.h"
+
+Action::ActionInfo Action::m_base_info[192];
+
+std::map<std::string, Action::ActionType> Action::m_enum_string_to_type;
+
+void Action::init()
+{
+	DEBUG5("initialising actions");
+	Action::ActionInfo* a;
+
+
+	a = &(Action::m_base_info[Action::NOACTION]);
+	a->m_timer_nr=0;
+	a->m_standard_time=2000;
+	a->m_timer=0;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=-1;
+	a->m_distance = SELF;
+	a->m_flags =0;
+	a->m_name = "keine Aktion";
+	a->m_req_level = 0;
+	a->m_req_ability[0]= Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_noaction";
+	a->m_enum_name = "noaction";
+	a->m_animation[NO_WEAPON].push_back("idle");
+	a->m_animation[ONE_HANDED].push_back("attack");
+	a->m_animation[TWO_HANDED].push_back("idle");
+
+	a = &(Action::m_base_info[Action::WALK]);
+	a->m_timer_nr=0;
+	a->m_standard_time=0;
+	a->m_timer=0;
+	a->m_base_action = Action::WALK;
+	a->m_critical_perc=-1;
+	a->m_distance = MELEE;
+	a->m_flags =0;
+	a->m_name = "Laufen";
+	a->m_req_level = 0;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_walk";
+	a->m_enum_name = "walk";
+	a->m_animation[NO_WEAPON].push_back("walkOneHand");
+	a->m_animation[ONE_HANDED].push_back("walkOneHand");
+	a->m_animation[TWO_HANDED].push_back("walkOneHand");
+
+	a = &(Action::m_base_info[Action::TAKE_ITEM]);
+	a->m_timer_nr=0;
+	a->m_standard_time=50;
+	a->m_timer=0;
+	a->m_base_action = Action::WALK;
+	a->m_critical_perc=0.7;
+	a->m_distance = MELEE;
+	a->m_flags =0;
+	a->m_name = "Item aufheben";
+	a->m_req_level = 0;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_take_item";
+	a->m_enum_name = "take_item";
+
+	a = &(Action::m_base_info[Action::ATTACK]);
+	a->m_timer_nr=0;
+	a->m_standard_time=1;
+	a->m_timer=0;
+	a->m_base_action = Action::ATTACK;
+	a->m_critical_perc=0.66;
+	a->m_distance = MELEE;
+	a->m_flags =0;
+	a->m_name = "Angriff";
+	a->m_req_level = 0;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_attack";
+	a->m_enum_name = "attack";
+	a->m_animation[ONE_HANDED].push_back("attack");
+	a->m_animation[TWO_HANDED].push_back("attackTwoHands");
+
+	a = &(Action::m_base_info[Action::RANGE_ATTACK]);
+	a->m_timer_nr=0;
+	a->m_standard_time=1;
+	a->m_timer=0;
+	a->m_base_action = Action::RANGE_ATTACK;
+	a->m_critical_perc=0.66;
+	a->m_distance = RANGED;
+	a->m_flags =0;
+	a->m_name = "Distanz Angriff";
+	a->m_req_level = 0;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_range_attack";
+	a->m_enum_name = "range_attack";
+
+	a = &(Action::m_base_info[Action::MAGIC_ATTACK]);
+	a->m_timer_nr=0;
+	a->m_standard_time=1;
+	a->m_timer=0;
+	a->m_base_action = Action::MAGIC_ATTACK;
+	a->m_critical_perc=0.5;
+	a->m_distance = RANGED;
+	a->m_flags =0;
+	a->m_name = "Magischer Angriff";
+	a->m_req_level = 0;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_magic_attack";
+	a->m_enum_name = "magic_attack";
+
+	a = &(Action::m_base_info[Action::HOLY_ATTACK]);
+	a->m_timer_nr=0;
+	a->m_standard_time=1;
+	a->m_timer=0;
+	a->m_base_action = Action::HOLY_ATTACK;
+	a->m_critical_perc=0.66;
+	a->m_distance = MELEE;
+	a->m_flags =0;
+	a->m_name = "Heiliger Angriff";
+	a->m_req_level = 0;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_holy_attack";
+	a->m_enum_name = "holy_attack";
+
+
+	// Faehigkeiten des Kriegers
+	a = &(Action::m_base_info[Action::BASH]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1;
+	a->m_timer=2000;
+	a->m_base_action = Action::ATTACK;
+	a->m_critical_perc=0.66;
+	a->m_distance = MELEE;
+	a->m_flags =0;
+	a->m_name = "Harter Schlag";
+	a->m_req_level = 1;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_bash";
+	a->m_enum_name = "bash";
+
+	a = &(Action::m_base_info[Action::HAMMER_BASH]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1;
+	a->m_timer=2000;
+	a->m_base_action = Action::ATTACK;
+	a->m_critical_perc=0.66;
+	a->m_distance = MELEE;
+	a->m_flags =0;
+	a->m_name = "Hammerschlag";
+	a->m_req_level = 20;
+	a->m_req_ability[0] = Action::AROUND_BLOW;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_hammer_bash";
+	a->m_enum_name = "hammer_bash";
+
+	a = &(Action::m_base_info[Action::AROUND_BLOW]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1;
+	a->m_timer=3000;
+	a->m_base_action = Action::ATTACK;
+	a->m_critical_perc=0.8;
+	a->m_distance = MELEE;
+	a->m_flags =0;
+	a->m_name = "Rundumschlag";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::BASH;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_around_blow";
+	a->m_enum_name = "around_blow";
+
+	a = &(Action::m_base_info[Action::WHIRL_BLOW]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1.5;
+	a->m_timer=3000;
+	a->m_base_action = Action::ATTACK;
+	a->m_critical_perc=0.8;
+	a->m_distance = MELEE;
+	a->m_flags =0;
+	a->m_name = "Wirbelschlag";
+	a->m_req_level = 40;
+	a->m_req_ability[0] = Action::AROUND_BLOW;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_whirl_blow";
+	a->m_enum_name = "whirl_blow";
+
+	a = &(Action::m_base_info[Action::SMASH]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1;
+	a->m_timer=3000;
+	a->m_base_action = Action::ATTACK;
+	a->m_critical_perc=0.8;
+	a->m_distance = MELEE;
+	a->m_flags =0;
+	a->m_name = "Schmetterschlag";
+	a->m_req_level = 40;
+	a->m_req_ability[0] = Action::HAMMER_BASH;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_smash";
+	a->m_enum_name = "smash";
+
+	a = &(Action::m_base_info[Action::HATE_MAGE]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1;
+	a->m_timer=4000;
+	a->m_base_action = Action::ATTACK;
+	a->m_critical_perc=0.8;
+	a->m_distance = MELEE;
+	a->m_flags =0;
+	a->m_name = "Magierhass";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::BASH;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_hate_mage";
+	a->m_enum_name = "hate_mage";
+
+
+	a = &(Action::m_base_info[Action::CHARGE]);
+	a->m_timer_nr=1;
+	a->m_standard_time=0.5;
+	a->m_timer=6000;
+	a->m_base_action = Action::ATTACK;
+	a->m_critical_perc=0.66;
+	a->m_distance = MELEE;
+	a->m_flags =0;
+	a->m_name = "Sturmangriff";
+	a->m_req_level = 20;
+	a->m_req_ability[0] = Action::BASH;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_charge";
+	a->m_enum_name = "charge";
+
+	a = &(Action::m_base_info[Action::STORM_CHARGE]);
+	a->m_timer_nr=1;
+	a->m_standard_time=0.5;
+	a->m_timer=6000;
+	a->m_base_action = Action::ATTACK;
+	a->m_critical_perc=0.66;
+	a->m_distance = MELEE;
+	a->m_flags =0;
+	a->m_name = "Sturmsense";
+	a->m_req_level = 60;
+	a->m_req_ability[0] = Action::CHARGE;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_storm_charge";
+	a->m_enum_name = "storm_charge";
+
+	a = &(Action::m_base_info[Action::DECOY]);
+	a->m_timer_nr=2;
+	a->m_standard_time=501;
+	a->m_timer=150000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.8;
+	a->m_distance = SELF;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Koeder";
+	a->m_req_level = 1;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_decoy";
+	a->m_enum_name = "decoy";
+
+	a = &(Action::m_base_info[Action::SCARE]);
+	a->m_timer_nr=2;
+	a->m_standard_time=501;
+	a->m_timer=150000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.8;
+	a->m_distance = SELF;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Herausforderung";
+	a->m_req_level = 20;
+	a->m_req_ability[0] = Action::DECOY;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_scare";
+	a->m_enum_name = "scare";
+
+	a = &(Action::m_base_info[Action::FIRESWORD]);
+	a->m_timer_nr=2;
+	a->m_standard_time=501;
+	a->m_timer=240000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.8;
+	a->m_distance = SELF;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Feuer und Schwert";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_firesword";
+	a->m_enum_name = "firesword";
+
+	a = &(Action::m_base_info[Action::FLAMESWORD]);
+	a->m_timer_nr=2;
+	a->m_standard_time=501;
+	a->m_timer=240000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.8;
+	a->m_distance = SELF;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Flammenpakt";
+	a->m_req_level = 40;
+	a->m_req_ability[0] = Action::FLAMEARMOR;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_flamesword";
+	a->m_enum_name = "flamesword";
+
+	a = &(Action::m_base_info[Action::FLAMEARMOR]);
+	a->m_timer_nr=2;
+	a->m_standard_time=501;
+	a->m_timer=300000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.8;
+	a->m_distance = SELF;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Flammenruestung";
+	a->m_req_level = 20;
+	a->m_req_ability[0] = Action::FIRESWORD;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_flamearmor";
+	a->m_enum_name = "flamearmor";
+
+	a = &(Action::m_base_info[Action::BERSERK]);
+	a->m_timer_nr=2;
+	a->m_standard_time=501;
+	a->m_timer=200000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.8;
+	a->m_distance = SELF;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Kampfschrei";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::DECOY;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_berserk";
+	a->m_enum_name = "berserk";
+
+	a = &(Action::m_base_info[Action::WARCRY]);
+	a->m_timer_nr=2;
+	a->m_standard_time=501;
+	a->m_timer=200000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.8;
+	a->m_distance = SELF;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Kriegsschrei";
+	a->m_req_level = 60;
+	a->m_req_ability[0] = Action::BERSERK;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_warcry";
+	a->m_enum_name = "warcry";
+
+	a = &(Action::m_base_info[Action::REGENERATE]);
+	a->m_timer_nr=2;
+	a->m_standard_time=1001;
+	a->m_timer=200000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.8;
+	a->m_distance = SELF;
+	a->m_flags =0;
+	a->m_name = "Regeneration";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_regenerate";
+	a->m_enum_name = "regenerate";
+
+	a = &(Action::m_base_info[Action::ANGER]);
+	a->m_timer_nr=2;
+	a->m_standard_time=501;
+	a->m_timer=300000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.8;
+	a->m_distance = SELF;
+	a->m_flags =0;
+	a->m_name = "Barbarische Wut";
+	a->m_req_level = 20;
+	a->m_req_ability[0] = Action::REGENERATE;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_anger";
+	a->m_enum_name = "anger";
+
+	a = &(Action::m_base_info[Action::FURY]);
+	a->m_timer_nr=2;
+	a->m_standard_time=500;
+	a->m_timer=200000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.8;
+	a->m_distance = SELF;
+	a->m_flags =0;
+	a->m_name = "Barbarische Kraft";
+	a->m_req_level = 40;
+	a->m_req_ability[0] = Action::ANGER;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_fury";
+	a->m_enum_name = "fury";
+
+	a = &(Action::m_base_info[Action::STEADFAST]);
+	a->m_timer_nr=0;
+	a->m_standard_time=0;
+	a->m_timer=0;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.0;
+	a->m_distance = PASSIVE;
+	a->m_flags =0;
+	a->m_name = "Turm in der Schlacht";
+	a->m_req_level = 1;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_steadfast";
+	a->m_enum_name = "steadfast";
+
+	a = &(Action::m_base_info[Action::BLOCK]);
+	a->m_timer_nr=0;
+	a->m_standard_time=0;
+	a->m_timer=0;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.0;
+	a->m_distance = PASSIVE;
+	a->m_flags =0;
+	a->m_name = "Blocken";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::STEADFAST;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_block";
+	a->m_enum_name = "block";
+
+	a = &(Action::m_base_info[Action::WEAPONMASTER]);
+	a->m_timer_nr=0;
+	a->m_standard_time=0;
+	a->m_timer=0;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.0;
+	a->m_distance = PASSIVE;
+	a->m_flags =0;
+	a->m_name = "Waffenmeister";
+	a->m_req_level = 20;
+	a->m_req_ability[0] = Action::BLOCK;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_weaponmaster";
+	a->m_enum_name = "weaponmaster";
+
+	a = &(Action::m_base_info[Action::MONSTER_HUNTER]);
+	a->m_timer_nr=0;
+	a->m_standard_time=0;
+	a->m_timer=0;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.0;
+	a->m_distance = PASSIVE;
+	a->m_flags =0;
+	a->m_name = "Monsterjaeger";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::STEADFAST;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_monster_hunter";
+	a->m_enum_name = "monster_hunter";
+
+	a = &(Action::m_base_info[Action::MONSTER_SLAYER]);
+	a->m_timer_nr=0;
+	a->m_standard_time=0;
+	a->m_timer=0;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.0;
+	a->m_distance = PASSIVE;
+	a->m_flags =0;
+	a->m_name = "Monsterschlaechter";
+	a->m_req_level = 40;
+	a->m_req_ability[0] = Action::MONSTER_HUNTER;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_monster_slayer";
+	a->m_enum_name = "monster_slayer";
+
+	a = &(Action::m_base_info[Action::ENDURANCE]);
+	a->m_timer_nr=0;
+	a->m_standard_time=0;
+	a->m_timer=0;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.0;
+	a->m_distance = PASSIVE;
+	a->m_flags =0;
+	a->m_name = "Ausdauer";
+	a->m_req_level = 60;
+	a->m_req_ability[0] = Action::MONSTER_SLAYER;
+	a->m_req_ability[1] = Action::WEAPONMASTER;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_endurance";
+	a->m_enum_name = "endurance";
+
+
+	// Faehigkeiten des Magiers
+	a = &(Action::m_base_info[Action::FIRE_BOLT]);
+	a->m_timer_nr=1;
+	a->m_standard_time=701;
+	a->m_timer=4000;
+	a->m_base_action = Action::MAGIC_ATTACK;
+	a->m_critical_perc=0.8;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Feuerblitz";
+	a->m_req_level = 1;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_fire_bolt";
+	a->m_enum_name = "fire_bolt";
+
+	a = &(Action::m_base_info[Action::FIRE_STRIKE]);
+	a->m_timer_nr=1;
+	a->m_standard_time=701;
+	a->m_timer=4000;
+	a->m_base_action = Action::MAGIC_ATTACK;
+	a->m_critical_perc=0.8;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Feuerschlag";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::FIRE_BOLT;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_fire_strike";
+	a->m_enum_name = "fire_strike";
+
+	a = &(Action::m_base_info[Action::FIRE_WAVE]);
+	a->m_timer_nr=2;
+	a->m_standard_time=1301;
+	a->m_timer=15000;
+	a->m_base_action = Action::MAGIC_ATTACK;
+	a->m_critical_perc=0.8;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Feuerwelle";
+	a->m_req_level = 20;
+	a->m_req_ability[0] = Action::FIRE_BALL;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_fire_wave";
+	a->m_enum_name = "fire_wave";
+
+	a = &(Action::m_base_info[Action::FIRE_STORM]);
+	a->m_timer_nr=2;
+	a->m_standard_time=1301;
+	a->m_timer=15000;
+	a->m_base_action = Action::MAGIC_ATTACK;
+	a->m_critical_perc=0.8;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Feuersturm";
+	a->m_req_level = 60;
+	a->m_req_ability[0] = Action::FIRE_WAVE;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_fire_storm";
+	a->m_enum_name = "fire_storm";
+
+	a = &(Action::m_base_info[Action::FIRE_BALL]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1001;
+	a->m_timer=6000;
+	a->m_base_action = Action::MAGIC_ATTACK;
+	a->m_critical_perc=0.8;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Feuerball";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::FIRE_BOLT;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_fire_ball";
+	a->m_enum_name = "fire_ball";
+
+	a = &(Action::m_base_info[Action::INFERNO_BALL]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1001;
+	a->m_timer=6000;
+	a->m_base_action = Action::MAGIC_ATTACK;
+	a->m_critical_perc=0.8;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Infernoball";
+	a->m_req_level = 40;
+	a->m_req_ability[0] = Action::FIRE_BALL;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_inferno_ball";
+	a->m_enum_name = "inferno_ball";
+
+	a = &(Action::m_base_info[Action::FIRE_WALL]);
+	a->m_timer_nr=2;
+	a->m_standard_time=1001;
+	a->m_timer=12000;
+	a->m_base_action = Action::MAGIC_ATTACK;
+	a->m_critical_perc=0.8;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Feuersaeule";
+	a->m_req_level = 40;
+	a->m_req_ability[0] = Action::FIRE_STRIKE;
+	a->m_req_ability[1] = Action::FIRE_BALL;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_fire_wall";
+	a->m_enum_name = "fire_wall";
+
+	a = &(Action::m_base_info[Action::INFLAME]);
+	a->m_timer_nr=0;
+	a->m_standard_time=0;
+	a->m_timer=0;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.0;
+	a->m_distance = PASSIVE;
+	a->m_flags =0;
+	a->m_name = "Entzuenden";
+	a->m_req_level = 20;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_inflame";
+	a->m_enum_name = "inflame";
+
+	a = &(Action::m_base_info[Action::ICE_BOLT]);
+	a->m_timer_nr=1;
+	a->m_standard_time=701;
+	a->m_timer=4000;
+	a->m_base_action = Action::MAGIC_ATTACK;
+	a->m_critical_perc=0.8;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Eiszapfen";
+	a->m_req_level = 1;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_ice_bolt";
+	a->m_enum_name = "ice_bolt";
+
+	a = &(Action::m_base_info[Action::ICE_SPIKE]);
+	a->m_timer_nr=1;
+	a->m_standard_time=701;
+	a->m_timer=4000;
+	a->m_base_action = Action::MAGIC_ATTACK;
+	a->m_critical_perc=0.8;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Eisspeer";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::ICE_BOLT;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_ice_spike";
+	a->m_enum_name = "ice_spike";
+
+	a = &(Action::m_base_info[Action::SNOW_STORM]);
+	a->m_timer_nr=2;
+	a->m_standard_time=1401;
+	a->m_timer=14000;
+	a->m_base_action = Action::MAGIC_ATTACK;
+	a->m_critical_perc=0.8;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Schneesturm";
+	a->m_req_level = 40;
+	a->m_req_ability[0] = Action::FREEZE;
+	a->m_req_ability[1] = Action::ICE_RING;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_snow_storm";
+	a->m_enum_name = "snow_storm";
+
+	a = &(Action::m_base_info[Action::BLIZZARD]);
+	a->m_timer_nr=2;
+	a->m_standard_time=1401;
+	a->m_timer=14000;
+	a->m_base_action = Action::MAGIC_ATTACK;
+	a->m_critical_perc=0.8;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Blizzard";
+	a->m_req_level = 60;
+	a->m_req_ability[0] = Action::FROST_RING;
+	a->m_req_ability[1] = Action::SNOW_STORM;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_blizzard";
+	a->m_enum_name = "blizzard";
+
+	a = &(Action::m_base_info[Action::ICE_RING]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1001;
+	a->m_timer=7000;
+	a->m_base_action = Action::MAGIC_ATTACK;
+	a->m_critical_perc=0.8;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Eisring";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::ICE_BOLT;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_ice_ring";
+	a->m_enum_name = "ice_ring";
+
+	a = &(Action::m_base_info[Action::FROST_RING]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1001;
+	a->m_timer=7000;
+	a->m_base_action = Action::MAGIC_ATTACK;
+	a->m_critical_perc=0.8;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Frostring";
+	a->m_req_level = 40;
+	a->m_req_ability[0] = Action::ICE_RING;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_frost_ring";
+	a->m_enum_name = "frost_ring";
+
+	a = &(Action::m_base_info[Action::FREEZE]);
+	a->m_timer_nr=2;
+	a->m_standard_time=1001;
+	a->m_timer=11000;
+	a->m_base_action = Action::MAGIC_ATTACK;
+	a->m_critical_perc=0.8;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Einfrieren";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::ICE_BOLT;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_freeze";
+	a->m_enum_name = "freeze";
+
+	a = &(Action::m_base_info[Action::CHILL]);
+	a->m_timer_nr=0;
+	a->m_standard_time=0;
+	a->m_timer=0;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.0;
+	a->m_distance = PASSIVE;
+	a->m_flags =0;
+	a->m_name = "Klirrende Kaelte";
+	a->m_req_level = 20;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_chill";
+	a->m_enum_name = "chill";
+
+	a = &(Action::m_base_info[Action::LIGHTNING]);
+	a->m_timer_nr=1;
+	a->m_standard_time=501;
+	a->m_timer=4000;
+	a->m_base_action = Action::MAGIC_ATTACK;
+	a->m_critical_perc=0.8;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Blitz";
+	a->m_req_level = 1;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_lightning";
+	a->m_enum_name = "lightning";
+
+	a = &(Action::m_base_info[Action::LIGHTNING_STRIKE]);
+	a->m_timer_nr=1;
+	a->m_standard_time=501;
+	a->m_timer=4000;
+	a->m_base_action = Action::MAGIC_ATTACK;
+	a->m_critical_perc=0.8;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Blitzschlag";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::LIGHTNING;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_lightning_strike";
+	a->m_enum_name = "lightning_strike";
+
+	a = &(Action::m_base_info[Action::THUNDERSTORM]);
+	a->m_timer_nr=2;
+	a->m_standard_time=1301;
+	a->m_timer=12000;
+	a->m_base_action = Action::MAGIC_ATTACK;
+	a->m_critical_perc=0.8;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Gewitter";
+	a->m_req_level = 20;
+	a->m_req_ability[0] = Action::LIGHTNING_STRIKE;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_thunderstorm";
+	a->m_enum_name = "thunderstorm";
+
+	a = &(Action::m_base_info[Action::THUNDERSTORM2]);
+	a->m_timer_nr=2;
+	a->m_standard_time=1301;
+	a->m_timer=12000;
+	a->m_base_action = Action::MAGIC_ATTACK;
+	a->m_critical_perc=0.8;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Blitzgewitter";
+	a->m_req_level = 60;
+	a->m_req_ability[0] = Action::THUNDERSTORM;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_thunderstorm2";
+	a->m_enum_name = "thunderstorm2";
+
+	a = &(Action::m_base_info[Action::CHAIN_LIGHTNING]);
+	a->m_timer_nr=1;
+	a->m_standard_time=801;
+	a->m_timer=7000;
+	a->m_base_action = Action::MAGIC_ATTACK;
+	a->m_critical_perc=0.8;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Kettenblitz";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::LIGHTNING;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_chain_lightning";
+	a->m_enum_name = "chain_lightning";
+
+	a = &(Action::m_base_info[Action::CHAIN_LIGHTNING2]);
+	a->m_timer_nr=1;
+	a->m_standard_time=801;
+	a->m_timer=7000;
+	a->m_base_action = Action::MAGIC_ATTACK;
+	a->m_critical_perc=0.8;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Kugelblitz";
+	a->m_req_level = 20;
+	a->m_req_ability[0] = Action::CHAIN_LIGHTNING;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_chain_lightning2";
+	a->m_enum_name = "chain_lightning2";
+
+	a = &(Action::m_base_info[Action::STATIC_SHIELD]);
+	a->m_timer_nr=2;
+	a->m_standard_time=501;
+	a->m_timer=40000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.8;
+	a->m_distance = SELF;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Statikschild";
+	a->m_req_level = 40;
+	a->m_req_ability[0] = Action::CHAIN_LIGHTNING;
+	a->m_req_ability[1] = Action::LIGHTNING_STRIKE;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_static_shield";
+	a->m_enum_name = "static_shield";
+
+	a = &(Action::m_base_info[Action::IONISATION]);
+	a->m_timer_nr=0;
+	a->m_standard_time=0;
+	a->m_timer=0;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.0;
+	a->m_distance = PASSIVE;
+	a->m_flags =0;
+	a->m_name = "Ionisierung";
+	a->m_req_level = 20;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_ionisation";
+	a->m_enum_name = "ionisation";
+
+
+	// Schuetze Faehigkeiten
+	a = &(Action::m_base_info[Action::TRIPLE_SHOT]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1;
+	a->m_timer=3000;
+	a->m_base_action = Action::RANGE_ATTACK;
+	a->m_critical_perc=0.3;
+	a->m_distance = RANGED;
+	a->m_flags =0;
+	a->m_name = "1 Vogel mit 3 Steinen";
+	a->m_req_level = 1;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_triple_shot";
+	a->m_enum_name = "triple_shot";
+
+	a = &(Action::m_base_info[Action::GUIDED_TRIPLE_SHOT]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1;
+	a->m_timer=3000;
+	a->m_base_action = Action::RANGE_ATTACK;
+	a->m_critical_perc=0.3;
+	a->m_distance = RANGED;
+	a->m_flags =0;
+	a->m_name = "Todesschwarm";
+	a->m_req_level = 20;
+	a->m_req_ability[0] = Action::MULTISHOT;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_guided_triple_shot";
+	a->m_enum_name = "guided_triple_shot";
+
+	a = &(Action::m_base_info[Action::MULTISHOT]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1;
+	a->m_timer=5000;
+	a->m_base_action = Action::RANGE_ATTACK;
+	a->m_critical_perc=0.7;
+	a->m_distance = RANGED;
+	a->m_flags =0;
+	a->m_name = "Faecherschuss";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::TRIPLE_SHOT;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_multishot";
+	a->m_enum_name = "multishot";
+
+	a = &(Action::m_base_info[Action::VOLLEY_SHOT]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1;
+	a->m_timer=5000;
+	a->m_base_action = Action::RANGE_ATTACK;
+	a->m_critical_perc=0.7;
+	a->m_distance = RANGED;
+	a->m_flags =0;
+	a->m_name = "Eisenhagel";
+	a->m_req_level = 40;
+	a->m_req_ability[0] = Action::MULTISHOT;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_volley_shot";
+	a->m_enum_name = "volley_shot";
+
+	a = &(Action::m_base_info[Action::PIERCE]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1;
+	a->m_timer=3000;
+	a->m_base_action = Action::RANGE_ATTACK;
+	a->m_critical_perc=0.66;
+	a->m_distance = RANGED;
+	a->m_flags =0;
+	a->m_name = "Elfenwanderer";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::TRIPLE_SHOT;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_pierce";
+	a->m_enum_name = "pierce";
+
+	a = &(Action::m_base_info[Action::WEAK_POINT]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1;
+	a->m_timer=4000;
+	a->m_base_action = Action::RANGE_ATTACK;
+	a->m_critical_perc=0.66;
+	a->m_distance = RANGED;
+	a->m_flags =0;
+	a->m_name = "wunder Punkt";
+	a->m_req_level = 2;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_weak_point";
+	a->m_enum_name = "weak_point";
+
+	a = &(Action::m_base_info[Action::BLIND_RAGE]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1;
+	a->m_timer=4000;
+	a->m_base_action = Action::RANGE_ATTACK;
+	a->m_critical_perc=0.66;
+	a->m_distance = RANGED;
+	a->m_flags =0;
+	a->m_name = "blinde Wut";
+	a->m_req_level = 40;
+	a->m_req_ability[0] = Action::WEAK_POINT;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_blind_rage";
+	a->m_enum_name = "blind_rage";
+
+	a = &(Action::m_base_info[Action::VACUUM]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1;
+	a->m_timer=6000;
+	a->m_base_action = Action::RANGE_ATTACK;
+	a->m_critical_perc=0.66;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Vakuum";
+	a->m_req_level = 20;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_vacuum";
+	a->m_enum_name = "vacuum";
+
+	a = &(Action::m_base_info[Action::DEATH_ROULETTE]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1;
+	a->m_timer=3000;
+	a->m_base_action = Action::RANGE_ATTACK;
+	a->m_critical_perc=0.66;
+	a->m_distance = RANGED;
+	a->m_flags =0;
+	a->m_name = "Todesroulette";
+	a->m_req_level = 60;
+	a->m_req_ability[0] = Action::GUIDED_TRIPLE_SHOT;
+	a->m_req_ability[1] = Action::VOLLEY_SHOT;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_death_roulette";
+	a->m_enum_name = "death_roulette";
+
+	a = &(Action::m_base_info[Action::EXPLODING_ARROW]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1;
+	a->m_timer=7000;
+	a->m_base_action = Action::RANGE_ATTACK;
+	a->m_critical_perc=0.66;
+	a->m_distance = RANGED;
+	a->m_flags =0;
+	a->m_name = "Sprengpfeil";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_exploding_arrow";
+	a->m_enum_name = "exploding_arrow";
+
+	a = &(Action::m_base_info[Action::EXPLOSION_CASCADE]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1;
+	a->m_timer=7000;
+	a->m_base_action = Action::RANGE_ATTACK;
+	a->m_critical_perc=0.66;
+	a->m_distance = RANGED;
+	a->m_flags =0;
+	a->m_name = "Sprengkaskade";
+	a->m_req_level = 40;
+	a->m_req_ability[0] = Action::EXPLODING_ARROW;
+	a->m_req_ability[1] = Action::MULTISHOT;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_exploding_cascade";
+	a->m_enum_name = "exploding_cascade";
+
+	a = &(Action::m_base_info[AIMED_SHOT]);
+	a->m_timer_nr=2;
+	a->m_standard_time=801;
+	a->m_timer=140000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = SELF;
+	a->m_flags =0;
+	a->m_name = "Zielschuss";
+	a->m_req_level = 1;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_aimed_shot";
+	a->m_enum_name = "aimed_shot";
+
+	a = &(Action::m_base_info[BOW_SPIRIT]);
+	a->m_timer_nr=2;
+	a->m_standard_time=801;
+	a->m_timer=140000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = SELF;
+	a->m_flags =0;
+	a->m_name = "Bogenseele";
+	a->m_req_level = 40;
+	a->m_req_ability[0] = Action::AIMED_SHOT;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_bow_spirit";
+	a->m_enum_name = "bow_spirit";
+
+	a = &(Action::m_base_info[ICE_ARROWS]);
+	a->m_timer_nr=2;
+	a->m_standard_time=801;
+	a->m_timer=240000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = SELF;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Eispfeil";
+	a->m_req_level = 20;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_ice_arrows";
+	a->m_enum_name = "ice_arrows";
+
+	a = &(Action::m_base_info[FREEZING_ARROWS]);
+	a->m_timer_nr=2;
+	a->m_standard_time=801;
+	a->m_timer=240000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = SELF;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Frostpfeile";
+	a->m_req_level = 60;
+	a->m_req_ability[0] = Action::ICE_ARROWS;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_freezing_arrows";
+	a->m_enum_name = "freezing_arrows";
+
+	a = &(Action::m_base_info[WIND_ARROWS]);
+	a->m_timer_nr=2;
+	a->m_standard_time=801;
+	a->m_timer=240000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = SELF;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Windpfeile";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_wind_arrows";
+	a->m_enum_name = "wind_arrows";
+
+	a = &(Action::m_base_info[STORM_ARROWS]);
+	a->m_timer_nr=2;
+	a->m_standard_time=801;
+	a->m_timer=240000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = SELF;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Sturmpfeile";
+	a->m_req_level = 40;
+	a->m_req_ability[0] = Action::WIND_ARROWS;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_storm_arrows";
+	a->m_enum_name = "storm_arrows";
+
+	a = &(Action::m_base_info[WIND_WALK]);
+	a->m_timer_nr=2;
+	a->m_standard_time=801;
+	a->m_timer=60000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = SELF;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Windwandern";
+	a->m_req_level = 20;
+	a->m_req_ability[0] = Action::AIMED_SHOT;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_wind_walk";
+	a->m_enum_name = "wind_walk";
+
+	a = &(Action::m_base_info[Action::EVADE]);
+	a->m_timer_nr=0;
+	a->m_standard_time=0;
+	a->m_timer=0;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.0;
+	a->m_distance = PASSIVE;
+	a->m_flags =0;
+	a->m_name = "Katzenreflexe";
+	a->m_req_level = 1;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_evade";
+	a->m_enum_name = "evade";
+
+	a = &(Action::m_base_info[Action::CRITICAL_STRIKE]);
+	a->m_timer_nr=0;
+	a->m_standard_time=0;
+	a->m_timer=0;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.0;
+	a->m_distance = PASSIVE;
+	a->m_flags =0;
+	a->m_name = "Elfenaugen";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::EVADE;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_critical_strike";
+	a->m_enum_name = "critical_strike";
+
+	a = &(Action::m_base_info[Action::CONCENTRATION]);
+	a->m_timer_nr=0;
+	a->m_standard_time=0;
+	a->m_timer=0;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.0;
+	a->m_distance = PASSIVE;
+	a->m_flags =0;
+	a->m_name = "Konzentration";
+	a->m_req_level = 20;
+	a->m_req_ability[0] = Action::EVADE;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_concentration";
+	a->m_enum_name = "concentration";
+
+	a = &(Action::m_base_info[Action::MENTAL_WALL]);
+	a->m_timer_nr=0;
+	a->m_standard_time=0;
+	a->m_timer=0;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.0;
+	a->m_distance = PASSIVE;
+	a->m_flags =0;
+	a->m_name = "Geistige Wand";
+	a->m_req_level = 60;
+	a->m_req_ability[0] = Action::CONCENTRATION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_mental_wall";
+	a->m_enum_name = "mental_wall";
+
+	a = &(Action::m_base_info[Action::RESIST_ICE]);
+	a->m_timer_nr=0;
+	a->m_standard_time=0;
+	a->m_timer=0;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.0;
+	a->m_distance = PASSIVE;
+	a->m_flags =0;
+	a->m_name = "Nordwanderer";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_resist_ice";
+	a->m_enum_name = "resist_ice";
+
+	a = &(Action::m_base_info[Action::RESIST_AIR]);
+	a->m_timer_nr=0;
+	a->m_standard_time=0;
+	a->m_timer=0;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.0;
+	a->m_distance = PASSIVE;
+	a->m_flags =0;
+	a->m_name = "Nordjaeger";
+	a->m_req_level = 40;
+	a->m_req_ability[0] = Action::RESIST_ICE;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_resist_air";
+	a->m_enum_name = "resist_air";
+
+
+	// Priester Faehigkeiten
+	a = &(Action::m_base_info[HOLY_LIGHT]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1;
+	a->m_timer=4000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "reinigendes Licht";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_holy_light";
+	a->m_enum_name = "holy_light";
+
+	a = &(Action::m_base_info[HOLY_FIRE]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1;
+	a->m_timer=4000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "reinigendes Feuer";
+	a->m_req_level = 40;
+	a->m_req_ability[0] = Action::HOLY_LIGHT;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_holy_fire";
+	a->m_enum_name = "holy_fire";
+
+	a = &(Action::m_base_info[BURNING_RAGE]);
+	a->m_timer_nr=2;
+	a->m_standard_time=1001;
+	a->m_timer=180000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = PARTY_MULTI;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "brennende Wut";
+	a->m_req_level = 20;
+	a->m_req_ability[0] = Action::BLAZING_SHIELD;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_burning_rage";
+	a->m_enum_name = "burning_rage";
+
+	a = &(Action::m_base_info[CURE_BLIND_MUTE]);
+	a->m_timer_nr=1;
+	a->m_standard_time=501;
+	a->m_timer=3000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = PARTY;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "sanftes Leuchten";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_cure_blind_mute";
+	a->m_enum_name = "cure_blind_mute";
+
+	a = &(Action::m_base_info[CURE_BLIND_MUTE_PARTY]);
+	a->m_timer_nr=2;
+	a->m_standard_time=501;
+	a->m_timer=6000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = PARTY_MULTI;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "allessehendes Auge";
+	a->m_req_level = 40;
+	a->m_req_ability[0] = Action::CURE_BLIND_MUTE;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_cure_blind_mute_party";
+	a->m_enum_name = "cure_blind_mute_party";
+
+	a = &(Action::m_base_info[BLAZING_SHIELD]);
+	a->m_timer_nr=2;
+	a->m_standard_time=1001;
+	a->m_timer=160000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = PARTY_MULTI;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "lodernder Schild";
+	a->m_req_level = 1;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_blazing_shield";
+	a->m_enum_name = "blazing_shield";
+
+	a = &(Action::m_base_info[LIGHT_BEAM]);
+	a->m_timer_nr=1;
+	a->m_standard_time=701;
+	a->m_timer=3000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "gleissendes Licht";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_light_beam";
+	a->m_enum_name = "light_beam";
+
+	a = &(Action::m_base_info[BURNING_SUN]);
+	a->m_timer_nr=1;
+	a->m_standard_time=701;
+	a->m_timer=7000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "blendende Sonne";
+	a->m_req_level = 60;
+	a->m_req_ability[0] = Action::LIGHT_BEAM;
+	a->m_req_ability[1] = Action::CURE_BLIND_MUTE;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_burning_sun";
+	a->m_enum_name = "burning_sun";
+
+	a = &(Action::m_base_info[BREAK_BINDING]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1;
+	a->m_timer=4000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Bindung loesen";
+	a->m_req_level = 20;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_break_binding";
+	a->m_enum_name = "break_binding";
+
+	a = &(Action::m_base_info[DISRUPT_BINDING]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1;
+	a->m_timer=4000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Bindung sprengen";
+	a->m_req_level = 60;
+	a->m_req_ability[0] = Action::BREAK_BINDING;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_disrupt_binding";
+	a->m_enum_name = "disrupt_binding";
+
+	a = &(Action::m_base_info[MAGIC_SHIELD]);
+	a->m_timer_nr=2;
+	a->m_standard_time=1001;
+	a->m_timer=200000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = PARTY_MULTI;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "magischer Schild";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::BLAZING_SHIELD;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_magic_shield";
+	a->m_enum_name = "magic_shield";
+
+	a = &(Action::m_base_info[CURE_POIS_BURN]);
+	a->m_timer_nr=1;
+	a->m_standard_time=501;
+	a->m_timer=3000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = PARTY;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Schmerz lindern";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::HEAL;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_cure_pois_burn";
+	a->m_enum_name = "cure_pois_burn";
+
+	a = &(Action::m_base_info[CURE_POIS_BURN_PARTY]);
+	a->m_timer_nr=2;
+	a->m_standard_time=501;
+	a->m_timer=6000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = PARTY_MULTI;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "heilendes Wasser";
+	a->m_req_level = 40;
+	a->m_req_ability[0] = Action::CURE_BLIND_MUTE;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_cure_pois_burn_party";
+	a->m_enum_name = "cure_pois_burn_party";
+
+	a = &(Action::m_base_info[ACID]);
+	a->m_timer_nr=1;
+	a->m_standard_time=701;
+	a->m_timer=5000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Saeure";
+	a->m_req_level = 20;
+	a->m_req_ability[0] = Action::CURE_POIS_BURN;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_acid";
+	a->m_enum_name = "acid";
+
+	a = &(Action::m_base_info[HEAL]);
+	a->m_timer_nr=1;
+	a->m_standard_time=701;
+	a->m_timer=5000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = PARTY;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Heilung";
+	a->m_req_level = 1;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_heal";
+	a->m_enum_name = "heal";
+
+	a = &(Action::m_base_info[HEAL_PARTY]);
+	a->m_timer_nr=2;
+	a->m_standard_time=701;
+	a->m_timer=10000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = PARTY_MULTI;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Grosse Heilung";
+	a->m_req_level = 20;
+	a->m_req_ability[0] = Action::CURE_POIS_BURN;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_heal_party";
+	a->m_enum_name = "heal_party";
+
+	a = &(Action::m_base_info[DIVINE_WIND]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1;
+	a->m_timer=3000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "zorniger Wind";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_divine_wind";
+	a->m_enum_name = "divine_wind";
+
+	a = &(Action::m_base_info[DIVINE_STORM]);
+	a->m_timer_nr=1;
+	a->m_standard_time=1;
+	a->m_timer=6000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Goettlicher Sturm";
+	a->m_req_level = 40;
+	a->m_req_ability[0] = Action::DIVINE_WIND;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_divine_storm";
+	a->m_enum_name = "divine_storm";
+
+	a = &(Action::m_base_info[BLADE_STORM]);
+	a->m_timer_nr=2;
+	a->m_standard_time=1001;
+	a->m_timer=160000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = PARTY_MULTI;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Klingensturm";
+	a->m_req_level = 1;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_blade_storm";
+	a->m_enum_name = "blade_storm";
+
+	a = &(Action::m_base_info[CURE_CONF_BSRK]);
+	a->m_timer_nr=1;
+	a->m_standard_time=501;
+	a->m_timer=3000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = PARTY;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Konzentration wiederherstellen";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::NOACTION;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_cure_conf_bsrk";
+	a->m_enum_name = "cure_conf_bsrk";
+
+	a = &(Action::m_base_info[CURE_CONF_BSRK_PARTY]);
+	a->m_timer_nr=2;
+	a->m_standard_time=501;
+	a->m_timer=6000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = PARTY_MULTI;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Seelenschild";
+	a->m_req_level = 40;
+	a->m_req_ability[0] = Action::CURE_CONF_BSRK;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_cure_conf_bsrk_party";
+	a->m_enum_name = "cure_conf_bsrk_party";
+
+	a = &(Action::m_base_info[HYPNOSIS]);
+	a->m_timer_nr=1;
+	a->m_standard_time=701;
+	a->m_timer=4000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "Hypnose";
+	a->m_req_level = 20;
+	a->m_req_ability[0] = Action::CURE_CONF_BSRK;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_hypnosis";
+	a->m_enum_name = "hypnosis";
+
+	a = &(Action::m_base_info[HYPNOSIS2]);
+	a->m_timer_nr=1;
+	a->m_standard_time=701;
+	a->m_timer=7000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = RANGED;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "hypnotischer Wirbel";
+	a->m_req_level = 60;
+	a->m_req_ability[0] = Action::HYPNOSIS;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_hypnosis2";
+	a->m_enum_name = "hypnosis2";
+
+	a = &(Action::m_base_info[KEEN_MIND]);
+	a->m_timer_nr=2;
+	a->m_standard_time=701;
+	a->m_timer=180000;
+	a->m_base_action = Action::NOACTION;
+	a->m_critical_perc=0.66;
+	a->m_distance = PARTY_MULTI;
+	a->m_flags =MUTE_AFFECTED;
+	a->m_name = "messerscharfer Geist";
+	a->m_req_level = 5;
+	a->m_req_ability[0] = Action::BLADE_STORM;
+	a->m_req_ability[1] = Action::NOACTION;
+	a->m_req_ability[2] = Action::NOACTION;
+	a->m_description = "descr_keen_mind";
+	a->m_enum_name = "keen_mind";
+
+	for (int i =0;i<192;i++)
+	{
+		a = &(Action::m_base_info[(ActionType) i]);
+		if (a->m_enum_name != "")
+		{
+			m_enum_string_to_type.insert(make_pair(a->m_enum_name,(ActionType) i));
+		}
+	}
+}
+
+
+string Action::getName(ActionType type)
+{
+    #ifndef WIN32
+        return ( gettext((m_base_info[type].m_enum_name).c_str()) );
+    #else
+        return m_base_info[type].m_enum_name;
+    #endif
+}
+
+
+string Action::getDescription(ActionType type)
+{
+    #ifndef WIN32
+        return ( gettext((m_base_info[type].m_description).c_str()) );
+    #else
+        return m_base_info[type].m_description;
+    #endif
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/action.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,461 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf
+
+	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.
+*/
+
+/**
+ * \file action.h
+ * \defgroup action \ Aktionen
+ * \ingroup command
+ * \brief Stellt einzelne Aktionen zur Realisierung eines Kommandos zur Verf&uuml;gung
+ * \author Hans Wulf
+ * \version 1.0
+ * \date 2007/05/28
+ * \note Beinhaltet die Klasse Action
+ */
+#ifndef ACTION_H
+#define ACTION_H
+
+#include <string>
+#include "gettext.h"
+#include "charconv.h"
+#include "debug.h"
+#include <map>
+#include <vector>
+
+using std::string;
+
+/**
+ * \struct Action
+ * \brief Beschreibt eine Aktion, welche eine Figur ausf&uuml;hren kann. Eine Aktion ist dabei die kleinste Einheit einer Handlung.
+ */
+struct Action {
+//Public stuff
+
+public:
+
+	/**
+	 * \enum ActionType
+	 * \brief Aufzaehlung verschiedener Aktionen
+	 */
+	enum ActionType
+	{
+		NOACTION=0,
+		WALK=1,
+		USE=2,
+		TRADE=3,
+		ATTACK=4,
+		RANGE_ATTACK=5,
+		MAGIC_ATTACK=6,
+		HOLY_ATTACK=7,
+		DEFEND=9,
+		WAIT=10,
+		DIE=11,
+		DEAD=12,
+		TAKE_ITEM =13,
+
+		BASH = 32,		//a
+		HAMMER_BASH=33,		//b
+		AROUND_BLOW = 34,	//c
+		WHIRL_BLOW= 35,		//d
+		SMASH = 36,		//e
+		HATE_MAGE = 37,		//f
+		CHARGE = 38,		//g
+		STORM_CHARGE = 39,	//h
+
+		BLOCK = 40,
+		STEADFAST = 41,
+		MONSTER_HUNTER = 42,
+		MONSTER_SLAYER = 43,
+		ENDURANCE = 44,
+		WEAPONMASTER = 45,
+
+		FIRESWORD = 46,		//n
+		FLAMESWORD = 47,	//o
+		FLAMEARMOR = 48,	//p
+		BERSERK = 49,		//q
+		WARCRY = 50,		//r
+		REGENERATE = 51,	//s
+		DECOY = 52,		//t
+		SCARE = 53,		//u
+		ANGER = 54,		//v
+		FURY = 55,		//w
+
+
+		TRIPLE_SHOT = 64,	//a
+		GUIDED_TRIPLE_SHOT = 65,//b
+		MULTISHOT = 66,		//c
+		VOLLEY_SHOT =67,	//d
+		PIERCE = 68,		//e
+		WEAK_POINT = 69,	//f
+		BLIND_RAGE = 70,	//g
+		VACUUM = 71,		//h
+		DEATH_ROULETTE = 72,	//i
+		EXPLODING_ARROW = 73,	//j
+		EXPLOSION_CASCADE= 74,	//k
+
+		EVADE = 75,
+		CRITICAL_STRIKE = 76,
+		CONCENTRATION = 77,
+		MENTAL_WALL = 78,
+		RESIST_ICE = 79,
+		RESIST_AIR = 80,
+
+		AIMED_SHOT = 81,	//r
+		BOW_SPIRIT = 82,	//s
+		ICE_ARROWS = 83,	//t
+		FREEZING_ARROWS = 84,	//u
+		WIND_ARROWS = 85,	//v
+		STORM_ARROWS = 86,	//w
+		WIND_WALK = 87,		//x
+
+
+		FIRE_BOLT =96,		//a
+		FIRE_STRIKE = 97,	//b
+		FIRE_WAVE = 98,		//c
+		FIRE_STORM = 99,	//d
+		FIRE_BALL = 100,	//e
+		INFERNO_BALL = 101,	//f
+		FIRE_WALL = 102,	//g
+		INFLAME = 103,
+
+		ICE_BOLT = 104,		//j
+		ICE_SPIKE = 105,	//k
+		SNOW_STORM = 106,	//l
+		BLIZZARD = 107,		//m
+		ICE_RING = 108,		//n
+		FROST_RING = 109,	//o
+		FREEZE = 110,		//p
+		CHILL = 111,
+
+		LIGHTNING = 112,	//r
+		LIGHTNING_STRIKE = 113,	//s
+		THUNDERSTORM = 114,	//t
+		THUNDERSTORM2 = 115,	//u
+		CHAIN_LIGHTNING = 116,	//v
+		CHAIN_LIGHTNING2 = 117,	//w
+		STATIC_SHIELD = 118,	//x
+		IONISATION = 119,
+
+
+		// Priester Faehigkeiten
+		HOLY_LIGHT = 128,	//a
+		HOLY_FIRE = 129,	//b
+		BURNING_RAGE = 130,	//c
+		CURE_BLIND_MUTE = 131,	//d
+		CURE_BLIND_MUTE_PARTY = 132,	//e
+		BLAZING_SHIELD = 133,	//f
+		LIGHT_BEAM = 134,	//g
+		BURNING_SUN = 135,	//h
+
+		BREAK_BINDING = 136,	//i
+		DISRUPT_BINDING = 137,	//j
+		MAGIC_SHIELD = 138,	//k
+		CURE_POIS_BURN = 139,	//l
+		CURE_POIS_BURN_PARTY = 140,	//m
+		ACID = 141,		//n
+		HEAL = 142,		//o
+		HEAL_PARTY = 143,	//p
+
+		DIVINE_WIND = 144,	//q
+		DIVINE_STORM = 145,	//r
+		BLADE_STORM = 146,	//s
+		CURE_CONF_BSRK = 147,	//t
+		CURE_CONF_BSRK_PARTY = 148,	//u
+		HYPNOSIS = 149,		//v
+		HYPNOSIS2 = 150,	//w
+		KEEN_MIND = 151		//x
+
+
+
+
+	};
+
+	/**
+	 * \enum Distance
+	 * \brief Aufzaehlung verschiedener Entfernungen und Zieltypen fuer Aktionen
+	 */
+	enum Distance
+	{
+
+		MELEE = 1,
+		RANGED = 2,
+		PASSIVE = 4,
+		SELF = 8,
+ 		PARTY =16,
+		PARTY_MULTI = 32
+	};
+
+	/**
+	 * \enum Flags
+	 * \brief Aufzaehlung von Sondereigenschaften von Aktionen
+	 */
+	enum Flags
+	{
+		MUTE_AFFECTED= 1,
+	};
+
+	/**
+	 * \struct ActionInfo
+	 * \brief Enthaelt einige grundlegende Informationen zu einer Aktion
+	 */
+	struct ActionInfo
+	{
+		/**
+		 * \var m_timer_nr
+		 * \brief Nummer des Timers, der bei benutzen der Aktion gestartet wird. Moegliche Werte sind 0,1,2
+		 */
+		int m_timer_nr;
+
+		/**
+		 * \var m_standard_tim
+		 * \brief Zeit in ms, die die Aktion ohne Modifikatoren in Anspruch nimmt
+		 */
+		float m_standard_time;
+
+		/**
+		 * \var m_timer
+		 * \brief Gibt die Zeitdauer in ms an, die der Timer laeuft, der beim Benutzen dieser Aktion gestartet wird.
+		 */
+		float m_timer;
+
+		/**
+		 * \var m_base_action
+		 * \brief Gibt die Aktion an, die stattdessen ausgefuehrt wird, wenn die Aktion selbst nicht benutzt werden kann weil der Timer noch lauft
+		 */
+		ActionType m_base_action;
+
+		/**
+		 * \var m_critial_perc
+		 * \brief Prozentsatz zu dem die Aktion abgeschlossen ist, wenn der eigentliche Effekt der Aktion ausgeloest wird
+		 */
+		float m_critical_perc;
+
+		/**
+		 * \var Distance m_distance
+		 * \brief Gibt die Distanz an, auf die die Aktion ausgeführt werden kann
+		 */
+		Distance m_distance;
+
+		/**
+		 * \var char m_flags
+		 * \brief verschiedene Eigenschaften der Aktion in Bitkodierung
+		 */
+		char m_flags;
+
+		/**
+		 * \var std::string m_name
+		 * \brief Name der Aktion
+		 */
+		std::string m_name;
+
+		/**
+		 * \var std::string m_enum_name
+		 * \brief Name des Enums als String
+		 */
+		std::string m_enum_name;
+
+		/**
+		 * \var std::string m_description
+		 * \brief Abkuerzung der Beschreibung als String
+		 **/
+		std::string m_description;
+
+		/**
+		* \var list<std::string> m_animation;
+		* \brief Namen der Animationen
+        */
+		std::vector<std::string> m_animation[3];
+
+		/**
+		 * \var short m_req_level
+		 * \brief Level, welches benoetigt wird, um die Faehigkeit zu erlernen
+		 */
+		short m_req_level;
+
+		/**
+		 * \var ActionType m_req_ability[3]
+		 * \brief Faehigkeiten, die benoetigt werden um die Faehigkeit zu erlernen
+		 */
+		ActionType m_req_ability[3];
+
+
+	};
+
+	/**
+	 * \fn enum ActionEquip
+	 * \brief Aufzaehlung, welche Ausruestungsgegenstaende fuer die Aktion verwendet werden
+	 */
+	enum ActionEquip
+	{
+		NO_WEAPON=0,
+		ONE_HANDED =1,
+		TWO_HANDED =2,
+	};
+
+	//Fields
+	//Constructors
+	/**
+	 * \fn Action(ActionType type, float goal_coordinate_x, float goal_coordinate_y, int goal_object_id, float time)
+	 * \brief Legt ein neues Action Objekt an
+	 * \param type initialisiert den Typ der Aktion
+	 * \param goal_coordinate_x initialisiert die x-Koordinate des Zielpunkts
+	 * \param goal_coordinate_y initialisiert die y-Koordinate des Zielpunkts
+	 * \param goal_object_id initialisiert ID des Zielobjekts
+	 * \param time initialisiert Gesamtdauer der Aktion
+	 */
+	Action(ActionType type)
+	{
+		m_type = type;
+		m_time =0;
+		m_elapsed_time =0;
+	}
+
+
+	/**
+	 * \fn Action()
+	 * \brief Legt eine leere Aktion an
+	 */
+	Action()
+	{
+		m_type = NOACTION;
+		m_time =0;
+		m_elapsed_time =0;
+	}
+
+	/**
+	 * \fn static void init()
+	 * \brief initialisiert die statischen Variablen
+	 */
+	static void init();
+
+	/**
+	 * \fn static ActionInfo* getActionInfo(ActionType type)
+	 * \brief Gibt zu einer Aktion die Basisinformationen aus
+	 * \param type die Aktion
+	 * \return Zeiger auf die Daten
+	 */
+	static ActionInfo* getActionInfo(ActionType type)
+	{
+		return &(m_base_info[type]);
+	}
+
+	/**
+	 * \fn static string getName(ActionType type)
+	 * \brief Gibt zu einer Aktion den Namen aus
+	 * \param type die Aktion
+	 * \return Name der Aktion
+	 */
+	static string getName(ActionType type);
+
+	/**
+	 * \fn static string getDescription(ActionType type)
+	 * \brief Gibt zu einer Aktion die Beschreibung aus
+	 * \param type die Aktion
+	 * \return Beschreibung der Aktion
+	 */
+	static string getDescription(ActionType type);
+
+	/**
+	 * \fn void toString(CharConv* cv)
+	 * \brief Konvertiert das Objekt in einen String und schreibt ihn in der Puffer
+	 * \param buf Ausgabepuffer
+	 * \return Zeiger hinter den beschriebenen Datenbereich
+	 */
+	void toString(CharConv* cv)
+	{
+		/*
+		*((short*) buf) = (short) m_type;
+		*((float* ) (buf+sizeof(short))) = m_elapsed_time / m_time;
+		return buf+sizeof(short)+sizeof(float);
+		*/
+		cv->toBuffer((short) m_type);
+		cv->toBuffer(m_elapsed_time / m_time);
+		cv->toBuffer((char) m_action_equip);
+		cv->toBuffer((char) m_animation_number);		
+
+	}
+
+	/**
+	 * \fn void fromString(CharConv* cv)
+	 * \brief Erzeugt das Objekt aus einem String
+	 * \param buf Objekt als String
+	 * \return Zeiger hinter den gelesenen Datenbereich
+	 */
+	void fromString(CharConv* cv)
+	{
+		short tmp;
+		char ctmp;
+		cv->fromBuffer(tmp);
+		m_type = (ActionType) tmp;
+		cv->fromBuffer(m_elapsed_time);
+		cv->fromBuffer(ctmp);
+		m_action_equip = (ActionEquip) ctmp;
+		cv->fromBuffer(m_animation_number);
+		
+		
+		m_time=1;
+	}
+
+	//Fields
+	/**
+	 * \var m_type;
+	 * \brief Typ der Aktion
+	 */
+	ActionType m_type;
+
+	/**
+	 * \var m_elapsed_time;
+	 * \brief bereits vergangene Zeit der Aktion
+	*/
+	float m_elapsed_time;
+
+	/**
+	 * \var m_time;
+	 * \brief Gesamtdauer der Aktion
+	 */
+	float m_time;
+	
+	/**
+	 * \var ActionEquip m_action_equip
+	 * \brief Ausruestung mit der die Aktion ausgefuehrt wird
+	 */
+	ActionEquip m_action_equip;
+
+	/**
+	 * \var char m_animation_number
+	 * \brief Nummer der Animation (falls mehrere fuer dieselbe Situation vorhanden sind)
+	 */
+	char m_animation_number;
+
+	/**
+	 * \var static const ActionInfo m_base_info[192]
+	 * \brief Enthaelt Basisinformationen fuer alle Aktionen
+	 */
+	static ActionInfo m_base_info[192];
+
+	/**
+	 * \var static map<std::string, ActionType> m_enum_string_to type
+	 * \brief Bildet den Name der Aktion auf den Aktionstyp ab
+	 */
+	static std::map<std::string, ActionType> m_enum_string_to_type;
+
+};
+
+
+
+#endif //ACTION_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/archer.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,103 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf
+
+	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.
+*/
+
+#include <string>
+#include "archer.h"
+
+Archer::Archer(World* world, int id) : Player(world, id)
+{
+	init();
+}
+
+
+
+Archer::~Archer()
+{
+}
+
+bool Archer::init ()
+{
+	getTypeInfo()->m_subtype = "archer";
+
+	CreatureBaseAttr* bas = getBaseAttr();
+	CreatureDynAttr* dyn = getDynAttr();
+
+	// Attribute auf Basiswerte setzen
+	dyn->m_experience=0;
+	dyn->m_health = 150;
+
+	bas->m_max_experience = 100;
+	bas->m_level =1;
+	bas->m_max_health = 150;
+	bas->m_armor = 15;
+	bas->m_block=0;
+	bas->m_attack = 30;
+	bas->m_strength = 25;
+	bas->m_dexterity = 45;
+	bas->m_magic_power = 15;
+	bas->m_willpower = 15;
+	bas->m_resistances[0] =0;
+	bas->m_resistances[1] =0;
+	bas->m_resistances[2] =0;
+	bas->m_resistances[3] =0;
+	bas->m_resistances_cap[0] =50;
+	bas->m_resistances_cap[1] =50;
+	bas->m_resistances_cap[2] =50;
+	bas->m_resistances_cap[3] =50;
+	bas->m_walk_speed = 3000;
+	bas->m_attack_speed=2000;
+	m_base_action = Action::RANGE_ATTACK;
+
+	// Alle Faehigkeiten deaktivieren
+	int i;
+	for (i=1;i<6;i++)
+		bas->m_abilities[i]=0;
+
+	// Debugging
+	bas->m_abilities[2] = 0xffffff;
+
+
+	// Basisfaehigkeiten (normaler Angriff etc) erlauben
+	bas->m_abilities[0] = 0x3f2f;
+	bas->m_attack_range =20;
+
+	m_base_action = Action::RANGE_ATTACK;
+	m_left_action = Action::RANGE_ATTACK;
+	m_right_action = Action::RANGE_ATTACK;
+
+	bas->m_special_flags=0;
+
+	m_name.assign("Legolas");
+
+	// Modifizierte Basisattribute erzeugen
+	calcBaseAttrMod();
+
+	return true;
+}
+
+
+bool Archer::update(float time)
+{
+	// spezifische update Routine
+
+	// update von Player aufrufen
+	Player::update(time);
+	return true;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/archer.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,91 @@
+#ifndef ARCHER_H
+#define ARCHER_H
+
+#include "player.h"
+
+/**
+ * \class Archer
+ * \brief Spieler der Klasse Bogenschuetze
+ */
+class Archer : public Player {
+//Public stuff
+	public:
+	//Fields
+	//Constructors
+	/**
+	 * \fn Archer(World* world, unsigned int id)
+	 * \brief Konstruktor
+	 * \param world Welt
+	 * \param id Objekt-ID
+	 *
+	 * Legt ein neues Archer Objekt an.
+	 */
+		Archer(World* world, int id);
+
+
+	/**
+		 * \fn ~Archer()
+		 * \brief Destruktor
+		 *
+		 * Gibt den Allokierten Speicher wieder frei
+	 */
+		~Archer();
+	//Accessor Methods
+	//Operations
+	/**
+		 * \fn virtual bool init ()
+		 * \brief Initialisiert den Magier
+		 * \return bool, der angibt ob die initialisierung erfolgreich war
+	 */
+		virtual bool init ();
+
+	/**
+		 * \fn virtual bool destroy ()
+		 * \brief Zerstoert das Objekt. Die Funktion ist virtuell und wird durch die abgeleiteten Klassen &uuml;berschrieben.
+		 * \return bool, der angibt ob die Zerstoerung erfolgreich war
+	 */
+		virtual bool destroy()
+		{
+			Player::destroy();
+			return true;
+		}
+
+		/**
+		 * \fn virtual void calcDamage(ActionType type,Damage& dmg)
+		 * \brief Berechnet den Basisschaden einer Aktion
+		 */
+		virtual void calcBaseDamage(Action::ActionType act,Damage& dmg)
+		{
+			Player::calcBaseDamage(act,dmg);
+		}
+
+		/**
+		 * \fn virtual void calcBaseAttrMod()
+		 * \brief Die modifizierten Basisattribute werden neu berechnet. Verwendet die Basisattribute, verwendete Items, sowie temporaere Modifikationen.
+		 */
+		virtual void calcBaseAttrMod()
+		{
+			Player::calcBaseAttrMod();
+		}
+
+		/**
+		 * \fn bool update (float time)
+		 * \brief Updatefunktion des Magiers
+		 * \param time Verstrichene Zeit
+		 * \return bool, Erfolgreiches Update?
+		 *
+		 **/
+		bool update(float time);
+
+	protected:
+
+	/**
+	 * \fn virtual void gainLevel()
+	 * \brief Wird aufgerufen, wenn das Lebewesen ein Levelup erhält. Passt Erfahrung und alle Basisattribute an.
+	 */
+		virtual void gainLevel()
+		{
+			Player::gainLevel();
+		}
+};
+#endif //MAGE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/charconv.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,133 @@
+#ifndef CHARCONV_H
+#define CHARCONV_H
+#include "raknet/RakNetTypes.h"
+#include "raknet/BitStream.h"
+
+/**
+ * \class CharConv
+ * \brief Klasse fuer die Konvertierung von Datenstrukturen in eine Kette aus char und umgekehrt
+ */
+class CharConv
+{
+	public:
+	
+	/**
+	 * \fn CharConv()
+	 * \brief Konstruktor
+	 */
+	CharConv()
+	: m_bitstream()
+	{
+		
+	}
+	
+	/**
+	 * \fn CharConv(unsigned char* data, unsigned int size)
+	 * \brief erstellt ein neues Objekt auf der Basis der angegebenen Daten
+	 * \param data zugrunde liegende Daten
+	 * \param size Laenge der Zeichenkette data
+	 */
+	CharConv(unsigned char* data, unsigned int size)
+	: m_bitstream(data, size, false)
+	{
+		
+	}
+	
+	/**
+	 * \fn CharConv(Packet* packet)
+	 * \brief erstellt ein neues Objekt aus einem ueber das Netzwerk erhaltenen Datenpaket
+	 * \param packet Datenpaket
+	 */
+	CharConv(Packet* packet)
+	: m_bitstream(packet->data, packet->length, false)
+	{
+		
+	}
+	
+	/**
+	 * \fn void backToStart()
+	 * \brief setzt den internen Lesezeiger zurueck an den Anfang
+	 */
+	void backToStart()
+	{
+		m_bitstream.SetWriteOffset(0);
+	}
+	
+	/**
+	 * \fn void reset()
+	 * \brief Loescht die zugrunde liegenden Daten
+	 */
+	void reset()
+	{
+		m_bitstream.Reset();
+	}
+	
+	/**
+	 * \fn void toBuffer(char* data, unsigned int size)
+	 * \brief Schreibt Daten in den Puffer
+	 * \param data zu schreibende Daten
+	 * \param size Laenge der zu schreibenden Daten
+	 */
+	void toBuffer(char* data, unsigned int size)
+	{
+		m_bitstream.Write(data,size);
+	}
+	
+	/**
+	 * \fn void toBuffer(T data)
+	 * \brief Schreibt Daten in den Puffer
+	 * \param data zu schreibende Daten
+	 */
+	template<class T>
+	void toBuffer(T data)
+	{
+		m_bitstream.Write(data);
+	}
+	
+	/**
+	 * \fn void fromBuffer(T &data)
+	 * \brief Liest Daten aus dem Puffer
+	 * \param data Ausgabeparameter fuer die Daten
+	 */
+	template<class T>
+	void fromBuffer(T &data)
+	{
+		m_bitstream.Read(data);
+	}
+	
+	/**
+	 * \fn void fromBuffer(char* data, unsigned int size)
+	 * \brief Liest Daten als String aus dem Puffer
+	 * \param data  Ausgabeparameter fuer die Daten
+	 * \param size Anzahl der Zeichen die gelesen werden
+	 */
+	void fromBuffer(char* data, unsigned int size)
+	{
+		m_bitstream.Read(data,size);
+	}
+	
+	/**
+	 * \fn RakNet::BitStream* getBitStream()
+	 * \brief Gibt den Bitstream der die Daten enthaelt aus
+	 */
+	RakNet::BitStream* getBitStream()
+	{
+		return &m_bitstream;
+	}
+			
+	
+	private:
+		/**
+		 * \var RakNet::BitStream m_bitstream
+		 * \brief enthaelt die Daten als Zeichenkette
+		 */
+		RakNet::BitStream m_bitstream;
+	
+};
+
+
+
+
+
+
+#endif // CHARCONV_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/clientnetwork.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,128 @@
+#include "clientnetwork.h"
+
+
+ClientNetwork::ClientNetwork()
+	: Network()
+{
+	
+	m_status = NET_CLOSE;
+}
+
+ClientNetwork::~ClientNetwork()
+{
+}
+
+void ClientNetwork::serverConnect( char* hostname, int req_port )
+{
+	m_peer ->Connect(hostname, req_port, 0, 0);
+	
+}
+
+void ClientNetwork::serverDisconnect()
+{
+	DEBUG("closing connection");
+	m_peer->CloseConnection(m_server_address,true);
+	// warten, damit die disconnect meldung ankommt
+#ifdef WIN32
+	Sleep( 30 );
+#else
+	usleep(30000 );
+#endif
+	m_status = NET_CLOSE;
+}
+
+
+
+
+void ClientNetwork::update()
+{
+	static int nr=0;
+	Packet* packet = m_peer->Receive();
+	unsigned char id;
+	while (packet !=0)
+	{
+		nr ++;
+		DEBUG5("packets allocated: %i",nr);
+		id = getPacketIdentifier(packet);
+		
+		if (id <  ID_USER_PACKET_ENUM)
+		{
+			switch(id)
+			{
+				case ID_ALREADY_CONNECTED:
+				case ID_CONNECTION_REQUEST_ACCEPTED:
+					m_status = NET_CONNECTED;
+					while (!m_received_packets.empty())
+						m_received_packets.pop();
+					m_server_address = packet->systemAddress;
+					DEBUG("connection accepted");
+					break;
+					
+				case ID_CONNECTION_ATTEMPT_FAILED:
+					DEBUG("connection refused");
+					m_status =NET_REJECTED;
+					m_server_address = UNASSIGNED_SYSTEM_ADDRESS;
+					break;
+					
+				case ID_NO_FREE_INCOMING_CONNECTIONS:
+					DEBUG("no free slots on server");
+					m_status =NET_SLOTS_FULL;
+					m_server_address = UNASSIGNED_SYSTEM_ADDRESS;
+					break;
+				
+				case ID_CONNECTION_LOST:
+				case ID_DISCONNECTION_NOTIFICATION:
+					DEBUG("connection timed out");
+					m_status =NET_TIMEOUT;
+					m_server_address = UNASSIGNED_SYSTEM_ADDRESS;
+					break;
+					
+				default:
+					DEBUG("unknown id: %i",id);
+					break;
+			}
+			
+			deallocatePacket(packet);
+		}
+		else
+		{
+			
+			DEBUG5("packet received");
+			m_received_packets.push(packet);
+
+		}
+		packet = m_peer->Receive();
+	}
+}
+
+
+int ClientNetwork::numberSlotMessages()
+{
+	return m_received_packets.size();
+}
+
+
+void ClientNetwork::popSlotMessage( Packet* &data)
+{
+	data = m_received_packets.front();
+	m_received_packets.pop();
+}
+
+void ClientNetwork::pushSlotMessage( RakNet::BitStream * data,PacketPriority prio,PacketReliability reliability)
+{
+	m_peer->Send(data,prio,reliability , 0,m_server_address, false);
+}
+
+NetStatus ClientNetwork::getSlotStatus()
+{
+	return m_status;
+}
+
+void ClientNetwork::deallocatePacket(Packet* packet)
+{
+	static int nr =0;
+	nr++;
+	DEBUG5("packets deallocated: %i",nr);
+	m_peer->DeallocatePacket(packet);
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/clientnetwork.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,130 @@
+#ifdef CLIENTNETWORK_H
+#else
+#define CLIENTNETWORK_H
+
+#include "network.h"
+#include <queue>
+#include "debug.h"
+#include "charconv.h"
+#include <unistd.h>
+#ifdef WIN32
+#include <windows.h>
+#endif
+
+using namespace std;
+
+/**
+ * \class ClientNetwork
+ * \brief Klasse fuer die Repraesentation der Netzwerkschnittstelle auf der Clientseite
+ */
+class ClientNetwork : public Network
+{
+	public:
+	/**
+	 * \fn ClientNetwork()
+	 * \brief Konstruktor
+	 */
+	ClientNetwork();
+
+	/**
+	 * \fn ~ClientNetwork()
+	 * \brief Destruktor
+	 */
+	~ClientNetwork();
+
+
+	/**
+	 * \fn  serverConnect( char* hostname, int req_port );
+	 * \brief Versucht einen Login am Server und handelt alle Verbindungen aus
+	 * \param hostname Serveradresse
+	 * \param req_port Authentifikationsport des Servers
+	 * \return Status der Methode
+	 *
+	 * Verbindet sich zum auth_port des Servers hostname und Versuch eine Anmeldung mit username
+	 * und password. Schlägt die Anmeldung fehl, weil der Nutzername und/oder das Passwort
+	 * falsch ist wird NET_AUTH_FAILD zurueckgegeben, wenn alle Server-Slots voll sind wird
+	 * NET_SLOTS_FULL zurueckgegeben oder wenn sonst ein Fehler auftritt NET_ERROR.
+	 * Bei ein geglueckten Anmeldungen wird NET_CONNECTED geliefert.
+	 */
+	void  serverConnect( char* hostname, int req_port );
+
+	/**
+	 * \fn NetStatus serverDisconnect()
+	 * \brief Schliesst die eventuelle Verbindungen zum Server
+	 */
+	void serverDisconnect();
+
+
+	/**
+	 * \fn  NetStatus update()
+	 * \brief Fuehrt fuer den Client-Slot die Abarbeitung durch
+	*/
+	virtual void update();
+
+	/**
+	 * \fn int numberSlotMessages()
+	 * \brief Anzahl der Packete im Empfangspuffer
+	 * \return Anzahl der Packete
+	 *
+	 * Ist der Slot ungeultig wird Null geliefert, sonst die Anzahl der Packete im Empfangspuffers
+	 */
+	virtual int numberSlotMessages(int slot=0);
+
+
+	/**
+	 * \fn void popSlotMessage(Packet* &data, int slot=0)
+	 * \brief Fuehrt net_pop_slot_message auf den Client-Slots
+	 * \param data Puffer fuer die zu kopierenden Daten
+	 * \param size Groesse des Datenblocks
+	 * \return Status der Methode
+	 *
+	 */
+	void popSlotMessage( Packet* &data, int slot=0);
+
+
+	/**
+	 * \fn void pushSlotMessage( RakNet::BitStream * data,int slot=0, PacketPriority prio= HIGH_PRIORITY,PacketReliability reliability = RELIABLE )
+	 * \brief Fuehrt net_push_slot_message auf einen Server-Slots aus
+	 * \param data Puffer fuer die zu kopierenden Daten
+	 * \param slot Slot des Empfaengers
+	 * \return Status der Methode
+	 *
+	 */
+	void pushSlotMessage( RakNet::BitStream * data, int slot=0, PacketPriority prio= HIGH_PRIORITY,PacketReliability reliability = RELIABLE) ;
+
+	/**
+	 * \fn NetStatus getSlotStatus( int slot=0 )
+	 * \brief Liefert den Status eines Server-Slots
+	 * \param slot Slotnummer des Servers
+	 * \return Status des Slots
+	 *
+	 */
+	NetStatus getSlotStatus( int slot=0 );
+
+	
+
+	private:
+	/**
+	 * \var queue<Packet*> m_received_packets
+	 * \brief Liste der empfangenen Packete
+	 */
+	queue<Packet*> m_received_packets;
+
+
+	
+	/**
+	 * \var NetStatus m_status
+	 * \brief Status der Netzwerkschnittstelle
+	 */
+	NetStatus m_status;
+
+	
+	/**
+	 * \var SystemAddress m_server_address
+	 * \brief Adresse des Servers
+	 */
+	SystemAddress m_server_address;
+};
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/command.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,126 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Chris Drechsler
+
+	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.
+*/
+/**
+ * \file command.h
+ * \defgroup command \ Kommandos
+ * \brief Stellt Kommandos zur Steuerung der Figuren zur Verf&uuml;gung
+ * \author Chris Drechsler
+ * \version 1.0
+ * \date 2007/06/06
+ * \note Beinhaltet die Klasse Command
+ */
+#ifndef COMMAND_H
+#define COMMAND_H
+
+
+
+#include <string>
+#include "action.h"
+
+
+/**
+ * \class Command
+ * \brief Beschreibt ein Kommando, welches eine Figur erhalten kann. Zur Ausf&uuml;hrung des Kommandos wird die Anweisung in mehrere Aktionen unterteilt, die hintereinander ausgef&uuml;hrt werden.
+ */
+class Command {
+/**
+ * Public stuff
+ */
+public:
+	/**
+	 * Fields
+	 */
+	/**
+	 * Constructors
+	 */
+	/**
+	 * \fn Command(CommandType type, float goal_coordinate_x, float goal_coordinate_y, int goal_object_id)
+	 * \brief Konstruktor
+	 * \param type initialisiert den Typ des Kommandos
+	 * \param goal_coordinate_x initialisiert die x-Koordinate des Zielpunkts
+	 * \param goal_coordinate_y initialisiert die y-Koordinate des Zielpunkts
+	 * \param goal_object_id initialisiert ID des Zielobjekts
+	 * Legt ein neues Command Objekt an
+	 */
+	Command(Action::ActionType type, float goal_coordinate_x, float goal_coordinate_y, int goal_object_id)
+	{
+		m_type = type;
+		m_goal_coordinate_x= goal_coordinate_x;
+		m_goal_coordinate_y = goal_coordinate_y;
+		m_goal_object_id= goal_object_id;
+	
+	}
+
+	/**
+	 * \fn Command()
+	 * \brief Legt ein leeres Kommando an
+	 */
+	Command()
+	{
+		m_type = Action::NOACTION;
+	}
+	
+	/**
+	 * Fields
+	 */
+	/**
+	 * \var m_type
+	 * \brief Typ des Kommandos
+	 */
+	 Action::ActionType m_type;
+	 
+	/**
+	 * \var m_goal_coordinate_x
+	 * \brief x-Koordinate des Zieles
+	 */
+	float m_goal_coordinate_x;
+	/**
+	 * \var m_goal_coordinate_y
+	 * \brief y-Koordinate des Zieles
+	 */
+	float m_goal_coordinate_y;
+	/**
+	 * \var m_goal_object_id
+	 * \brief ID des Zielobjekts
+	 */
+	int  m_goal_object_id;
+	
+	/**
+	 * \var float m_range
+	 * \brief Reichweite der Aktion
+	 */
+	float m_range;
+	
+	/**
+	 * \var m_damage_mult;
+	 * \brief Multiplikator auf den Schaden der die Aktion abschließt
+	 */
+	float m_damage_mult;
+	
+	/**
+	 * Constructors
+	 */
+	/**
+	 * Accessor Methods
+	 */
+	/**
+	 * Operations
+	 */
+};
+#endif //COMMAND_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/constants.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,71 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf, Michael Kempf, Daniel Erler
+
+	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.
+*/
+/**
+ * \file constants.h
+ * \defgroup Constants \ Konstanten
+ * \brief Stellt globale Konstanten zur Verf&uuml;gung
+ * \author Hans Wulf, Michael Kempf, Daniel Erler
+ * \version 1.0
+ * \date 2007/05/28
+ * \note Beinhaltet etliche Defines und einige Enums, wie ActionType oder Mode ...
+ */
+
+#ifndef CONSTANTS_H
+#define CONSTANTS_H
+
+//Konstantendefinitionen
+	//allgemeine Konstanten ohne Kategorie
+	/**
+	 * \def EPSILON
+	 * \brief Konstante fuer Maschinengenauigkeit
+	 */
+	#define EPSILON 0.00001
+	
+	
+
+	
+	
+
+	//Konstanten mit Bezug zur Stadt
+	/**
+	 * \def TOWN_RADIUS
+	 * \brief Konstante die angibt, in welchem Abstand um das Stadtzentrum das Gebiet als Stadt gilt
+	 */
+	#define TOWN_RADIUS 6
+
+	
+	/**
+	 * \enum Mode
+	 * \brief Beschreibt den Modus, in dem sich ein Spieler befindet
+	 */
+	enum Mode {MODE_AGRESSIVE, MODE_DEFENSIVE};
+	
+	/**
+	 * \enum ItemLocationType
+	 * \brief Beschreibt den Standort eines Items im Handelsfenster 
+	 */
+	enum ItemLocationType {PLAYER_INVENTORY, PLAYER_OFFER, TRADER_INVENTORY, TRADER_OFFER};
+	
+	/**
+	 * \enum NotebookTab
+	 * \brief Beschreibt die Registerkarte der GUI
+	 */
+	enum NotebookTab {TAB_FIELD=0, TAB_CHARACTER, TAB_INVENTORY, TAB_TRADE};
+
+#endif //CONSTANTS_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/creature.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,3839 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf, Chris Drechsler, Daniel Erler
+
+	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.
+*/
+#include "creature.h"
+#include <sys/time.h>
+
+//Constructors/Destructors
+Creature::Creature(World* world, unsigned int id) : ServerWObject(world, id)
+{
+	if (!Creature::init())
+	{
+		DEBUG("Creature::init() hat false zurückgeliefert");
+	}
+}
+
+
+Creature::~Creature()
+{
+	if (m_small_path_info)
+	{
+		// Wegfindeinformationen fuer kleine Lebewesen loeschen
+		delete m_small_path_info;
+	}
+
+	if (m_medium_path_info)
+	{
+		// Wegfindeinformationen fuer mittelgrosse Lebewesen loeschen
+		delete m_medium_path_info;
+	}
+
+	if (m_big_path_info)
+	{
+		// Wegfindeinformationen fuer grosse Lebewesen loeschen
+		delete m_big_path_info;
+	}
+
+	if (m_small_flying_path_info)
+	{
+		// Wegfindeinformationen fuer kleine fliegende Lebewesen loeschen
+		delete m_small_flying_path_info;
+	}
+
+	if (m_path_info)
+	{
+		// eigene Wegfindeinformationen loeschen
+		delete m_path_info;
+	}
+
+
+}
+
+//Methods
+bool Creature::init()
+ {
+	 DEBUG5("Creature::init");
+
+	bool tmp=true;
+	// eigene Initialisierung
+
+	// keine Aktion/Kommando
+	m_action.m_type = Action::NOACTION;
+	m_command.m_type = Action::NOACTION;
+	m_command.m_damage_mult=1;
+	m_next_command.m_type = Action::NOACTION;
+
+	m_trade_id=0;
+
+	// Bewegung auf 0 setzen
+	getMoveInfo()->m_speed_x=0;
+	getMoveInfo()->m_speed_y=0;
+
+	// Wegfindeinformationen auf 0 setzen
+	m_small_path_info=0;
+	m_small_flying_path_info=0;
+	m_medium_path_info=0;
+	m_big_path_info=0;
+	m_path_info=0;
+
+	// Timer nullen
+	m_timer1 =0;
+	m_timer2 =0;
+
+	m_dyn_attr.m_last_attacker_id=0;
+	m_dyn_attr. m_experience=0;
+
+	// Statusmods auf null setzen
+	int i;
+	for (i=0;i<NR_STATUS_MODS;i++)
+	{
+		m_dyn_attr.m_status_mod_time[i]=0;
+		m_dyn_attr.m_status_mod_immune_time[i]=0;
+
+	}
+	m_dyn_attr.m_temp_mods.clear();
+
+	for (i=0;i<NR_EFFECTS;i++)
+	{
+		m_dyn_attr.m_effect_time[i]=0;
+	}
+
+	setState(STATE_ACTIVE);
+
+	//Lebenspunkts auf 1 (debugging)
+	m_dyn_attr.m_health = 1;
+
+	return tmp;
+}
+
+bool Creature::destroy()
+{
+	// Wenn Spieler geloescht wird, automatisch Handel abbrechen
+	if (getTradeId() !=0)
+	{
+		Trade* trade = getWorld()->getTrade(getTradeId());
+
+		// eigene Position bei dem Handel bestimmen
+		int idx = trade->getPlayerIndex(getId());
+
+		// Wenn der Handel nicht existiert Fehler ausgeben
+		if (trade == 0 || idx ==-1)
+		{
+			setTradeId(0);
+		}
+		else
+		{
+			trade->abortTrade();
+		}
+	}
+
+	DEBUG("destroy");
+
+	ServerWObject::destroy();
+    return true;
+}
+
+
+void Creature::die()
+{
+
+	// eigenen Status auf sterbend STATE_DIEING setzen
+	getRegion()->changeObjectGroup(this,DEAD);
+	setState(STATE_DIEING);
+	m_action.m_type =Action::DIE;
+	DEBUG5("object died: %p",this);
+	m_action.m_time =1000;
+	m_action.m_elapsed_time =0;
+}
+
+void Creature::initAction()
+{
+	//wenn Idle Animation schon laeuft, laufen lassen
+	if (m_action.m_type== Action::NOACTION && m_action.m_elapsed_time>0)
+	{
+		return;
+
+	}
+	DEBUG5("init Action %i", m_action.m_type);
+
+
+	m_action.m_elapsed_time = 0;
+	Action::ActionInfo* aci = Action::getActionInfo(m_action.m_type);
+
+	//Timer und Timerlaufzeit ermitteln
+	int timer =aci->m_timer_nr;
+	float time = aci->m_timer;
+
+	DEBUG4("timer nr %i",timer);
+
+	// Faehigkeit Ausdauer
+	if (checkAbility(Action::ENDURANCE) && timer ==1)
+	{
+		DEBUG5("ausdauer");
+		// Timerlaufzeit um 15% verringern
+		time *= 0.85;
+	}
+
+
+	// Testen ob der benoetigte Timer frei ist
+	// Wenn der benoetigte Timer noch laeuft wird die Basisaktion ausgefuehrt
+	if (timer==1)
+	{
+		if (m_timer1==0)
+		{
+			// Timer ist frei, Timer starten
+			m_timer1 = time;
+			m_timer1_max = time;
+		}
+		else
+		{
+			// Timer laeuft noch, Basisaktion verwenden
+			m_action.m_type = aci->m_base_action;
+			aci = Action::getActionInfo(m_action.m_type);
+
+		}
+	}
+	else if (timer==2)
+	{
+		if (m_timer2==0)
+		{
+			// Timer ist frei, Timer starten
+			m_timer2 = time;
+			m_timer2_max = time;
+		}
+		else
+		{
+			// Timer laeuft noch, Basisaktion verwenden
+			m_action.m_type = aci->m_base_action;
+			aci = Action::getActionInfo(m_action.m_type);
+		}
+	}
+
+	// Stumm behandeln
+	if (m_dyn_attr.m_status_mod_time[Damage::MUTE]>0 )
+	{
+				// Wenn die Aktion durch Stumm beeinfluss wird
+		if (aci->m_flags & Action::MUTE_AFFECTED)
+		{
+					// Basisaktion verwenden
+			m_action.m_type = aci->m_base_action;
+			DEBUG("using Base Action due to mute");
+		}
+	}
+
+	// setzen der Standarddauer der Aktion
+	m_action.m_time = aci->m_standard_time;
+
+	Action::ActionType baseact = Action::getActionInfo(m_action.m_type)->m_base_action;
+
+	// Zeit der Aktion modifizieren
+	if (baseact == Action::WALK)
+	{
+			// Bei Aktion laufen die Laufgeschwindigkeit einrechnen
+			m_action.m_time = 1000000 / getBaseAttrMod()->m_walk_speed;
+			getMoveInfo()->m_speed_x *= getBaseAttr()->m_step_length/m_action.m_time;
+			getMoveInfo()->m_speed_y *= getBaseAttr()->m_step_length/m_action.m_time;
+
+			//collisionDetection(m_action.m_time);
+
+			DEBUG5("walk time %f walk speed %i",m_action.m_time,getBaseAttrMod()->m_walk_speed);
+			DEBUG5("speed %f %f",getMoveInfo()->m_speed_x,getMoveInfo()->m_speed_y);
+	}
+	else
+	{
+		getMoveInfo()->m_speed_x=0;
+		getMoveInfo()->m_speed_y=0;
+	}
+
+
+
+	// Fuer Aktionen die auf physischen Angriffen beruhen sowie fuer den normalen Magieangriff Waffengeschwindigkeit einrechnen
+	if (baseact == Action::ATTACK || baseact == Action::RANGE_ATTACK || baseact == Action::HOLY_ATTACK || m_action.m_type == Action::MAGIC_ATTACK)
+	{
+		float atksp = getBaseAttrMod()->m_attack_speed;
+
+
+		m_action.m_time *= 1000000/atksp;
+
+	}
+	else if (baseact != Action::WALK)
+	{
+		m_action.m_time = aci->m_standard_time;
+
+	}
+
+	DEBUG5("resulting time %f",m_action.m_time);
+	// Drehwinkel setzen
+	if (aci->m_distance != Action::SELF)
+	{
+		float x = getGeometry()->m_shape.m_coordinate_x;
+		float y = getGeometry()->m_shape.m_coordinate_y;
+		float goalx =  m_action.m_goal_coordinate_x;
+		float goaly =  m_action.m_goal_coordinate_y;
+
+		getGeometry()->m_angle = atan2(goaly-y,goalx-x);
+
+	}
+	if (baseact == Action::WALK)
+	{
+		getGeometry()->m_angle = atan2(getMoveInfo()->m_speed_y,getMoveInfo()->m_speed_x);
+
+	}
+
+	// Daten fuer die Animation setzen
+	m_action.m_action_equip = getActionEquip();
+	m_action.m_animation_number = Random::randi(120);
+
+	// Besondere Initialisierungen
+
+	if ( m_action.m_type== Action::TRADE)
+	{
+	}
+
+}
+
+void Creature::performAction(float &time)
+{
+	// Wenn Idle Aktion ausgefuehrt wird, aber ein Kommando vorliegt, IdleAktion sofort beenden
+	if (m_action.m_type == Action::NOACTION && m_command.m_type != Action::NOACTION)
+	{
+		return;
+	}
+
+	// Reziprokes des Ausfuehrungszeit
+	float rezt = 1/m_action.m_time;
+
+	// Prozentsatz der Ausfuehrung vor und nach dem Zeitquantum
+	float p1 = rezt * m_action.m_elapsed_time,p2;
+
+	// Zeitdauer die die aktuelle Aktion tatsaechlich ausgefuehrt wird
+	float dtime;
+
+	// true, wenn die aktuelle Aktion beendet wird
+	bool finish = false;
+
+	// Extrabehandlung von Trade (Zeitunabhängig)
+	if (m_action.m_type == Action::TRADE)
+	{
+		time=0;
+	}
+
+	// Testen ob man die Aktion abschließen kann
+	if (time >= m_action.m_time-m_action.m_elapsed_time)
+	{
+		// Aktion wird abgeschlossen
+		p2=1;
+		dtime = m_action.m_time-m_action.m_elapsed_time;
+		time -= dtime;
+		finish = true;
+
+	}
+	else
+	{
+		// Aktion wird nicht abgeschlossen
+		m_action.m_elapsed_time += time;
+		dtime =time;
+		time=0;
+		p2 = rezt * m_action.m_elapsed_time;
+	}
+
+	DEBUG5("perform Action %i for %f msec, %f / %f done", m_action.m_type,dtime,m_action.m_elapsed_time,m_action.m_time);
+
+
+	//Behandlung des Laufens
+	if (m_action.m_type == Action::WALK)
+	{
+
+		// Kollisionen behandeln
+		collisionDetection(dtime);
+
+		// neue Koordinaten ausrechnen
+		float xnew = getGeometry()->m_shape.m_coordinate_x+getMoveInfo()->m_speed_x * dtime;
+		float ynew = getGeometry()->m_shape.m_coordinate_y+getMoveInfo()->m_speed_y * dtime;
+
+		DEBUG5("new coord %f %f",xnew,ynew);
+		// Bewegung ausfuehren
+		moveTo(xnew,ynew);
+
+	}
+
+
+
+	// Behandlung der Wirkung der Aktion
+
+	// Prozentsatz bei dessen Erreichen die Wirkung der Aktion berechnet wird
+	float pct = Action::getActionInfo(m_action.m_type)->m_critical_perc;
+
+	// Triple Shot
+	if (m_action.m_type == Action::TRIPLE_SHOT || m_action.m_type == Action::GUIDED_TRIPLE_SHOT)
+	{
+		// Faehigkeit hat drei Prozentsaetze
+		if (p1>0.3)
+			pct = 0.6;
+		if (p1>0.6)
+			pct = 0.9;
+	}
+
+	// Testen ob der kritische Prozentsatz durch das aktuelle Zeitquantum ueberschritten wurde
+	if (p1<pct && pct <=p2)
+	{
+		DEBUG5("critical point %f %f %f",p1,pct,p2);
+
+		// Zielobjekt der Aktion
+		ServerWObject* goal =0;
+
+		float goalx =  m_action.m_goal_coordinate_x;
+		float goaly =  m_action.m_goal_coordinate_y;
+
+		// Statusmod blind behandeln
+		// TODO: aktuell wird die Richtung beim austeilen des Schadens ausgewuerfelt
+		// besser waere es, sie beim starten der Aktion auszuwuerfeln
+		if (m_dyn_attr.m_status_mod_time[Damage::BLIND]>0)
+		{
+			// Ziehe Kreis um die eigentlichen Zielkoordinaten der Aktion
+			// Durchmesser = halber Abstand zum Zielpunkt
+			// Waehle in dem Kreis einen Punkt der der neue Zielpunkt wird
+			// konkretes Objekt kann nicht Ziel der Aktion sein
+			m_action.m_goal_object_id =0;
+			float dir[2];
+			dir[0] = goalx - getGeometry()->m_shape.m_coordinate_x;
+			dir[1] = goaly - getGeometry()->m_shape.m_coordinate_y;
+			float d = sqrt(sqr(dir[0])+sqr(dir[1]));
+			float r = 0.5*d;
+			float dx = r, dy =r;
+			while (sqr(r)<sqr(dx)+sqr(dy))
+			{
+				dx = r-2*r*rand()*1.0/RAND_MAX;
+				dy = r-2*r*rand()*1.0/RAND_MAX;
+			}
+			goalx += dx;
+			goaly += dy;
+
+
+		}
+
+		// Zielobjekt ermitteln
+		if (m_action.m_goal_object_id!=0 && m_action.m_type!= Action::TAKE_ITEM)
+		{
+			// Zielobjekt durch ID gegeben, Objekt von der Welt holen
+			goal = getWorld()->getSWObject(m_action.m_goal_object_id,getGridLocation()->m_region);
+		}
+		else
+		{
+			// Kein Zielobjekt per ID gegeben
+			DEBUG5("no Goal ID!");
+			// Im Falle von Nahkampf Ziel anhand des Zielpunktes suchen
+			if (Action::getActionInfo(m_action.m_type)->m_distance == Action::MELEE && m_action.m_type!= Action::TAKE_ITEM)
+			{
+				DEBUG5("Searching goal %f %f",goalx,goaly);
+				goal = getWorld()->getSWObjectAt(goalx,goaly,getGridLocation()->m_region,Geometry::LAYER_AIR);
+				DEBUG5("got object %p",goal);
+			}
+		}
+
+
+
+
+		// Zielobjekt als Creature* pointer
+		Creature* cgoal=0;
+
+		// Zielobjekt im Nahkampf suchen an der Stelle an der die Waffe trifft
+		if (goal ==0 && Action::getActionInfo(m_action.m_type)->m_distance == Action::MELEE && m_action.m_type!= Action::TAKE_ITEM)
+		{
+			goal = getWorld()->getSWObjectAt(goalx,goaly,getGridLocation()->m_region,Geometry::LAYER_AIR);
+		}
+
+		// Wenn ein Zielobjekt existiert
+		if (goal !=0)
+		{
+			if (goal->getTypeInfo()->m_type == TypeInfo::TYPE_FIXED_OBJECT)
+			{
+				cgoal =0;
+				// Ziel existiert nicht mehr, evtl abbrechen
+			}
+			else
+			{
+				// umwandeln in Creature* Pointer
+				cgoal = (Creature*) goal;
+				// anpassen des Zielpunktes
+				goalx = cgoal->getGeometry()->m_shape.m_coordinate_x;
+				goaly = cgoal->getGeometry()->m_shape.m_coordinate_y;
+
+				DEBUG5("goal object %p",cgoal);
+			}
+		}
+
+		// ausfuehren des kritischen Teiles der Aktion
+		performActionCritPart(goalx, goaly, goal);
+
+	}
+
+	// Wenn die Aktion beenden wurde evtl Kommando abschließen
+	if (finish)
+	{
+		DEBUG5("finished action");
+		if (m_action.m_type != Action::WALK)
+			m_action.m_prev_type = m_action.m_type;
+
+		DEBUG5("distance to goal %f",sqr(m_command.m_goal_coordinate_x -getGeometry()->m_shape.m_coordinate_x) +  sqr(m_command.m_goal_coordinate_y -getGeometry()->m_shape.m_coordinate_y));
+
+		// Kommando ist beendet wenn die gleichnamige Aktion beendet wurde
+		// Ausnahme: Bewegungskommando ist beendet wenn das Ziel erreicht ist
+		if (m_action.m_type == m_command.m_type && m_action.m_type != Action::WALK ||
+				  m_action.m_type == Action::WALK && sqr(getGeometry()->m_shape.m_radius) > sqr(m_command.m_goal_coordinate_x -getGeometry()->m_shape.m_coordinate_x) +  sqr(m_command.m_goal_coordinate_y -getGeometry()->m_shape.m_coordinate_y) && !(m_command.m_type == Action::CHARGE || m_command.m_type == Action::STORM_CHARGE))
+		{
+			DEBUG5("finished command");
+			m_command.m_type = Action::NOACTION;
+			m_action.m_elapsed_time=0;
+			m_command.m_damage_mult = 1;
+
+			// Schaden neu berechnen
+			recalcDamage();
+		}
+
+		// Aktion ist beendet
+		m_action.m_type = Action::NOACTION;
+		m_action.m_elapsed_time =0;
+	}
+
+
+
+
+}
+
+void Creature::performActionCritPart(float goalx, float goaly, ServerWObject* goal)
+{
+	// Zielobjekt als Creature* pointer
+	// null, wenn das Objekt kein Lebewesen ist
+	Creature* cgoal =0;
+	if (goal!=0 && goal->getTypeInfo()->m_type == TypeInfo::TYPE_FIXED_OBJECT)
+	{
+		cgoal =0;
+	}
+	else
+	{
+		cgoal = (Creature*) goal;
+	}
+
+    //	Action::ActionType baseact = Action::getActionInfo(m_action.m_type)->m_base_action;
+
+	// Wenn die Aktion auf Nahkampf beruht Schaden an das Zielobjekt austeilen
+	// Ausname: Rundumschlag
+	if (Action::getActionInfo(m_action.m_type)->m_distance == Action::MELEE)
+	{
+		if (cgoal && m_action.m_type!=Action::AROUND_BLOW &&  m_action.m_type!=Action::WHIRL_BLOW)
+			cgoal->takeDamage(&m_damage);
+	}
+
+
+
+	list<ServerWObject*> res;
+	res.clear();
+	list<ServerWObject*>::iterator it;
+
+	// Koordinaten das ausfuehrenden Objektes
+	float x = getGeometry()->m_shape.m_coordinate_x;
+	float y = getGeometry()->m_shape.m_coordinate_y;
+
+	// Form, wird initialisiert mit der Form des Ausfuehrenden
+	Shape s;
+	s.m_coordinate_x = x;
+	s.m_coordinate_y = y;
+	s.m_type = Shape::CIRCLE;
+	s.m_radius = getGeometry()->m_shape.m_radius;
+
+	short reg = getGridLocation()->m_region;
+	Creature* cr =0;
+
+	// Struktur fuer Basisattributmods, initialisiert mit Nullen
+	CreatureBaseAttrMod cbam;
+
+	DmgProjectile* pr =0;
+
+	// Struktur fuer Modifikationen der dyn. Attribute, initialisiert mit Nullen
+	CreatureDynAttrMod cdam;
+
+
+	// Daten fuer Geschosse: Zielrichtung und Startpunkt
+	float dir[2],dir2[2];
+	dir[0] = goalx - getGeometry()->m_shape.m_coordinate_x;
+	dir[1] = goaly - getGeometry()->m_shape.m_coordinate_y;
+	float d = sqr(dir[0])+sqr(dir[1]);
+
+	// Startpunkt fuer Geschosse
+	// aeusserer Rand des Ausfuehrenden plus 5%
+	float sy,sx;
+	TypeInfo::Fraction fr = getTypeInfo()->m_fraction;
+	int i;
+	if (d>0)
+	{
+		d= 1/sqrt(d);
+		dir[0] *=d;
+		dir[1] *=d;
+		sx = x+dir[0] * 1.05 * s.m_radius;
+		sy = y+dir[1] * 1.05 * s.m_radius;
+	}
+
+	// Standardtyp fuer Pfeile festlegen
+	Projectile::ProjectileType arrow = Projectile::ARROW;
+
+	//Faehigkeit Windpfeile
+	if (m_base_attr_mod.m_special_flags & WIND_ARROWS)
+		arrow = Projectile::WIND_ARROW;
+
+	// Faehigkeit Eispfeile
+	if (m_base_attr_mod.m_special_flags & ICE_ARROWS)
+		arrow = Projectile::ICE_ARROW;
+
+
+		// Behandlung der Wirkung der Aktion nach Aktionstyp
+	switch(m_action.m_type)
+	{
+		case Action::USE:
+			if (cgoal)
+				goal->reactOnUse(getId());
+			break;
+
+		// Kriegerfaehigkeiten
+		case Action::HAMMER_BASH:
+			// alle Lebewesen im Umkreis von 1.5 um den Zielpunkt auswaehlen
+			m_damage.m_multiplier[Damage::PHYSICAL]=1;
+			s.m_coordinate_x = goalx;
+			s.m_coordinate_y = goaly;
+			s.m_radius = 1.5;
+			getWorld()->getSWObjectsInShape(&s,reg, &res,Geometry::LAYER_AIR,CREATURE,this);
+
+			// an alle einfachen Schaden austeilen
+			for (it=res.begin();it!=res.end();++it)
+			{
+				if ((*it)->getTypeInfo()->m_type != TypeInfo::TYPE_FIXED_OBJECT)
+				{
+					cr = (Creature*) (*it);
+					cr->takeDamage(&m_damage);
+
+				}
+			}
+			break;
+
+		case Action::AROUND_BLOW:
+		case Action::WHIRL_BLOW:
+			// alle Lebewesen im Umkreis um den Ausfuehrenden auswaehlen
+			// Radius gleich Waffenreichweite
+			s.m_radius += m_command.m_range;
+			getWorld()->getSWObjectsInShape(&s, reg, &res,Geometry::LAYER_AIR,CREATURE,this);
+
+			// an alle Schaden austeilen
+			for (it=res.begin();it!=res.end();++it)
+			{
+				if ((*it)->getTypeInfo()->m_type != TypeInfo::TYPE_FIXED_OBJECT)
+				{
+					cr = (Creature*) (*it);
+					cr->takeDamage(&m_damage);
+
+				}
+			}
+			break;
+
+		case Action::FLAMESWORD:
+			// Modifikationen:
+			// Flags fuer 120 sec
+			cbam.m_time =120000;
+			cbam.m_xspecial_flags |= (FLAMESWORD | FIRESWORD);
+			applyBaseAttrMod(&cbam);
+			break;
+
+		case Action::FIRESWORD:
+			// Modifikationen:
+			// Flag fuer 60 sec
+			cbam.m_time =60000;
+			cbam.m_xspecial_flags |=  FIRESWORD;
+			applyBaseAttrMod(&cbam);
+			break;
+
+		case Action::FLAMEARMOR:
+			// Modifikationen:
+			// Flag, 50% Feuerres,25% Feuermaxres fuer 60 sec
+			cbam.m_time = 100000;
+			cbam.m_xspecial_flags |= FLAMEARMOR;
+			cbam.m_dresistances_cap[Damage::FIRE] = 25;
+			cbam.m_dresistances[Damage::FIRE] = 50;
+			applyBaseAttrMod(&cbam);
+			break;
+
+		case Action::REGENERATE:
+			// 50% der Lebenspunkte wieder auffuellen
+			m_dyn_attr.m_health = std::min(m_dyn_attr.m_health+0.5f*m_base_attr_mod.m_max_health,m_base_attr_mod.m_max_health);
+			break;
+
+		case Action::ANGER:
+			// Modifikationen:
+			// doppelte Staerke, halbierte Ruestung, Berserker fuer 30 sec
+			cbam.m_time = 40000;
+			cbam.m_dstrength =m_base_attr.m_strength;
+			cbam.m_darmor = -m_base_attr_mod.m_armor /2;
+			applyBaseAttrMod(&cbam);
+			m_dyn_attr.m_status_mod_time[Damage::BERSERK] = 30000;
+			break;
+
+		case Action::FURY:
+			// Modifikationen:
+			// doppelte Staerke, -25% Ruestung, Berserker, erhoehte Angriffsgeschwindigkeit fuer 80 sec
+			cbam.m_time = 40000;
+			cbam.m_dstrength =m_base_attr.m_strength;
+			cbam.m_darmor = -m_base_attr_mod.m_armor /4;
+			cbam.m_dattack_speed = 1000;
+			applyBaseAttrMod(&cbam);
+			m_dyn_attr.m_status_mod_time[Damage::BERSERK] = 30000;
+			break;
+
+		// Magierfaehigkeiten
+		case Action::MAGIC_ATTACK:
+			// Projektil magischer Pfeil erzeugen
+			pr = new DmgProjectile(getWorld(),Projectile::MAGIC_ARROW,fr, getWorld()->getValidProjectileId());
+			memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+			pr->setSpeedX(dir[0]/70);
+			pr->setSpeedY(dir[1]/70);
+			getWorld()->insertProjectile(pr,sx,sy,reg);
+			break;
+
+		case Action::FIRE_BOLT:
+		case Action::FIRE_STRIKE:
+			// Projektil Feuerblitz erzeugen
+			pr = new DmgProjectile(getWorld(),Projectile::FIRE_BOLT,fr, getWorld()->getValidProjectileId());
+			memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+			pr->setSpeedX(dir[0]/70);
+			pr->setSpeedY(dir[1]/70);
+			getWorld()->insertProjectile(pr,sx,sy,reg);
+			break;
+
+		case Action::FIRE_BALL:
+		case Action::INFERNO_BALL:
+			// Projektil Feuerball erzeugen
+			pr = new DmgProjectile(getWorld(),Projectile::FIRE_BALL,fr, getWorld()->getValidProjectileId());
+			memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+			pr->setSpeedX(dir[0]/70);
+			pr->setSpeedY(dir[1]/70);
+			getWorld()->insertProjectile(pr,sx,sy,reg);
+			break;
+
+		case Action::FIRE_WAVE:
+		case Action::FIRE_STORM:
+			// Projektil Feuerwelle erzeugen
+			pr = new DmgProjectile(getWorld(),Projectile::FIRE_WAVE,fr, getWorld()->getValidProjectileId());
+			memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+			getWorld()->insertProjectile(pr,x,y,reg);
+			break;
+
+		case Action::FIRE_WALL:
+			// Projektil Feuersaeule erzeugen
+			pr = new DmgProjectile(getWorld(),Projectile::FIRE_WALL,fr, getWorld()->getValidProjectileId());
+			memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+			getWorld()->insertProjectile(pr,goalx,goaly,reg);
+			break;
+
+		case Action::ICE_BOLT:
+		case Action::ICE_SPIKE:
+			// Projektil Eisblitz erzeugen
+			pr = new DmgProjectile(getWorld(),Projectile::ICE_BOLT,fr, getWorld()->getValidProjectileId());
+			memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+			pr->setSpeedX(dir[0]/70);
+			pr->setSpeedY(dir[1]/70);
+			getWorld()->insertProjectile(pr,sx,sy,reg);
+			break;
+
+		case Action::SNOW_STORM:
+		case Action::BLIZZARD:
+			// Projektil Blizzard erzeugen
+			pr = new DmgProjectile(getWorld(),Projectile::BLIZZARD,fr, getWorld()->getValidProjectileId());
+			memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+			getWorld()->insertProjectile(pr,goalx,goaly,reg);
+			break;
+
+		case Action::ICE_RING:
+		case Action::FROST_RING:
+			// Projektil Eisring erzeugen
+			pr = new DmgProjectile(getWorld(),Projectile::ICE_RING,fr, getWorld()->getValidProjectileId());
+			memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+			getWorld()->insertProjectile(pr,x,y,reg);
+			break;
+
+		case Action::FREEZE:
+			// Projektil Einfrieren erzeugen
+			pr = new DmgProjectile(getWorld(),Projectile::FREEZE,fr, getWorld()->getValidProjectileId());
+			memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+			getWorld()->insertProjectile(pr,goalx,goaly,reg);
+			break;
+
+		case Action::LIGHTNING:
+		case Action::LIGHTNING_STRIKE:
+			// Projektil Blitz erzeugen
+			pr = new DmgProjectile(getWorld(),Projectile::LIGHTNING,fr, getWorld()->getValidProjectileId());
+			memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+			getWorld()->insertProjectile(pr,goalx,goaly,reg);
+			break;
+
+		case Action::THUNDERSTORM:
+		case Action::THUNDERSTORM2:
+			// Projektil Gewitter erzeugen
+			pr = new DmgProjectile(getWorld(),Projectile::THUNDERSTORM,fr, getWorld()->getValidProjectileId());
+			memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+			getWorld()->insertProjectile(pr,goalx,goaly,reg);
+			break;
+
+		case Action::CHAIN_LIGHTNING:
+		case Action::CHAIN_LIGHTNING2:
+			// Projektil Kettenblitz erzeugen
+			pr = new DmgProjectile(getWorld(),Projectile::CHAIN_LIGHTNING,fr, getWorld()->getValidProjectileId());
+			memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+			if (m_action.m_type == Action::CHAIN_LIGHTNING2)
+			{
+				// Verbesserte Version springt noch viermal extra, daher einfach bei -4 anfangen zu zaehlen
+				pr->setCounter(-4);
+			}
+			pr->setSpeedX(dir[0]/50);
+			pr->setSpeedY(dir[1]/50);
+			getWorld()->insertProjectile(pr,sx,sy,reg);
+			break;
+
+		case Action::STATIC_SHIELD:
+			// Modifikation:
+			// Flag fuer 18 Sekunden
+			cbam.m_time =18000;
+			cbam.m_xspecial_flags |= (STATIC_SHIELD);
+			applyBaseAttrMod(&cbam);
+			break;
+
+		// Schuetze Faehigkeiten
+		case Action::RANGE_ATTACK:
+		case Action::TRIPLE_SHOT:
+		case Action::WEAK_POINT:
+		case Action::BLIND_RAGE:
+			// Projektil Pfeil erzeugen
+			pr = new DmgProjectile(getWorld(),arrow,fr, getWorld()->getValidProjectileId());
+			memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+			pr->setSpeedX(dir[0]/80);
+			pr->setSpeedY(dir[1]/80);
+			getWorld()->insertProjectile(pr,sx,sy,reg);
+			break;
+
+		case Action::GUIDED_TRIPLE_SHOT:
+			// Projektil gelenkter Pfeil erzeugen
+			pr = new DmgProjectile(getWorld(),Projectile::GUIDED_ARROW,fr, getWorld()->getValidProjectileId());
+			memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+			pr->setSpeedX(dir[0]/100);
+			pr->setSpeedY(dir[1]/100);
+			if (cgoal!=0)
+			{
+				DEBUG5("has goal");
+				pr->setGoalObject(cgoal->getId());
+			}
+			getWorld()->insertProjectile(pr,sx,sy,reg);
+			break;
+
+		case Action::MULTISHOT:
+			// 5 Pfeile erzeugen
+			// mittlerer Pfeil erhaelt die Zielrichtung
+			for (i=-2;i<=2;i++)
+			{
+				dir2[0] = dir[0] + i*0.2*dir[1];
+				dir2[1] = dir[1] - i*0.2*dir[0];
+				d= 1/sqrt(sqr(dir2[0])+sqr(dir2[1]));
+				dir2[0] *=d;
+				dir2[1] *=d;
+
+				sx = x+dir2[0] * 1.05 * s.m_radius;
+				sy = y+dir2[1] * 1.05 * s.m_radius;
+				pr = new DmgProjectile(getWorld(),arrow,fr, getWorld()->getValidProjectileId());
+				memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+				pr->setSpeedX(dir2[0]/80);
+				pr->setSpeedY(dir2[1]/80);
+				getWorld()->insertProjectile(pr,sx,sy,reg);
+			}
+			break;
+
+		case Action::VOLLEY_SHOT:
+			// 7 Pfeile erzeugen
+			// mittlerer Pfeil erhaelt die Zielrichtung
+			for (i=-3;i<=3;i++)
+			{
+				dir2[0] = dir[0] + i*0.15*dir[1];
+				dir2[1] = dir[1] - i*0.15*dir[0];
+				d= 1/sqrt(sqr(dir2[0])+sqr(dir2[1]));
+				dir2[0] *=d;
+				dir2[1] *=d;
+
+				sx = x+dir2[0] * 1.05 * s.m_radius;
+				sy = y+dir2[1] * 1.05 * s.m_radius;
+				pr = new DmgProjectile(getWorld(),arrow,fr, getWorld()->getValidProjectileId());
+				memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+				pr->setSpeedX(dir2[0]/80);
+				pr->setSpeedY(dir2[1]/80);
+				getWorld()->insertProjectile(pr,sx,sy,reg);
+			}
+			break;
+
+		case Action::PIERCE:
+			// Projektil Pfeil erzeugen
+			pr = new DmgProjectile(getWorld(),arrow,fr, getWorld()->getValidProjectileId());
+			memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+			pr->setSpeedX(dir[0]/80);
+			pr->setSpeedY(dir[1]/80);
+			// Flag durchschlagend setzen
+			pr->setFlags(DmgProjectile::PIERCING);
+			getWorld()->insertProjectile(pr,sx,sy,reg);
+			break;
+
+		case Action::VACUUM:
+			// Projektil Windpfeil erzeugen
+			pr = new DmgProjectile(getWorld(),Projectile::WIND_ARROW,fr, getWorld()->getValidProjectileId());
+			memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+			pr->setSpeedX(dir[0]/80);
+			pr->setSpeedY(dir[1]/80);
+			getWorld()->insertProjectile(pr,sx,sy,reg);
+			break;
+
+		case Action::EXPLODING_ARROW:
+		case Action::EXPLOSION_CASCADE:
+			// Projektil Pfeil erzeugen
+			pr = new DmgProjectile(getWorld(),arrow,fr, getWorld()->getValidProjectileId());
+			memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+			pr->setSpeedX(dir[0]/80);
+			pr->setSpeedY(dir[1]/80);
+			// Flag explodierend setzen
+			pr->setFlags(DmgProjectile::EXPLODES);
+			// bei verbesserter Version Flag mehrfach explodierend setzen
+			if (m_action.m_type==Action::EXPLOSION_CASCADE)
+				pr->setFlags(DmgProjectile::MULTI_EXPLODES);
+			getWorld()->insertProjectile(pr,sx,sy,reg);
+			break;
+
+		case Action::DEATH_ROULETTE:
+			// Projektil Pfeil erzeugen
+			pr = new DmgProjectile(getWorld(),arrow,fr, getWorld()->getValidProjectileId());
+			memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+			pr->setSpeedX(dir[0]/80);
+			pr->setSpeedY(dir[1]/80);
+			// Maximale Anzahl der Spruenge
+			pr->setCounter(-20);
+			// Flag zufaellig weiterspringen setzen
+			pr->setFlags(DmgProjectile::PROB_BOUNCING);
+			getWorld()->insertProjectile(pr,sx,sy,reg);
+			break;
+
+		case Action::AIMED_SHOT:
+			// Modifikationen:
+			// 50% mehr Geschick fuer 50 sec
+			cbam.m_time = 50000;
+			cbam.m_ddexterity =m_base_attr.m_dexterity/2;
+			applyBaseAttrMod(&cbam);
+			break;
+
+		case Action::BOW_SPIRIT:
+			// Modifikationen
+			// 50% mehr Geschick, Flag fuer 50 sec
+			cbam.m_time = 50000;
+			cbam.m_ddexterity =m_base_attr.m_dexterity/2;
+			cbam.m_xspecial_flags |= CRIT_HITS;
+			applyBaseAttrMod(&cbam);
+			break;
+
+		case Action::ICE_ARROWS:
+			// Modifikationen:
+			// Flag fuer 80 sec
+			cbam.m_time = 80000;
+			cbam.m_xspecial_flags |= ICE_ARROWS;
+			applyBaseAttrMod(&cbam);
+			break;
+
+		case Action::FREEZING_ARROWS:
+			// Modifikationen:
+			// Flags fuer 80 sec
+			cbam.m_time = 80000;
+			cbam.m_xspecial_flags |= (ICE_ARROWS | FROST_ARROWS);
+			applyBaseAttrMod(&cbam);
+			break;
+
+		case Action::WIND_ARROWS:
+			// Modifikationen:
+			// Flag fuer 80 sec
+			cbam.m_time = 80000;
+			cbam.m_xspecial_flags |= WIND_ARROWS;
+			applyBaseAttrMod(&cbam);
+			break;
+
+		case Action::STORM_ARROWS:
+			// Modifikationen:
+			// Flags fuer 80 sec
+			cbam.m_time = 80000;
+			cbam.m_xspecial_flags |= (WIND_ARROWS | STORM_ARROWS);
+			applyBaseAttrMod(&cbam);
+			break;
+
+		case Action::WIND_WALK:
+			// Modifikationen:
+			// Flag, erhoehte Laufgeschwindigkeit fuer 25 sec
+			cbam.m_time = 25000;
+			cbam.m_xspecial_flags |= WIND_WALK;
+			cbam.m_dwalk_speed = 1500;
+			applyBaseAttrMod(&cbam);
+			break;
+
+		// Priester Faehigkeiten
+		case Action::HOLY_LIGHT:
+		case Action::HOLY_FIRE:
+			// Projektil Lichtstrahl erzeugen
+			pr = new DmgProjectile(getWorld(),Projectile::LIGHT_BEAM,fr, getWorld()->getValidProjectileId());
+			memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+			getWorld()->insertProjectile(pr,goalx,goaly,reg);
+			break;
+
+		case Action::BURNING_RAGE:
+			// Modifikationen:
+			// Flag fuer 80 sec
+			cbam.m_time =80000;
+			cbam.m_xspecial_flags |= BURNING_RAGE;
+
+			// alle Verbuendeten im Umkreis von 12 suchen und Modifikation anwenden
+			s.m_coordinate_x = x;
+			s.m_coordinate_y = y;
+			s.m_radius = 12;
+			getWorld()->getSWObjectsInShape(&s,reg, &res, Geometry::LAYER_AIR,CREATURE,0);
+			for (it=res.begin();it!=res.end();++it)
+			{
+				if (getWorld()->getRelation(fr,(*it)) == WorldObject::ALLIED)
+				{
+					if ((*it)->getTypeInfo()->m_type != TypeInfo::TYPE_FIXED_OBJECT)
+					{
+						cgoal = (Creature*) (*it);
+						cgoal->applyBaseAttrMod(&cbam);
+					}
+				}
+			}
+			break;
+
+		case Action::CURE_BLIND_MUTE:
+			// Modifikation:
+			// heilt blind/stumm (wirkt nur auf Verbuendete)
+			if (cgoal !=0)
+			{
+				cdam.m_dstatus_mod_immune_time[Damage::BLIND] = 1;
+				cdam.m_dstatus_mod_immune_time[Damage::MUTE] = 1;
+				if (getWorld()->getRelation(fr,cgoal) == WorldObject::ALLIED)
+				{
+					cgoal->applyDynAttrMod(&cdam);
+				}
+			}
+			break;
+
+		case Action::BLAZING_SHIELD:
+			// Modifikationen
+			// 50% der Willenskraft auf Blockwert fuer 60 sec
+			cbam.m_time =60000;
+			cbam.m_dblock = m_base_attr_mod.m_willpower /2;
+
+			// alle Verbuendeten im Umkreis von 12 suchen und Modifikation anwenden
+			s.m_coordinate_x = x;
+			s.m_coordinate_y = y;
+			s.m_radius = 12;
+			getWorld()->getSWObjectsInShape(&s, reg, &res,Geometry::LAYER_AIR,CREATURE,0);
+			for (it=res.begin();it!=res.end();++it)
+			{
+				if (getWorld()->getRelation(fr,(*it)) == WorldObject::ALLIED)
+				{
+					if ((*it)->getTypeInfo()->m_type != TypeInfo::TYPE_FIXED_OBJECT)
+					{
+						cgoal = (Creature*) (*it);
+						cgoal->applyBaseAttrMod(&cbam);
+					}
+				}
+			}
+			break;
+
+		case Action::CURE_BLIND_MUTE_PARTY:
+			// Modifikation:
+			// heilt blind/stumm, immunisiert fuer 30 sec (wirkt nur auf Verbuendete)
+			cdam.m_dstatus_mod_immune_time[Damage::BLIND] = 30000;
+			cdam.m_dstatus_mod_immune_time[Damage::MUTE] = 30000;
+
+			// alle Verbuendeten im Umkreis von 6 um den Zielpunkt suchen und Modifikation anwenden
+			s.m_coordinate_x = goalx;
+			s.m_coordinate_y = goaly;
+			s.m_radius = 6;
+			getWorld()->getSWObjectsInShape(&s, reg, &res,0);
+			for (it=res.begin();it!=res.end();++it)
+			{
+				if (getWorld()->getRelation(fr,(*it)) == WorldObject::ALLIED)
+				{
+					if ((*it)->getTypeInfo()->m_type != TypeInfo::TYPE_FIXED_OBJECT)
+					{
+						cgoal = (Creature*) (*it);
+						cgoal->applyDynAttrMod(&cdam);
+					}
+				}
+			}
+			break;
+
+		case Action::LIGHT_BEAM:
+			// Projektil Lichtstrahl erzeugen
+			pr = new DmgProjectile(getWorld(),Projectile::LIGHT_BEAM,fr, getWorld()->getValidProjectileId());
+			memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+			getWorld()->insertProjectile(pr,goalx,goaly,reg);
+			break;
+
+		case Action::BURNING_SUN:
+			// alle Lebewesen im Umkreis von 3 um den Zielpunkt suchen
+			s.m_coordinate_x = goalx;
+			s.m_coordinate_y = goaly;
+			s.m_radius = 3;
+			getWorld()->getSWObjectsInShape(&s, reg, &res,Geometry::LAYER_AIR,CREATURE,this);
+			for (it=res.begin();it!=res.end();++it)
+			{
+				if ((*it)->getTypeInfo()->m_type != TypeInfo::TYPE_FIXED_OBJECT)
+				{
+					// Projektil Lichtstrahl fuer jedes Objekt erzeugen
+					goalx = (*it)->getGeometry()->m_shape.m_coordinate_x;
+					goaly = (*it)->getGeometry()->m_shape.m_coordinate_y;
+					pr = new DmgProjectile(getWorld(),Projectile::LIGHT_BEAM,fr, getWorld()->getValidProjectileId());
+					memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+					getWorld()->insertProjectile(pr,goalx,goaly,reg);
+				}
+			}
+			break;
+
+		case Action::BREAK_BINDING:
+		case Action::DISRUPT_BINDING:
+			// Projektil Elementarzerstoerung erzeugen
+			pr = new DmgProjectile(getWorld(),Projectile::ELEM_EXPLOSION,fr, getWorld()->getValidProjectileId());
+			memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+			getWorld()->insertProjectile(pr,goalx,goaly,reg);
+			break;
+
+		case Action::MAGIC_SHIELD:
+			// Modifikation:
+			// 50% mehr Willenskraft fuer 90 sec
+			cbam.m_time =90000;
+			cbam.m_dwillpower = m_base_attr_mod.m_willpower /2;
+
+			// alle Verbuendeten im Umkreis von 12 suchen und Modifikation anwenden
+			s.m_coordinate_x = x;
+			s.m_coordinate_y = y;
+			s.m_radius = 12;
+			getWorld()->getSWObjectsInShape(&s, reg, &res,Geometry::LAYER_AIR,CREATURE,0);
+			for (it=res.begin();it!=res.end();++it)
+			{
+				if (getWorld()->getRelation(fr,(*it)) == WorldObject::ALLIED)
+				{
+					if ((*it)->getTypeInfo()->m_type != TypeInfo::TYPE_FIXED_OBJECT)
+					{
+						cgoal = (Creature*) (*it);
+						cgoal->applyBaseAttrMod(&cbam);
+					}
+				}
+			}
+			break;
+
+		case Action::CURE_POIS_BURN:
+			// Modifikation:
+			// heilt vergiftet/brennend (wirkt nur auf Verbuendete)
+			if (cgoal !=0)
+			{
+				cdam.m_dstatus_mod_immune_time[Damage::POISONED] = 1;
+				cdam.m_dstatus_mod_immune_time[Damage::BURNING] = 1;
+				if (getWorld()->getRelation(fr,cgoal) == WorldObject::ALLIED)
+				{
+					cgoal->applyDynAttrMod(&cdam);
+				}
+			}
+			break;
+
+		case Action::CURE_POIS_BURN_PARTY:
+			// Modifikation:
+			// heilt vergiftet/brennend und immunisiert fuer 30 sec (wirkt nur auf Verbuendete)
+			cdam.m_dstatus_mod_immune_time[Damage::POISONED] = 30000;
+			cdam.m_dstatus_mod_immune_time[Damage::BURNING] = 30000;
+
+			// alle Verbuendeten im Umkreis von 6 um den Zielpunkt suchen und Modifikation anwenden
+			s.m_coordinate_x = goalx;
+			s.m_coordinate_y = goaly;
+			s.m_radius = 6;
+			getWorld()->getSWObjectsInShape(&s, reg, &res,Geometry::LAYER_AIR,CREATURE,0);
+			for (it=res.begin();it!=res.end();++it)
+			{
+				if (getWorld()->getRelation(fr,(*it)) == WorldObject::ALLIED)
+				{
+					if ((*it)->getTypeInfo()->m_type != TypeInfo::TYPE_FIXED_OBJECT)
+					{
+						cgoal = (Creature*) (*it);
+						cgoal->applyDynAttrMod(&cdam);
+					}
+				}
+			}
+			break;
+
+		case Action::ACID:
+			// Projektil Saeure erzeugen
+			pr = new DmgProjectile(getWorld(),Projectile::ACID,fr, getWorld()->getValidProjectileId());
+			memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+			getWorld()->insertProjectile(pr,goalx,goaly,reg);
+			break;
+
+		case Action::HEAL:
+			// Modifikation:
+			// 300% der Willenskraft auf HP (nur Verbuendete)
+			if (cgoal !=0)
+			{
+				cdam.m_dhealth = 3* m_base_attr_mod.m_willpower;
+				if (getWorld()->getRelation(fr,cgoal) == WorldObject::ALLIED)
+				{
+					cgoal->applyDynAttrMod(&cdam);
+				}
+			}
+			break;
+
+		case Action::HEAL_PARTY:
+			// Modifikation:
+			// 200% der Willenskraft auf HP
+			cdam.m_dhealth = 2* m_base_attr_mod.m_willpower;
+
+			// alle Verbuendeten im Umkreis von 6 um den Zielpunkt suchen und Modifikation anwenden
+			s.m_coordinate_x = goalx;
+			s.m_coordinate_y = goaly;
+			s.m_radius = 6;
+			getWorld()->getSWObjectsInShape(&s, reg, &res,Geometry::LAYER_AIR,CREATURE,0);
+			for (it=res.begin();it!=res.end();++it)
+			{
+				if (getWorld()->getRelation(fr,(*it)) == WorldObject::ALLIED)
+				{
+					if ((*it)->getTypeInfo()->m_type != TypeInfo::TYPE_FIXED_OBJECT)
+					{
+						cgoal = (Creature*) (*it);
+						cgoal->applyDynAttrMod(&cdam);
+					}
+				}
+			}
+			break;
+
+		case Action::DIVINE_WIND:
+			// Projektil heiliger Strahl erzeugen
+			pr = new DmgProjectile(getWorld(),Projectile::DIVINE_BEAM,fr, getWorld()->getValidProjectileId());
+			memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+			getWorld()->insertProjectile(pr,goalx,goaly,reg);
+			break;
+
+
+		case Action::DIVINE_STORM:
+			// Alle Objekte im Umkreis von 3 um den Zielpunkt suchen
+			s.m_coordinate_x = goalx;
+			s.m_coordinate_y = goaly;
+			s.m_radius = 3;
+			getWorld()->getSWObjectsInShape(&s, reg, &res,Geometry::LAYER_AIR,CREATURE,this);
+			for (it=res.begin();it!=res.end();++it)
+			{
+				// fuer alle Lebewesen ein Projektil heiliger Strahl erzeugen
+				if ((*it)->getTypeInfo()->m_type != TypeInfo::TYPE_FIXED_OBJECT)
+				{
+					goalx = (*it)->getGeometry()->m_shape.m_coordinate_x;
+					goaly = (*it)->getGeometry()->m_shape.m_coordinate_y;
+					pr = new DmgProjectile(getWorld(),Projectile::DIVINE_BEAM,fr, getWorld()->getValidProjectileId());
+					memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+					getWorld()->insertProjectile(pr,goalx,goaly,reg);
+				}
+			}
+			break;
+
+		case Action::BLADE_STORM:
+			// Modifikation:
+			// Angriffsgeschwindigkeit erhoeht fuer 70 sec
+			cbam.m_time =70000;
+			cbam.m_dattack_speed = 1500;
+
+			// alle Verbuendeten im Umkreis von 12 suchen und Modifikation anwenden
+			s.m_coordinate_x = x;
+			s.m_coordinate_y = y;
+			s.m_radius = 12;
+			getWorld()->getSWObjectsInShape(&s, reg, &res,Geometry::LAYER_AIR,CREATURE,0);
+			for (it=res.begin();it!=res.end();++it)
+			{
+				if (getWorld()->getRelation(fr,(*it)) == WorldObject::ALLIED)
+				{
+					if ((*it)->getTypeInfo()->m_type != TypeInfo::TYPE_FIXED_OBJECT)
+					{
+						cgoal = (Creature*) (*it);
+						cgoal->applyBaseAttrMod(&cbam);
+					}
+				}
+			}
+			break;
+
+		case Action::CURE_CONF_BSRK:
+			// Modifikation:
+			// heilt verwirrt/Berserker (wirkt nur auf Verbuendete)
+			if (cgoal !=0)
+			{
+				cdam.m_dstatus_mod_immune_time[Damage::CONFUSED] = 1;
+				cdam.m_dstatus_mod_immune_time[Damage::BERSERK] = 1;
+				if (getWorld()->getRelation(fr,cgoal) == WorldObject::ALLIED)
+				{
+					cgoal->applyDynAttrMod(&cdam);
+				}
+			}
+			break;
+
+		case Action::CURE_CONF_BSRK_PARTY:
+			// Modifikation:
+			// heilt verwirrt/Berserker und immunisiert fuer 30 sec (wirkt nur auf Verbuendete)
+			cdam.m_dstatus_mod_immune_time[Damage::CONFUSED] = 30000;
+			cdam.m_dstatus_mod_immune_time[Damage::BERSERK] = 30000;
+
+			// alle Verbuendeten im Umkreis von 6 um den Zielpunkt suchen und Modifikation anwenden
+			s.m_coordinate_x = goalx;
+			s.m_coordinate_y = goaly;
+			s.m_radius = 6;
+			getWorld()->getSWObjectsInShape(&s, reg, &res,Geometry::LAYER_AIR,CREATURE,0);
+			for (it=res.begin();it!=res.end();++it)
+			{
+				if (getWorld()->getRelation(fr,(*it)) == WorldObject::ALLIED)
+				{
+					if ((*it)->getTypeInfo()->m_type != TypeInfo::TYPE_FIXED_OBJECT)
+					{
+						cgoal = (Creature*) (*it);
+						cgoal->applyDynAttrMod(&cdam);
+					}
+				}
+			}
+			break;
+
+		case Action::HYPNOSIS:
+			// Projektil Hypnose erzeugen
+			pr = new DmgProjectile(getWorld(),Projectile::HYPNOSIS,fr, getWorld()->getValidProjectileId());
+			memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+			getWorld()->insertProjectile(pr,goalx,goaly,reg);
+			break;
+
+		case Action::HYPNOSIS2:
+			// Alle Objekte im Umkreis von 2 um den Zielpunkt suchen
+			s.m_coordinate_x = goalx;
+			s.m_coordinate_y = goaly;
+			s.m_radius = 2;
+			getWorld()->getSWObjectsInShape(&s, reg, &res,Geometry::LAYER_AIR,CREATURE,this);
+			for (it=res.begin();it!=res.end();++it)
+			{
+				// Fuer alle Lebewesen ein Projektil Hypnose erzeugen
+				if ((*it)->getTypeInfo()->m_type != TypeInfo::TYPE_FIXED_OBJECT)
+				{
+					goalx = (*it)->getGeometry()->m_shape.m_coordinate_x;
+					goaly = (*it)->getGeometry()->m_shape.m_coordinate_y;
+					pr = new DmgProjectile(getWorld(),Projectile::HYPNOSIS,fr, getWorld()->getValidProjectileId());
+					memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+					getWorld()->insertProjectile(pr,goalx,goaly,reg);
+				}
+			}
+			break;
+
+		case Action::KEEN_MIND:
+			// Modifikation:
+			// 50% der Willenskraft auf Magie
+			cbam.m_time =70000;
+			cbam.m_dmagic_power = m_base_attr_mod.m_willpower/2;
+
+			// alle Verbuendeten im Umkreis von 12 suchen und Modifikation anwenden
+			s.m_coordinate_x = x;
+			s.m_coordinate_y = y;
+			s.m_radius = 12;
+			getWorld()->getSWObjectsInShape(&s, reg, &res,Geometry::LAYER_AIR,CREATURE,0);
+			for (it=res.begin();it!=res.end();++it)
+			{
+				if (getWorld()->getRelation(fr,(*it)) == WorldObject::ALLIED)
+				{
+					if ((*it)->getTypeInfo()->m_type != TypeInfo::TYPE_FIXED_OBJECT)
+					{
+						cgoal = (Creature*) (*it);
+						cgoal->applyBaseAttrMod(&cbam);
+					}
+				}
+			}
+			break;
+
+        default:
+            break;
+	}
+
+	// Faehigkeit Monsterjaeger
+	// Wenn das Ziel nach der Aktion unter 0 Lebenspunkte hat Bonus austeilen
+	if ((checkAbility(Action::MONSTER_HUNTER) || (checkAbility(Action::MONSTER_SLAYER))) && cgoal && cgoal->getDynAttr()->m_health<0)
+	{
+		DEBUG("monster killed, apply mod");
+		CreatureBaseAttrMod cbam;
+
+		// Modifikation:
+		// 10% mehr Staerke, bei aufgewerteter Version erhoehte Angriffsgeschwindigkeit fuer 10 sec
+		cbam.m_dstrength = getBaseAttr()->m_strength / 10;
+		cbam.m_time = 10000;
+		if (checkAbility(Action::MONSTER_SLAYER))
+			cbam.m_dattack_speed = 200;
+		applyBaseAttrMod(&cbam);
+
+	}
+}
+
+void Creature::collisionDetection(float time)
+{
+	// Punkt zu dem das Objekt bewegt werden soll
+	float xnew = getGeometry()->m_shape.m_coordinate_x+getMoveInfo()->m_speed_x * time;
+	float ynew = getGeometry()->m_shape.m_coordinate_y+getMoveInfo()->m_speed_y * time;
+
+	// Kreis um den Zielpunkt
+	list<ServerWObject*> result;
+	Shape scopy;
+	scopy.m_radius = getGeometry()->m_shape.m_radius*1.05;
+	scopy.m_coordinate_x = xnew;
+	scopy.m_coordinate_y = ynew;
+	scopy.m_type = Shape::CIRCLE;
+
+	// Ebene in der gesucht werden soll
+	short layer = getGeometry()->m_layer;
+
+	// Alle kollidierenden Objekte suchen
+	getWorld()->getSWObjectsInShape(&(scopy),getGridLocation()->m_region,&result,layer, CREATURE | FIXED,this);
+
+	if (result.size()!=0)
+	{
+		// es gibt kollidierende Objekte
+		DEBUG5("aktuelle Koordinaten %f %f",getGeometry()->m_shape.m_coordinate_x,getGeometry()->m_shape.m_coordinate_y);
+		list<ServerWObject*>::iterator i;
+
+		Shape* s2;
+        // Liste der kollidierenden Objekte durchgehen
+		for (i= result.begin();i!=result.end();++i)
+		{
+			DEBUG5("Kollision %i",(*i)->getId());
+			s2 =&((*i)->getGeometry()->m_shape);
+			// wenn mit dem Zielobjekt kollidiert Bewegung beenden
+			if ((*i)->getId() == getCommand()->m_goal_object_id)
+			{
+				getMoveInfo()->m_speed_x =0;
+				getMoveInfo()->m_speed_y =0;
+				break;
+			}
+
+			// Wenn die Faehigkeit Stuermen ist dann Bewegung beenden
+			if (m_command.m_type == Action::CHARGE || m_command.m_type == Action::STORM_CHARGE)
+			{
+				// Behandlung von *Charge*
+				m_command.m_goal_object_id = (*i)->getId();
+				getMoveInfo()->m_speed_x =0;
+				getMoveInfo()->m_speed_y =0;
+				return;
+			}
+			else
+			{
+				// Kollision behandeln
+				handleCollision(s2);
+			}
+
+		}
+
+		// neuen erreichten Punkt ausrechnen und testen ob dieser akzeptabel ist
+		xnew = getGeometry()->m_shape.m_coordinate_x+getMoveInfo()->m_speed_x * time;
+		ynew = getGeometry()->m_shape.m_coordinate_y+getMoveInfo()->m_speed_y * time;
+
+		// Kreis um den neuen Zielpunkt
+		scopy.m_coordinate_x = xnew;
+		scopy.m_coordinate_y = ynew;
+		DEBUG5("neue Koordinaten %f %f",xnew,ynew);
+		scopy.m_radius = getGeometry()->m_shape.m_radius;
+		result.clear();
+
+		// Suchen der Objekte um den neuen Zielpunkt
+		getWorld()->getSWObjectsInShape(&(scopy),getGridLocation()->m_region,&result,layer, CREATURE | FIXED,this);
+
+		// Wenn immer noch Kollision vorliegt Bewegung beenden
+		if (result.size()!=0)
+		{
+			DEBUG5("still colliding");
+
+			getMoveInfo()->m_speed_x =0;
+			getMoveInfo()->m_speed_y =0;
+		}
+
+	}
+}
+
+void Creature::handleCollision(Shape* s2)
+{
+	float dx,dy,x1,x2,y1,y2,d;
+
+	// Koordinaten des kollidierenden Objektes
+	x1 = getGeometry()->m_shape.m_coordinate_x;
+	y1 = getGeometry()->m_shape.m_coordinate_y;
+
+	// eigene Koordinaten
+	x2 = s2->m_coordinate_x;
+	y2 = s2->m_coordinate_y;
+	bool circ = true;
+
+
+	if (s2->m_type==Shape::RECT)
+	{
+		// Kollision mit Rechteckt
+		circ = false;
+		DEBUG5("Rechteck");
+
+		// Ausdehnung des Rechtseckes
+		float ex = s2->m_extent_x;
+		float ey = s2->m_extent_y;
+		float r = getGeometry()->m_shape.m_radius;
+		DEBUG5("koll %f %f %f %f %f %f",x1,y1,x2,y2,ex,ey);
+
+		if ((x1<x2-ex-r) || (x1>x2+ex+r))
+		{
+			// Kollision mit einer senkrechten Kante
+			// x-Anteil der Bewegung auf 0 setzen
+			getMoveInfo()->m_speed_x=0;
+			DEBUG5("x-anteil genullt");
+		}
+		else
+		{
+			if (y1<y2-ey-r || y1>y2+ey+r)
+			{
+				// Kollision mit einer waagerechten Kante
+				// y-Anteil der Bewegung auf 0 setzen
+				DEBUG5("y-anteil genullt");
+				getMoveInfo()->m_speed_y=0;
+			}
+			else
+			{
+				// Kollision an der Ecke des Rechteckes
+				DEBUG5("kollision an einer Ecke");
+
+				// ermitteln der Ecke an der die Kollision stattfand
+				if (x1>x2)
+					x2 = x2+ex;
+				else
+					x2 = x2-ex;
+
+				if (y1>y2)
+					y2 = y2+ey;
+				else
+					y2 = y2-ey;
+
+				// Problem behandeln wie einen Kreis um diese Ecke
+				circ = true;
+			}
+		}
+	}
+
+	if (circ)
+	{
+		// Behandlung Kollision mit Kreis
+
+		// Vektor vom eigenen Mittelpunkt zum Mittelpunkt des kollidierenden Objektes (normiert)
+		dx = x2-x1;
+		dy = y2-y1;
+		d = 1/sqrt(dx*dx+dy*dy);
+		DEBUG5("speed %f %f",getMoveInfo()->m_speed_x,getMoveInfo()->m_speed_y);
+		dx *= d;
+		dy *= d;
+
+		// Projektion des Geschwindigkeitsvektors auf diesen Vektor
+		DEBUG5("Richtung k1 k2 %f %f",dx,dy);
+		d = dx*getMoveInfo()->m_speed_x +dy*getMoveInfo()->m_speed_y;
+		DEBUG5("Skalarprodukt %f",d);
+		dx *=d;
+		dy *=d;
+		DEBUG5("Projektion k1 k2 %f %f",dx,dy);
+
+		// Abziehen vom Geschwindigkeitsvektor (es bleibt nur der Anteil senkrecht zur Verbindungslinie der Mittelpunkt erhalten)
+		getMoveInfo()->m_speed_x -= dx;
+		getMoveInfo()->m_speed_y -= dy;
+		DEBUG5("speed neu %f %f",getMoveInfo()->m_speed_x,getMoveInfo()->m_speed_y);
+		/*
+		dx = x2-x1;
+		dy = y2-y1;
+		d = sqrt(dx*dx+dy*dy);
+		if (d!=0)
+		{
+			d= 1/d;
+			d = dx*getMoveInfo()->m_speed_x +dy*getMoveInfo()->m_speed_y;
+			DEBUG5("Skalarprodukt neu %f",d);
+		}
+		*/
+
+	}
+
+	// neue Geschwindigkeit normieren
+	d =(sqrt(getMoveInfo()->m_speed_x*getMoveInfo()->m_speed_x+getMoveInfo()->m_speed_y*getMoveInfo()->m_speed_y));
+	if (d!=0)
+	{
+		d= 1/d;
+		getMoveInfo()->m_speed_x *= d*getBaseAttr()->m_step_length/m_action.m_time;
+		getMoveInfo()->m_speed_y *= d*getBaseAttr()->m_step_length/m_action.m_time;
+		DEBUG5("speed %f %f",getMoveInfo()->m_speed_x,getMoveInfo()->m_speed_y);
+	}
+
+}
+
+void Creature::updateCommand()
+{
+	// Wenn aktuelles Kommando keine Aktion vorschreibt
+	DEBUG5("next command: %i ",m_next_command.m_type);
+	if (m_next_command.m_type != Action::NOACTION)
+	{
+		// Naechstes Kommando uebernehmen
+		m_command.m_type=m_next_command.m_type;
+		m_command.m_goal_coordinate_x=m_next_command.m_goal_coordinate_x;
+		m_command.m_goal_coordinate_y=m_next_command.m_goal_coordinate_y;
+		m_command.m_goal_object_id=m_next_command.m_goal_object_id;
+		m_command.m_range=m_next_command.m_range;
+		m_command.m_damage_mult = 1;
+
+		// Naechstes Kommando auf nichts setzen
+		m_next_command.m_type = Action::NOACTION;
+	}
+
+	// Kommando ausrechnen das evtl aus einem Statusmod resultiert
+	calcStatusModCommand();
+
+
+
+}
+
+void Creature::calcAction()
+{
+
+
+
+	updateCommand();
+
+	// wenn kein Kommando existiert keine Aktion ausfuehren, beenden
+	if (m_command.m_type == Action::NOACTION)
+	{
+
+		m_action.m_type = Action::NOACTION;
+		return;
+
+	}
+
+	DEBUG5("calc action for command %i",m_command.m_type);
+
+
+	// Reichweite der Aktion berechnen
+	float range = m_command.m_range;
+
+	if (m_command.m_type == Action::WALK)
+		range =getGeometry()->m_shape.m_radius;
+
+	if (m_command.m_type == Action::TAKE_ITEM)
+		range = 1;
+
+	// Koordinaten des Zielpunktes
+	float goalx = m_command.m_goal_coordinate_x;
+	float goaly = m_command.m_goal_coordinate_y;
+	m_action.m_goal_coordinate_x = goalx;
+	m_action.m_goal_coordinate_y = goaly;
+
+	// Zeiger auf das Zielobjekt
+	ServerWObject* goal=0;
+
+	// eigene Position
+	float x = getGeometry()->m_shape.m_coordinate_x;
+	float y = getGeometry()->m_shape.m_coordinate_y;
+
+	// Koordinatenn/ Radius des Zieles bei Behandlung als Kreis
+	// noetig fuer Abstandsberechnung
+	float cx = goalx;
+	float cy = goaly;
+	float r = getGeometry()->m_shape.m_radius+range;
+
+	// Wenn Zielobjekt per ID gegeben
+
+	if ( m_command.m_goal_object_id !=0 && m_command.m_type != Action::TAKE_ITEM)
+	{
+		DEBUG5("goal ID: %i",m_command.m_goal_object_id);
+		// Zielobjekt holen
+		goal = getWorld()->getSWObject(m_command.m_goal_object_id,getGridLocation()->m_region);
+
+
+
+		if (goal ==0)
+		{
+			// Zielobjekt existiert nicht mehr, abbrechen
+			m_command.m_type = Action::NOACTION;
+			m_action.m_type = Action::NOACTION;
+			m_action.m_elapsed_time =0;
+			m_command.m_damage_mult=1;
+			return;
+		}
+
+		// Ziel muss aktiv sein
+		if (goal->getState() != STATE_ACTIVE)
+		{
+			DEBUG5("refused to interakt with inactive objekt %i",m_command.m_goal_object_id);
+			m_command.m_type = Action::NOACTION;
+			m_action.m_type = Action::NOACTION;
+			m_command.m_damage_mult=1;
+			m_action.m_elapsed_time =0;
+			return;
+		}
+
+		// Zielkoordinaten neu setzen (Koordinaten des Zielobjektes)
+		goalx = goal->getGeometry()->m_shape.m_coordinate_x;
+		goaly = goal->getGeometry()->m_shape.m_coordinate_y;
+
+		// Berechnen der Koordinaten fuer Abstandsberechnung
+		if (goal->getGeometry()->m_shape.m_type == Shape::CIRCLE)
+		{
+			// Ziel hat Kreisform, Koordinaten uebernehmen
+			cx = goalx;
+			cy = goaly;
+			r += goal->getGeometry()->m_shape.m_radius;
+		}
+		else
+		{
+			// Ziel ist rechteckig
+			// die am naechsten gelegene Ecke suchen und als Mittelpunkt behandeln
+			if (x>goalx)
+				cx +=  goal->getGeometry()->m_shape.m_extent_x;
+			else
+				cx -=  goal->getGeometry()->m_shape.m_extent_x;
+			if (y>goaly)
+				cy +=  goal->getGeometry()->m_shape.m_extent_y;
+			else
+				cy -=  goal->getGeometry()->m_shape.m_extent_y;
+		}
+	}
+
+	DEBUG5("goal of command: %f %f", goalx,goaly);
+	DEBUG5("start %f %f ziel %f %f range %f",x,y,cx,cy,r);
+
+	// Stuermen ohne Zielobjekt hat keinen Zielradius
+	if ((m_command.m_type == Action::CHARGE || m_command.m_type == Action::STORM_CHARGE) &&  m_command.m_goal_object_id==0)
+	{
+		r=0;
+	}
+
+
+
+	if (Action::getActionInfo(m_command.m_type)->m_distance == Action::MELEE || Action::getActionInfo(m_command.m_type)->m_base_action == Action::WALK)
+	{
+		// Aktion fuer die man an das Ziel hinreichend nahe herankommen muss
+
+		// Testen ob das Ziel in Reichweite ist
+		if ((sqr(r) > sqr(cx-x)+sqr(cy-y)))
+		{
+			// Ziel ist in Reichweite, geplante Aktion ausfuehren
+			m_action.m_type = m_command.m_type;
+			m_action.m_goal_object_id = m_command.m_goal_object_id;
+			m_action.m_goal_coordinate_x = goalx;
+			m_action.m_goal_coordinate_y = goaly;
+
+			// Kommando damit abgeschlossen
+			m_command.m_type = Action::NOACTION;
+			m_command.m_damage_mult = 1;
+		}
+		else
+		{
+			// Ziel ist nicht in Reichweite, hinlaufen
+
+			m_action.m_type = Action::WALK;
+			if ((m_command.m_type == Action::CHARGE || m_command.m_type == Action::STORM_CHARGE)  )
+			{
+				// Sturmangriff
+				DEBUG("Charge");
+				float d;
+
+				// beim ersten Mal richtung neu ausrechnen, das ist der Fall wenn der Schadensmultiplikator gleich 1 ist
+				// sonst nur beschleunigen
+				if (m_command.m_damage_mult>1)
+				{
+					// Richtung nicht neu ausrechnen, beschleunigen
+					// Geschwindigkeit normieren, mit Schadensmultiplikator multiplizieren
+					d = 1/sqrt( getMoveInfo()->m_speed_x*getMoveInfo()->m_speed_x+getMoveInfo()->m_speed_y*getMoveInfo()->m_speed_y);
+					m_command.m_damage_mult = (m_command.m_damage_mult+2);
+
+					if (m_command.m_type == Action::CHARGE)
+						m_command.m_damage_mult *= 0.85;
+					else
+						m_command.m_damage_mult *= 0.93;
+
+					// Schaden neu berechnen
+					recalcDamage();
+
+					d *= sqrt(m_command.m_damage_mult);
+					getMoveInfo()->m_speed_x *= d;
+					getMoveInfo()->m_speed_y *= d;
+					DEBUG(" dir %f %f dmg mult %f",getMoveInfo()->m_speed_x,getMoveInfo()->m_speed_y,m_command.m_damage_mult);
+				}
+				else
+				{
+					// Richtung: direct zum Ziel;
+					DEBUG("calc charge dir");
+					// Vektor von der eigenen Position zum Ziel, normieren
+					getMoveInfo()->m_speed_x = goalx-x;
+					getMoveInfo()->m_speed_y = goaly-y;
+					d = sqrt( getMoveInfo()->m_speed_x*getMoveInfo()->m_speed_x+getMoveInfo()->m_speed_y*getMoveInfo()->m_speed_y);
+					if (d!=0)
+					{
+						d= 1/d;
+						getMoveInfo()->m_speed_x *= d;
+						getMoveInfo()->m_speed_y *= d;
+						m_command.m_damage_mult = (m_command.m_damage_mult+0.1);
+					}
+					else
+					{
+						m_command.m_type = Action::NOACTION;
+						m_action.m_type = Action::NOACTION;
+						m_action.m_elapsed_time =0;
+						m_command.m_damage_mult = 1;
+					}
+
+
+				}
+
+
+			}
+			else
+			{
+				// Berechnen der Bewegungsrichtung
+				calcWalkDir(goalx,goaly, goal);
+
+			}
+		}
+
+	}
+	else
+	{
+		// keine Nahkampfaktion bzw laufen -> Action direkt ausfuehren
+		m_action.m_type = m_command.m_type;
+		m_action.m_goal_object_id = m_command.m_goal_object_id;
+		m_action.m_goal_coordinate_x = goalx;
+		m_action.m_goal_coordinate_y = goaly;
+
+		m_command.m_type = Action::NOACTION;
+		m_command.m_damage_mult = 1;
+	}
+
+}
+
+void Creature::calcStatusModCommand()
+{
+	// Statusmod verwirrt
+	if (m_dyn_attr.m_status_mod_time[Damage::CONFUSED]>0)
+	{
+		// eigene Position
+		float x=getGeometry()->m_shape.m_coordinate_x;
+		float y=getGeometry()->m_shape.m_coordinate_y;
+		// aktuelle Bewegungsrichtung
+		float sx = getMoveInfo()->m_speed_x;
+		float sy = getMoveInfo()->m_speed_y;
+		float range = m_base_attr.m_step_length;
+		float nx,ny;
+
+		// Normieren der Bewegungsgeschwindigkeit
+		float d;
+		d = sqr(sx)+sqr(sy);
+		if (d>0)
+		{
+			d = 1/sqrt(d);
+			sx *= d;
+			sy *= d;
+		}
+		DEBUG5("old speed %f %f",sx,sy);
+		// zufaellige Richtung auswuerfeln und normieren
+		float newsx =1-rand()*2.0/RAND_MAX;
+		float newsy =1-rand()*2.0/RAND_MAX;
+		d = 1/sqrt(sqr(newsx)+sqr(newsy));
+		newsx *= d;
+		newsy *= d;
+
+		// neue Bewegungsrichtung = 70% der alten + 30% der zufaellig ausgewaehlten
+		sx = 0.7*sx+0.3*newsx;
+		sy = 0.7*sy+0.3*newsy;
+
+		// neue Bewegungsrichtung normieren
+		d = sqrt(sqr(sx)+sqr(sy));
+		if (d>0)
+		{
+			d= 1/d;
+			sx *= d;
+			sy *= d;
+		}
+
+		DEBUG5("new speed %f %f",sx,sy);
+		DEBUG5("pos of player %f %f",x,y);
+		// Berechnen den Punktes der bei dieser Bewegung erreicht wird
+		nx = x;
+		ny = y;
+		x += sx *range;
+		y += sy *range;
+		DEBUG5("pos of goal %f %f",x,y);
+
+		// Kreis um den Zielpunkt, Radius gleich Radius des Lebewesens
+		Shape s;
+		s.m_coordinate_x =x;
+		s.m_coordinate_y =y;
+		s.m_type = Shape::CIRCLE;
+		s.m_radius = getGeometry()->m_shape.m_radius;
+		ServerWObject* wo =0;
+		list<ServerWObject*> res;
+		list<ServerWObject*>::iterator it;
+
+		// ermitteln der Objekte mit denen bei der Bewegung kollidiert wird
+		getWorld()->getSWObjectsInShape(&s,getGridLocation()->m_region,&res,Geometry::LAYER_AIR,CREATURE | FIXED,this);
+
+		// Zufallszahl fuer zufaellige Angriffe
+		float r = rand()*1.0/RAND_MAX;
+		if (!res.empty())
+		{
+			// Es gibt ein kollidierendes Objekt, als Zielobjekt setzen
+			wo = *(res.begin());
+			x = wo->getGeometry()->m_shape.m_coordinate_x;
+			y = wo->getGeometry()->m_shape.m_coordinate_y;
+
+		}
+		else
+		{
+			// es gibt kein kollidierendes Objekt, mit 30% Wahrscheinlichkeit Angriff ins nichts
+			if (r>0.7)
+			{
+				range += m_base_attr_mod.m_attack_range;
+				x= nx + sx *range;
+				y= ny + sy *range;
+
+			}
+		}
+		DEBUG5("entscheidung durch %p, %f",wo,r);
+		// Angriff ausfuehren, wenn Zielobjekt vorhanden, sonst mit 30% Wahrscheinlichkeit
+		if (wo!=0 || r > 0.7)
+		{
+			// Angriff
+			m_command.m_type = m_base_action;
+			m_command.m_goal_coordinate_x =x;
+			m_command.m_goal_coordinate_y =y;
+			m_command.m_goal_object_id =0;
+			m_command.m_range = getBaseAttr()->m_attack_range;
+
+			// Im Falle von Beserker nur Nahkampf
+			if (m_dyn_attr.m_status_mod_time[Damage::BERSERK]>0)
+			{
+				m_command.m_type = Action::ATTACK;
+				if (m_command.m_range >4)
+				{
+					m_command.m_range= 1;
+				}
+			}
+		}
+		else
+		{
+			// Laufen
+			m_command.m_type = Action::WALK;
+			getMoveInfo()->m_speed_x =sx;
+			getMoveInfo()->m_speed_y = sy;
+			return;
+		}
+
+	}
+	else if (m_dyn_attr.m_status_mod_time[Damage::BERSERK]>0)
+	{
+		// Behandlung von Berserker
+		int id =0;
+		float rmin =1000;
+		// eigene Position
+		float x=getGeometry()->m_shape.m_coordinate_x;
+		float y=getGeometry()->m_shape.m_coordinate_y;
+
+		float wx,wy,gx=0,gy=0;
+
+		// Kreis mit Radius 8 um eigenen Mittelpunkt
+		Shape s;
+		s.m_type = Shape::CIRCLE;
+		s.m_radius =8;
+		s.m_coordinate_x = x;
+		s.m_coordinate_y = y;
+		list<ServerWObject*> res;
+		list<ServerWObject*>::iterator i;
+		res.clear();
+
+		// Suchen aller Objekte im Kreis
+		getWorld()->getSWObjectsInShape(&s,getGridLocation()->m_region, &res,Geometry::LAYER_AIR,CREATURE,this);
+		for (i=res.begin();i!= res.end();++i)
+		{
+			// nur aktive Lebewesen beruecksichtigen
+			if ((*i)->getState() != STATE_ACTIVE)
+			{
+				continue;
+			}
+
+			DEBUG5("checking obj %i",(*i)->getId());
+			// Fuer feindliche Lebewesen
+			if (getWorld()->getRelation(getTypeInfo()->m_fraction,*i) == WorldObject::HOSTILE)
+			{
+				// Abstand zum eigenen Mittelpunkt berechnen
+				DEBUG5("hostile");
+				wx = (*i)->getGeometry()->m_shape.m_coordinate_x;
+				wy = (*i)->getGeometry()->m_shape.m_coordinate_y;
+				// Objekt mit dem kleinsten Abstand als Zielobjekt setzen
+				if (sqr(wx-x)+sqr(wy-y)<rmin)
+				{
+					rmin = sqr(wx-x)+sqr(wy-y);
+					id = (*i)->getId();
+					gx = wx;
+					gy = wy;
+				}
+
+			}
+		}
+
+		// Wenn Zielobjekt gefunden wurde
+		if (id !=0)
+		{
+			DEBUG5("attack id %i",id);
+			// Angriff
+			m_command.m_type = Action::ATTACK;
+			m_command.m_goal_object_id = id;
+			m_command.m_goal_coordinate_x = gx;
+			m_command.m_goal_coordinate_y = gy;
+			m_command.m_range = getBaseAttr()->m_attack_range;
+
+			// nur Nahkampf, daher Reichweite die von Fernwaffen kommt reduzieren
+			if (m_command.m_range >4)
+			{
+				DEBUG("capped range for berserk");
+				m_command.m_range= 1;
+			}
+
+		}
+		else
+		{
+			// nichts machen
+			m_command.m_type = Action::NOACTION;
+		}
+	}
+}
+
+void Creature::calcWalkDir(float goalx,float goaly,ServerWObject* goal)
+{
+	// eigene Position
+	float x = getGeometry()->m_shape.m_coordinate_x;
+	float y = getGeometry()->m_shape.m_coordinate_y;
+	float dir[2];
+
+	// wenn als Ziel ein Lebenwesen angegeben ist
+	if (goal !=0 && goal->getTypeInfo()->m_type != TypeInfo::TYPE_FIXED_OBJECT )
+	{
+		DEBUG5("using pot field of object %i",goal->getId());
+		Creature* cr = (Creature*) goal;
+		// Potentialfeld des Ziellebewesens verwenden
+		cr->getPathDirection(x,y,getGridLocation()->m_region,2*getGeometry()->m_shape.m_radius, getGeometry()->m_layer,dir);
+	}
+	else
+	{
+		DEBUG5("using own pot field");
+		float x = getGeometry()->m_shape.m_coordinate_x;
+		float y = getGeometry()->m_shape.m_coordinate_y;
+
+		// Bewegung zu einem Punkt oder festen Objekt
+		// eigenes Potentialfeld verwenden
+
+		// true, wenn das eigene Potentailfeld neu berechnet werden muss
+		bool recalc = false;
+
+		// true, wenn als Richtung die direkte Verbindung genutzt wird
+		bool direct = false;
+
+		// Wenn in einer Koordinatenrichtung Abstand groesser 10 ist direkte Verbindung benutzen
+		if (fabs(x-goalx)>10 || fabs(y-goaly)>10)
+		{
+			direct = true;
+		}
+
+		if (m_path_info ==0)
+		{
+			// Potentialfeld existiertnoch nicht
+			DEBUG5("allocating new pot field");
+			m_path_info = new PathfindInfo;
+
+			// Qualitaet der Suche, gehe quadratisch in die Laufzeit ein
+			int qual=4;
+			int dim = 20*qual+1;
+
+			// Potentialfeld
+			m_path_info->m_pot = new Matrix2d<float>(dim,dim);
+			// Blockmatrix
+			m_path_info->m_block = new Matrix2d<char>(dim,dim);
+
+			// Kantenlaenge eines Quadrates im Suchfeld
+			//float sqs =  getGeometry()->m_shape.m_radius*2/ qual;
+
+			// Senke des Feldes ist der Zielpunkt
+			m_path_info->m_start_x= goalx;
+			m_path_info->m_start_y= goaly;
+
+			m_path_info->m_dim = dim;
+			m_path_info->m_layer= Geometry::LAYER_BASE | Geometry::LAYER_AIR;
+			m_path_info->m_region=getGridLocation()->m_region;
+			m_path_info->m_base_size = getGeometry()->m_shape.m_radius*2;
+			m_path_info->m_quality=qual;
+			m_path_info->m_id = getId();
+			// neu berechnen noetig
+			recalc = true;
+
+		}
+		else
+		{
+
+			if ( m_path_info->m_region != getGridLocation()->m_region)
+			{
+				// Ziel befindet sich in einer anderen Region als die des Potentialfeldes
+				// Region anpassen, neu berechnen
+				m_path_info->m_region=getGridLocation()->m_region;
+				recalc = true;
+			}
+
+			// Ziel hat sich deutlich bewegt, neuen Weg suchen
+			float d = sqr(m_path_info->m_start_x -goalx) +sqr(m_path_info->m_start_y -goaly);
+			if (d>1)
+				recalc = true;
+
+			// Potentialfeld ist aelter als 500 ms, neu berechnen
+			if (m_path_info->m_timer>500)
+				recalc = true;
+
+		}
+
+		if (!direct)
+		{
+			if (recalc)
+			{
+				// neu berechnen notwendig
+
+				// Zentrum ist die eigene Position
+				m_path_info->m_center_x= goalx +roundf(x-goalx);
+				m_path_info->m_center_y=goaly +roundf(y-goaly);
+				// Senke ist der Zielpunkt
+				m_path_info->m_start_x= goalx;
+				m_path_info->m_start_y= goaly;
+
+				// Timer auf 0 setzen
+				m_path_info->m_timer=0;
+
+
+				// Blockmatrix berechnen
+				getWorld()->calcBlockmat(m_path_info);
+
+
+				// Potentialfeld berechnen
+				getWorld()->calcPotential(m_path_info);
+
+			}
+
+			DEBUG5("calcing direction from %f %f",x,y);
+			// Richtung auf Basis des eigenen Potentialfeldes berechnen
+			getWorld()->calcPathDirection(m_path_info, x, y, dir);
+		}
+		else
+		{
+			// direkte Verbindung als Richtung verwenden
+			DEBUG("using direct way");
+			dir[0] = goalx-x;
+			dir[1] = goaly-y;
+		}
+
+	}
+
+	// Richtung normieren
+	float l = sqrt(dir[0]*dir[0]+dir[1]*dir[1]);
+	if (l==0)
+	{
+		m_command.m_type = Action::NOACTION;
+		m_action.m_type = Action::NOACTION;
+		m_action.m_elapsed_time =0;
+		m_command.m_damage_mult=1;
+		return;
+	}
+	else
+	{
+		// TODO: Wende über 90 Grad behandeln
+		if (getMoveInfo()->m_speed_x*dir[0]+getMoveInfo()->m_speed_y*dir[1]>0)
+		{
+			getMoveInfo()->m_speed_x = dir[0] /l;
+			getMoveInfo()->m_speed_y = dir[1]/l;
+		}
+		else
+		{
+			DEBUG5("wenden");
+			getMoveInfo()->m_speed_x = dir[0] /l;
+			getMoveInfo()->m_speed_y = dir[1]/l;
+		}
+		DEBUG5("direction: %f %f",dir[0]/l,dir[1]/l);
+	}
+
+}
+
+bool Creature::update (float time)
+{
+	// CreatureDynAttr* dynattr = getDynAttr();
+	DEBUG5("Update des Creatureobjekts [%i] wird gestartet", getId());
+	// interne Variable um Fehler zu speichern
+	bool result=true;
+
+
+	// Timer herunterzaehlen lassen
+	m_timer1 -=time;
+	if (m_timer1<0)
+	{
+		m_timer1=0;
+	}
+
+	m_timer2 -=time;
+	if (m_timer2<0)
+	{
+		m_timer2=0;
+	}
+
+	DEBUG5("timer1 %f timer2 %f",m_timer1,m_timer2);
+
+
+	// Timer fuer Wegsucheinfo inkrementieren
+	if (m_path_info)
+		m_path_info->m_timer += time;
+
+	if (m_small_path_info)
+		m_small_path_info->m_timer += time;
+
+	if (m_medium_path_info)
+		m_medium_path_info->m_timer += time;
+
+	if (m_big_path_info)
+		m_big_path_info->m_timer += time;
+
+	if (m_small_flying_path_info)
+		m_small_flying_path_info->m_timer += time;
+
+
+
+	// Zeit fuer Statusveraenderungen / Immunisierungen reduzieren
+	for (int i=0;i<NR_STATUS_MODS;i++)
+	{
+		m_dyn_attr.m_status_mod_time[i] -= time;
+		if (m_dyn_attr.m_status_mod_time<0)
+		{
+			m_dyn_attr.m_status_mod_time[i]=0;
+			// aktuelle Aktion abbrechen nach auslaufen von Berserker / verwirrt
+			// (da die Aktion idr ungewollt bzw ungeplant ist)
+			if (i==Damage::BERSERK || i==Damage::CONFUSED)
+				m_command.m_type = Action::NOACTION;
+		}
+
+		m_dyn_attr.m_status_mod_immune_time[i] -= time;
+		if (m_dyn_attr.m_status_mod_immune_time[i]<0)
+			m_dyn_attr.m_status_mod_immune_time[i]=0;
+
+	}
+
+	// Zeit fuer Effekte reduzieren
+	for (int i=0;i<NR_EFFECTS;i++)
+	{
+		m_dyn_attr.m_effect_time[i] -= time;
+		if (m_dyn_attr.m_effect_time[i]<0)
+			m_dyn_attr.m_effect_time[i]=0;
+	}
+
+	// Zeit fuer temporaere Effekte reduzieren und ggf deaktivieren
+	// true, wenn die modifizierten Attribute neu berechnet werden muessen
+	bool recalc = false;
+	list<CreatureBaseAttrMod>::iterator i;
+	for (i=m_dyn_attr.m_temp_mods.begin();i!=m_dyn_attr.m_temp_mods.end();)
+	{
+
+		i->m_time -= time;
+		if (i->m_time <=0)
+		{
+			// Zeit abgelaufen, Modifikation deaktivieren
+			DEBUG("removing base attr mod");
+			recalc |= removeBaseAttrMod((CreatureBaseAttrMod*) &(*i));
+			i=m_dyn_attr.m_temp_mods.erase(i);
+		}
+		else
+		{
+			++i;
+		}
+
+	}
+
+	if (recalc)
+	{
+		// modifizierte Attribute neu berechnen
+		DEBUG5("modifizierte Attribute neu berechnen");
+		calcBaseAttrMod();
+
+	}
+
+
+
+
+	// besondere zeitabhaengige Effekte berechnen
+	if (m_base_attr_mod.m_special_flags & FLAMEARMOR)
+	{
+		// Flammenruestung
+
+		// Schaden fuer Flammenruestung setzen
+		Damage d;
+		d.m_min_damage[Damage::FIRE] = time*m_base_attr_mod.m_magic_power*0.0003;
+		d.m_max_damage[Damage::FIRE] = time*m_base_attr_mod.m_magic_power*0.0005;
+		d.m_multiplier[Damage::FIRE]=1;
+
+		list<ServerWObject*> res;
+		res.clear();
+		list<ServerWObject*>::iterator it;
+
+		// Kreis um eigenen Mittelpunkt mit Radius eigener Radius plus 1
+		Shape s;
+		s.m_coordinate_x = getGeometry()->m_shape.m_coordinate_x;
+		s.m_coordinate_y = getGeometry()->m_shape.m_coordinate_y;
+		s.m_type = Shape::CIRCLE;
+		s.m_radius = getGeometry()->m_shape.m_radius+1;
+		Creature* cr;
+		short reg = getGridLocation()->m_region;
+
+		// Alle Objekte im Kreis suchen
+		getWorld()->getSWObjectsInShape(&s, reg, &res,Geometry::LAYER_AIR,CREATURE,this);
+		for (it=res.begin();it!=res.end();++it)
+		{
+			// Schaden austeilen
+			if ((*it)->getTypeInfo()->m_type != TypeInfo::TYPE_FIXED_OBJECT)
+			{
+				cr = (Creature*) (*it);
+				cr->takeDamage(&d);
+
+			}
+		}
+
+	}
+
+	// Statusmods behandeln
+	if (getState()==STATE_ACTIVE)
+	{
+		// Vergiftet
+		if (m_dyn_attr.m_status_mod_time[Damage::POISONED]>0)
+		{
+			// Schaden pro Sekunde 1/60 der HP
+			DEBUG5("poisoned");
+			m_dyn_attr.m_health -= time*m_base_attr_mod.m_max_health / 60000;
+		}
+
+		// brennend
+		if (m_dyn_attr.m_status_mod_time[Damage::BURNING]>0)
+		{
+			// Schaden pro Sekunde 1/90 der HP (bei 0 Feuerresistenz)
+			DEBUG5("burning");
+			m_dyn_attr.m_health -= (100-m_base_attr_mod.m_resistances[Damage::FIRE])*time*m_base_attr_mod.m_max_health / 9000000;
+		}
+
+		// eingefroren
+		if (m_dyn_attr.m_status_mod_time[Damage::FROZEN]>0)
+		{
+			// keine Zeit fuer Aktionen
+			time=0;
+		}
+
+		// gelaehmt
+		if (m_dyn_attr.m_status_mod_time[Damage::PARALYZED]>0)
+		{
+			// Zeit auf 40% reduziert
+			time *= 0.4;
+		}
+
+		// Wenn Lebenspunkte unter 0
+		if (m_dyn_attr.m_health <= 0)
+		{
+			// sterben
+			die();
+		}
+	}
+
+
+	// Solange noch Zeit zur Verfügung steht Aktionen ausfuehren lassen
+	while (time>0)
+	{
+		switch (getState())
+		{
+			// wenn das Objekt aktiv ist
+			case STATE_ACTIVE:
+
+
+
+				// wenn die Lebenspunkte des Lebewesens kleiner gleich 0 sind stirbt das Lebewesen
+				DEBUG5("health %f",m_dyn_attr.m_health);
+				if (m_dyn_attr.m_health <= 0)
+				{
+					die();
+				}
+				else
+				{
+					// Solange noch Zeit zur Verfügung steht
+					DEBUG5("Objekt aktiv");
+
+					while (time>0)
+					{
+						// Wenn keine Aktion gesetzt Aktion ausrechnen und initialisieren
+						if (m_action.m_type == Action::NOACTION)
+						{
+							calcAction();
+							initAction();
+							calcDamage(m_action.m_type,m_damage);
+						}
+
+						// Aktion ausfuehren
+						performAction(time);
+
+
+					}
+				}
+
+
+				break;
+
+
+			// sonst, eventuell hier später weitere Stati gesondert bearbeiten STATES_DEAD, STATES_INACTIVE
+ 			case STATE_DIEING:
+				performAction(time);
+				if (m_action.m_type == Action::NOACTION)
+				{
+					setState(STATE_DEAD);
+					m_action.m_type = Action::DEAD;
+					m_action.m_time = 1000;
+				}
+				break;
+
+			case STATE_DEAD:
+				performAction(time);
+				if (m_action.m_type == Action::NOACTION)
+				{
+					setDestroyed(true);
+				}
+
+			default: time=0 ;
+		}
+
+	}
+	return result;
+}
+
+/*
+void  Creature::onTrade (int id) {
+
+	// Testen ob bereits ein Handel existiert
+	if (m_trade_id!=0)
+	{
+		// Wenn ja, weiteren Handel ablehnen
+		m_trade_id=0;
+		getObjectType().setActionType(ACTION_NONE);
+		m_action->setType(ACTION_NONE);
+		m_command->setType(COMMAND_NONE);
+		return;
+	}
+	else
+	{
+		// Es existiert bislang kein Handel
+		DEBUG5("Handelsinitialisierung starten");
+		ServerWObject* wo = getWorld()->getWorldObject(id);
+		// Wenn das Ziel nicht existiert Aktion beenden
+		if (wo ==0 || wo->getObjectType().getObjectType()==OBJECTTYPE_FIXED_OBJECT)
+		{
+			m_trade_id=0;
+			getObjectType().setActionType(ACTION_NONE);
+			m_action->setType(ACTION_NONE);
+			m_command->setType(COMMAND_NONE);
+			return;
+		}
+
+
+
+		DEBUG5("Handel initialisieren\n");
+		Creature* pl = (Creature*) wo;
+
+		// wenn der Handelspartner ein feindlich gesinnter Spieler ist, Aktion beenden
+		if (pl->getObjectType().getObjectType()==OBJECTTYPE_USER && pl->getMode()==MODE_AGRESSIVE )
+		{
+
+			m_trade_id=0;
+			getObjectType().setActionType(ACTION_NONE);
+			m_action->setType(ACTION_NONE);
+			m_command->setType(COMMAND_NONE);
+			return;
+		}
+
+		// Handelspartner hat schon einen Handel, Aktion abbrechen
+		if (pl->getTradeId()!=0)
+		{
+			m_trade_id=0;
+			getObjectType().setActionType(ACTION_NONE);
+			m_action->setType(ACTION_NONE);
+			m_command->setType(COMMAND_NONE);
+			return;
+		}
+
+		getObjectType().setActionType(ACTION_TRADE);	//Handel treiben
+		getObjectType().setDirection(getWorld()->getDirection(getCoordinateX(),getCoordinateY(),pl->getCoordinateX(),pl->getCoordinateY()));
+		m_action->setType(ACTION_TRADE);
+		m_action->setTime(200);				//200ms Zeit
+		m_action->setProgress(0);			//noch kein Fortschritt
+		m_action->setGoalObjectId(id);
+
+		if (pl->getState() == STATES_ACTIVE)
+			pl->getObjectType().setDirection(getWorld()->getDirection(pl->getCoordinateX(),pl->getCoordinateY(),getCoordinateX(),getCoordinateY()));
+
+		int trade_id = getWorld()->newTrade(wobase->m_id,id);
+		m_trade_id=trade_id;
+		Trade* trade = getWorld()->getTrade(trade_id);
+		if (trade_id==0 || trade ==0)
+		{
+			// Fehler aufgetreten, kein Trade Objekt initialisiert
+			m_trade_id=0;
+			getObjectType().setActionType(ACTION_NONE);
+			m_action->setType(ACTION_NONE);
+			m_command->setType(COMMAND_NONE);
+		}
+		else
+		{
+			// Trade Objekt mit den Daten der Handelspartner füllen
+			//trade->setMaxBaggage(getMaxBaggage(),0);
+		//	trade->setMaxBaggage(
+		//			//maximum weniger linkesitemgewicht, weniger rechtesitemgewicht, wenigerbodyitemgewicht
+		//			getMaxBaggage()-getLeftHandItem()->getWeight()-getRightHandItem()->getWeight()-getBodyItem()->getWeight() ,
+		//			0
+		//							 );
+			trade->setMaxBaggage(pl->getMaxBaggage(),0);
+		//	trade->setMaxBaggage(
+		//			//maximum weniger linkesitemgewicht, weniger rechtesitemgewicht, wenigerbodyitemgewicht
+		//			pl->getMaxBaggage()-pl->getLeftHandItem()->getWeight()-pl->getRightHandItem()->getWeight()-pl->getBodyItem()->getWeight(),
+		//			1
+		//							  );
+			trade->setCreatureType(getObjectType().getObjectType(),0);
+			trade->setCreatureType(pl->getObjectType().getObjectType(),1);
+			*(trade->getInventory(0)->getItems())= *(getItems()->getItems());
+			*(trade->getInventory(1)->getItems())= *(pl->getItems()->getItems());
+
+			pl->setTradeId(m_trade_id);
+		}
+	}
+}
+*/
+
+
+void Creature::gainExperience (int exp)
+{
+	if (getTypeInfo()->m_type != TypeInfo::TYPE_PLAYER)
+		return;
+
+
+	// Erfahrung dazu addieren
+	m_dyn_attr.m_experience += exp;
+
+	// Solange Level aufsteigen, bis exp < max_exp
+	while (m_dyn_attr.m_experience>= m_base_attr.m_max_experience)
+	{
+		gainLevel();
+	}
+}
+
+void Creature::gainLevel()
+{
+
+}
+
+/*
+void Creature::useItem(int type_id)
+{
+	DEBUG5("Item wird benutzt!");
+	// Testen ob valide id übergeben
+	if (type_id!=0)
+	{
+		Item* item;
+
+		// Item aus dem Inventar holen
+		item = getItems()->getItem(type_id);
+
+
+		// Testen ob Item erfolgreich geholt, sonst existiert es garnicht im Inventar
+		if (item!=0)
+		{
+			item->setNumber(1);
+			// gibt an ob das Item beim benutzen verbraucht wird
+			bool use_up=false;
+
+			// Gibt an, ob das Item vertauscht wurde
+			bool swap_item=false;
+			// altes Item (vor dem vertauschen)
+			Item* old_item=0;
+
+			// hier der switch nach itemtyp
+			Item* swap;
+			switch (item->getGeneralTypeId())
+			{
+				case ITEM_MONEY:
+					//Beispiel für Geld
+
+					break;
+				case ITEM_ARMOR:
+					// Beispiel für die Ruestung:
+					// Item am Körper mit dem rausgenommenen Item austauschen
+					swap = getBodyItem();
+					setBodyItem(item);
+					item=swap;
+
+					// Ruestungsklasse setzen
+					setArmor(getBodyItem()->getUsage());
+
+					// Item ist vertauscht worden
+					swap_item=true;
+					old_item=getBodyItem();
+					break;
+				case ITEM_WEAPON:
+					//Beispiel für Waffen
+					// Item in rechter Hand mit dem rausgenommenen Item austauschen
+					swap = getRightHandItem();
+					setRightHandItem(item);
+					item=swap;
+
+					// Angriffsklasse setzen
+					setAttack(getRightHandItem()->getUsage());
+
+					// Item ist vertauscht worden
+					swap_item=true;
+					old_item=getRightHandItem();
+					break;
+				case ITEM_POTION:
+					// Beispiel für Trank
+					// Lebenspunkte dazu addieren, wenn es weniger als m_max_health werden
+					if ((getMaxHealth())>(getHealth()+item->getUsage()))
+					{
+						DEBUG5("Lebenspunkte vorher: %i / %i", getHealth(), getMaxHealth());
+						setHealth(getHealth()+item->getUsage());
+						DEBUG5("Lebenspunkte nachher: %i / %i", getHealth(), getMaxHealth());
+					}
+					else
+					//sonst Lebenspunkte voll befüllen
+					{
+						DEBUG5("Lebenspunkte vorher: %i / %i", getHealth(), getMaxHealth());
+						setHealth(getMaxHealth());
+						DEBUG5("Lebenspunkte nachher: %i / %i", getHealth(), getMaxHealth());
+					}
+					// Traenke werden verbraucht
+					use_up=true;
+					break;
+				case ITEM_SHIELD:
+					//Beispiel für Schilde
+					// Item in linker Hand mit dem rausgenommenen Item austauschen
+					swap = getLeftHandItem();
+					setLeftHandItem(item);
+					item=swap;
+
+					// Verteidigungsklasse setzen
+					setDefense(getLeftHandItem()->getUsage());
+
+					// Item ist vertauscht worden
+					swap_item=true;
+					old_item=getLeftHandItem();
+					break;
+				default:
+					break;
+			};
+			// Wenn Gegenstand verbraucht wird, aus dem Inventar entfernen
+			if (use_up==true)
+			{
+				//Bsp 4 traenke, 1 entfernen bleiben 3
+				int tmpanz=item->getNumber();
+				getItems()->removeItem(item);
+				if (tmpanz!=1)
+				{
+					item->setNumber(--tmpanz);
+					getItems()->addItem(item);
+				}
+			}
+
+			if (swap_item==true)
+			{
+				getItems()->removeItem(old_item);
+				getItems()->addItem(item);
+			}
+
+			//das beim entnehmen aus dem Inventar angelegte temporaere Item löschen
+			if (item!=0)
+			{
+				delete item;
+			}
+			//printf("Aktion fuer beendet erklaeren!\n");
+			m_action->setType(ACTION_NONE);
+		}
+
+	}
+}
+
+*/
+
+void Creature::calcDamage(Action::ActionType act,Damage& dmg)
+{
+	// alles nullen
+	dmg.init();
+
+	dmg.m_attacker_id = getId();
+	dmg.m_attacker_fraction = getTypeInfo()->m_fraction;
+
+	DEBUG5("Calc Damage for action %i",m_action.m_type);
+	for (int i=0;i<4;i++)
+		dmg.m_multiplier[i]=1;
+
+	if (act == Action::NOACTION)
+		return;
+
+
+	// Schaden durch Basisattribute und ggf Ausruestung
+	calcBaseDamage(act,dmg);
+
+	// Modifikation des Schadens durch Faehigkeiten
+	calcAbilityDamage(act,dmg);
+
+	// Statusmods
+	// Blind
+	if (m_dyn_attr.m_status_mod_time[Damage::BLIND]>0)
+	{
+		// keine kritischen Treffer, Attackewert halbieren
+		dmg.m_crit_perc=0;
+		dmg.m_attack *= 0.5;
+	}
+
+	// verwirrt
+	if (m_dyn_attr.m_status_mod_time[Damage::CONFUSED]>0)
+	{
+		// Fraktion auf feindlich gegen alle setzen
+		dmg.m_attacker_fraction = TypeInfo::FRAC_HOSTILE_TO_ALL;
+	}
+}
+
+void Creature::calcBaseDamage(Action::ActionType act,Damage& dmg)
+{
+	// Basisaktion
+	Action::ActionType basact = Action::getActionInfo(act)->m_base_action;
+	CreatureBaseAttr* basm = getBaseAttrMod();
+
+
+	if (basact == Action::ATTACK)
+	{
+		// Basisaktion ist normaler Angriff
+		DEBUG5("base str %i mod str %i",m_base_attr.m_strength,basm->m_strength);
+
+		dmg.m_min_damage[Damage::PHYSICAL] += basm->m_strength/4;
+		dmg.m_min_damage[Damage::PHYSICAL] += basm->m_dexterity/10;
+		dmg.m_max_damage[Damage::PHYSICAL] += basm->m_strength/3;
+		dmg.m_max_damage[Damage::PHYSICAL] += basm->m_dexterity/8;
+
+
+		dmg.m_attack += basm->m_attack;
+		dmg.m_attack += basm->m_dexterity/5;
+
+		dmg.m_power += basm->m_strength;
+
+		dmg.m_special_flags = Damage::NOFLAGS;
+
+	}
+
+	if (basact == Action::MAGIC_ATTACK)
+	{
+		// Basisaktion ist magischer Angriff
+		dmg.m_min_damage[Damage::FIRE] += basm->m_magic_power/10;
+		dmg.m_min_damage[Damage::FIRE] += basm->m_willpower/20;
+		dmg.m_max_damage[Damage::FIRE] += basm->m_magic_power/6;
+		dmg.m_max_damage[Damage::FIRE] += basm->m_willpower/15;
+
+		dmg.m_special_flags = Damage::UNBLOCKABLE;
+
+		dmg.m_attack=0;
+
+	}
+
+	if (basact == Action::RANGE_ATTACK)
+	{
+		// Basisaktion ist Fernangriff
+		dmg.m_min_damage[Damage::PHYSICAL] += basm->m_strength/10;
+		dmg.m_min_damage[Damage::PHYSICAL] += basm->m_dexterity/6;
+		dmg.m_max_damage[Damage::PHYSICAL] += basm->m_strength/8;
+		dmg.m_max_damage[Damage::PHYSICAL] += basm->m_dexterity/4;
+
+		dmg.m_attack += basm->m_attack;
+		dmg.m_attack += basm->m_dexterity/3;
+
+		dmg.m_power += basm->m_dexterity;
+
+		dmg.m_special_flags = Damage::NOFLAGS;
+
+	}
+
+	if (basact == Action::HOLY_ATTACK)
+	{
+		// Basisaktion ist heiliger Angriff
+		dmg.m_min_damage[Damage::PHYSICAL] += basm->m_strength/9;
+		dmg.m_min_damage[Damage::PHYSICAL] += basm->m_willpower/6;
+		dmg.m_max_damage[Damage::PHYSICAL] += basm->m_strength/6;
+		dmg.m_max_damage[Damage::PHYSICAL] += basm->m_willpower/3;
+
+		dmg.m_attack += basm->m_attack;
+		dmg.m_attack += basm->m_dexterity/5;
+
+		dmg.m_power += basm->m_willpower;
+
+		dmg.m_special_flags = Damage::NOFLAGS;
+
+	}
+}
+
+void Creature::calcAbilityDamage(Action::ActionType act,Damage& dmg)
+{
+	// CreatureBaseAttr* basm = getBaseAttrMod();
+
+	// Eigenschaften durch passive  Faehigkeiten
+	if (checkAbility(Action::CRITICAL_STRIKE))
+	{
+		// 10% extra Chance auf kritische Treffer
+		dmg.m_crit_perc += 0.1;
+	}
+
+	// klirrende Kaelte
+	if (checkAbility(Action::CHILL))
+	{
+		// 20% mehr Schaden
+		dmg.m_multiplier[Damage::ICE] *= 1.2;
+	}
+
+	// Ionisation
+	if (checkAbility(Action::IONISATION))
+	{
+		// 20% mehr Schaden
+		dmg.m_multiplier[Damage::AIR] *= 1.2;
+	}
+
+	// Entzuenden
+	if (checkAbility(Action::INFLAME) && act >=Action::FIRE_BOLT && act<=Action::FIRE_WALL )
+	{
+		dmg.m_status_mod_power[Damage::BURNING] += m_base_attr_mod.m_magic_power;
+	}
+
+
+	// Eigenschaften durch temporaere Faehigkeiten
+
+	// Faehigkeit Feuer und Schwert
+	if (m_base_attr_mod.m_special_flags & FIRESWORD)
+	{
+		dmg.m_min_damage[Damage::PHYSICAL]*=0.75;
+		dmg.m_max_damage[Damage::PHYSICAL]*=0.75;
+		// Feuerschaden hinzufuegen
+		dmg.m_min_damage[Damage::FIRE] += min(m_base_attr_mod.m_magic_power*2.0f,dmg.m_min_damage[Damage::PHYSICAL]);
+		dmg.m_max_damage[Damage::FIRE] += min(m_base_attr_mod.m_magic_power*3.0f,dmg.m_max_damage[Damage::PHYSICAL]);
+
+		// kein Eisschaden
+		dmg.m_min_damage[Damage::ICE]=0;
+		dmg.m_max_damage[Damage::ICE]=0;
+
+		if (m_base_attr_mod.m_special_flags & FLAMESWORD)
+		{
+			// Statusmod brennend austeilen
+			dmg.m_status_mod_power[Damage::BURNING] += m_base_attr_mod.m_magic_power*3;
+		}
+	}
+
+	// Elfenaugen
+	if (m_base_attr_mod.m_special_flags & CRIT_HITS)
+	{
+		// +20% Chance auf kritische Treffer
+		dmg.m_crit_perc += 0.2;
+	}
+
+	// Eispfeile
+	if (m_base_attr_mod.m_special_flags & ICE_ARROWS)
+	{
+		dmg.m_min_damage[Damage::ICE] += min(m_base_attr_mod.m_magic_power*2.0f,dmg.m_min_damage[Damage::PHYSICAL]);
+		dmg.m_max_damage[Damage::ICE] += min(m_base_attr_mod.m_magic_power*3.0f,dmg.m_max_damage[Damage::PHYSICAL]);
+		dmg.m_min_damage[Damage::PHYSICAL]*=0.5;
+		dmg.m_max_damage[Damage::PHYSICAL]*=0.5;
+		dmg.m_min_damage[Damage::FIRE]=0;
+		dmg.m_max_damage[Damage::FIRE]=0;
+
+		if (m_base_attr_mod.m_special_flags & FROST_ARROWS)
+		{
+			// Statusmod einfrieren
+			dmg.m_status_mod_power[Damage::FROZEN] += m_base_attr_mod.m_magic_power*3;
+		}
+	}
+
+	// Windpfeile
+	if (m_base_attr_mod.m_special_flags & WIND_ARROWS)
+	{
+		dmg.m_min_damage[Damage::AIR] += min(m_base_attr_mod.m_magic_power*2.0f,dmg.m_min_damage[Damage::PHYSICAL]);
+		dmg.m_max_damage[Damage::AIR] += min(m_base_attr_mod.m_magic_power*3.0f,dmg.m_max_damage[Damage::PHYSICAL]);
+		dmg.m_min_damage[Damage::PHYSICAL]*=0.5;
+		dmg.m_max_damage[Damage::PHYSICAL]*=0.5;
+
+		if (m_base_attr_mod.m_special_flags & STORM_ARROWS)
+		{
+			dmg.m_multiplier[Damage::AIR] *= 1.4;
+		}
+	}
+
+	// Schaden der Faehigkeit an sich
+
+	switch (act)
+	{
+		case Action::BASH:
+			dmg.m_multiplier[Damage::PHYSICAL] *= 3;
+			break;
+
+		case Action::HAMMER_BASH:
+			dmg.m_multiplier[Damage::PHYSICAL] *= 2;
+			break;
+
+		case Action::AROUND_BLOW:
+			dmg.m_multiplier[Damage::PHYSICAL] *= 0.6;
+			break;
+
+		case Action::WHIRL_BLOW:
+			dmg.m_multiplier[Damage::PHYSICAL] *= 1;
+			break;
+
+		case Action::SMASH:
+			dmg.m_multiplier[Damage::PHYSICAL] *= 3;
+			// kann nicht geblockt werden,  Ruestung ignorieren
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			dmg.m_special_flags |= Damage::IGNORE_ARMOR;
+			break;
+
+		case Action::HATE_MAGE:
+			dmg.m_multiplier[Damage::PHYSICAL] *= 1;
+			dmg.m_status_mod_power[Damage::MUTE] += m_base_attr_mod.m_strength;
+			break;
+
+		case Action::CHARGE:
+			dmg.m_multiplier[Damage::PHYSICAL] *= m_command.m_damage_mult;
+			dmg.m_attack *=m_command.m_damage_mult*0.5;
+			break;
+
+		case Action::STORM_CHARGE:
+			dmg.m_multiplier[Damage::PHYSICAL] *= m_command.m_damage_mult;
+			dmg.m_attack *=m_command.m_damage_mult*0.5;
+			dmg.m_status_mod_power[Damage::PARALYZED] += (short)  (m_base_attr_mod.m_strength*m_command.m_damage_mult*0.2);
+			break;
+
+		case Action::FIRE_BOLT:
+			dmg.m_min_damage[Damage::FIRE] += m_base_attr_mod.m_magic_power*2;
+			dmg.m_max_damage[Damage::FIRE] += m_base_attr_mod.m_magic_power*3;
+			dmg.m_min_damage[Damage::ICE]=0;
+			dmg.m_max_damage[Damage::ICE]=0;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			break;
+
+		case Action::FIRE_STRIKE:
+			dmg.m_min_damage[Damage::FIRE] += m_base_attr_mod.m_magic_power*3.3;
+			dmg.m_max_damage[Damage::FIRE] += m_base_attr_mod.m_magic_power*5;
+			dmg.m_min_damage[Damage::ICE]=0;
+			dmg.m_max_damage[Damage::ICE]=0;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			break;
+
+		case Action::FIRE_WAVE:
+			dmg.m_min_damage[Damage::FIRE] += m_base_attr_mod.m_magic_power*1.5;
+			dmg.m_max_damage[Damage::FIRE] += m_base_attr_mod.m_magic_power*2;
+			dmg.m_min_damage[Damage::ICE]=0;
+			dmg.m_max_damage[Damage::ICE]=0;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			break;
+
+		case Action::FIRE_STORM:
+			dmg.m_min_damage[Damage::FIRE] += m_base_attr_mod.m_magic_power*2.5;
+			dmg.m_max_damage[Damage::FIRE] += m_base_attr_mod.m_magic_power*3;
+			dmg.m_min_damage[Damage::ICE]=0;
+			dmg.m_max_damage[Damage::ICE]=0;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			break;
+
+		case Action::FIRE_BALL:
+			dmg.m_min_damage[Damage::FIRE] += m_base_attr_mod.m_magic_power*2;
+			dmg.m_max_damage[Damage::FIRE] += m_base_attr_mod.m_magic_power*3;
+			dmg.m_min_damage[Damage::ICE]=0;
+			dmg.m_max_damage[Damage::ICE]=0;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			break;
+
+		case Action::INFERNO_BALL:
+			dmg.m_min_damage[Damage::FIRE] += m_base_attr_mod.m_magic_power*3.3;
+			dmg.m_max_damage[Damage::FIRE] += m_base_attr_mod.m_magic_power*5;
+			dmg.m_min_damage[Damage::ICE]=0;
+			dmg.m_max_damage[Damage::ICE]=0;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			break;
+
+		case	Action::FIRE_WALL:
+			dmg.m_min_damage[Damage::FIRE] = m_base_attr_mod.m_magic_power/1500.0;
+			dmg.m_max_damage[Damage::FIRE] = m_base_attr_mod.m_magic_power/1000.0;
+			dmg.m_min_damage[Damage::ICE]=0;
+			dmg.m_max_damage[Damage::ICE]=0;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			break;
+
+		case	Action::ICE_BOLT:
+			dmg.m_min_damage[Damage::ICE] += m_base_attr_mod.m_magic_power*2;
+			dmg.m_max_damage[Damage::ICE] += m_base_attr_mod.m_magic_power*3;
+			dmg.m_min_damage[Damage::FIRE]=0;
+			dmg.m_max_damage[Damage::FIRE]=0;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			break;
+
+		case	Action::ICE_SPIKE:
+			dmg.m_min_damage[Damage::ICE] += m_base_attr_mod.m_magic_power*3;
+			dmg.m_max_damage[Damage::ICE] += m_base_attr_mod.m_magic_power*4.5;
+			dmg.m_min_damage[Damage::FIRE]=0;
+			dmg.m_max_damage[Damage::FIRE]=0;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			break;
+
+		case	Action::SNOW_STORM:
+			dmg.m_min_damage[Damage::ICE] = m_base_attr_mod.m_magic_power/3;
+			dmg.m_max_damage[Damage::ICE] = m_base_attr_mod.m_magic_power/2;
+			dmg.m_min_damage[Damage::FIRE]=0;
+			dmg.m_max_damage[Damage::FIRE]=0;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			break;
+
+		case	Action::BLIZZARD:
+			dmg.m_min_damage[Damage::ICE] = m_base_attr_mod.m_magic_power/2;
+			dmg.m_max_damage[Damage::ICE] = m_base_attr_mod.m_magic_power/1.3;
+			dmg.m_min_damage[Damage::FIRE]=0;
+			dmg.m_max_damage[Damage::FIRE]=0;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			break;
+
+		case	Action::ICE_RING:
+			dmg.m_min_damage[Damage::ICE] += m_base_attr_mod.m_magic_power;
+			dmg.m_max_damage[Damage::ICE] += m_base_attr_mod.m_magic_power*1.5;
+			dmg.m_min_damage[Damage::FIRE]=0;
+			dmg.m_max_damage[Damage::FIRE]=0;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			break;
+
+		case	Action::FROST_RING:
+			dmg.m_min_damage[Damage::ICE] += m_base_attr_mod.m_magic_power*1.6;
+			dmg.m_max_damage[Damage::ICE] += m_base_attr_mod.m_magic_power*2.4;
+			dmg.m_min_damage[Damage::FIRE]=0;
+			dmg.m_max_damage[Damage::FIRE]=0;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			break;
+
+		case	Action::FREEZE:
+			dmg.m_min_damage[Damage::FIRE]=0;
+			dmg.m_max_damage[Damage::FIRE]=0;
+			dmg.m_status_mod_power[Damage::FROZEN] = m_base_attr_mod.m_magic_power;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			break;
+
+		case Action::LIGHTNING:
+			dmg.m_min_damage[Damage::AIR] += m_base_attr_mod.m_magic_power*1.5;
+			dmg.m_max_damage[Damage::AIR] += m_base_attr_mod.m_magic_power*3.5;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			break;
+
+		case Action::LIGHTNING_STRIKE:
+			dmg.m_min_damage[Damage::AIR] += m_base_attr_mod.m_magic_power*2.3;
+			dmg.m_max_damage[Damage::AIR] += m_base_attr_mod.m_magic_power*5;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			break;
+
+		case Action::THUNDERSTORM:
+			dmg.m_min_damage[Damage::AIR] = m_base_attr_mod.m_magic_power/5.0;
+			dmg.m_max_damage[Damage::AIR] = m_base_attr_mod.m_magic_power/1.5;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			break;
+
+		case Action::THUNDERSTORM2:
+			dmg.m_min_damage[Damage::AIR] = m_base_attr_mod.m_magic_power/3.0;
+			dmg.m_max_damage[Damage::AIR] = m_base_attr_mod.m_magic_power/1.0;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			break;
+
+		case Action::CHAIN_LIGHTNING:
+			dmg.m_min_damage[Damage::AIR] += m_base_attr_mod.m_magic_power*1;
+			dmg.m_max_damage[Damage::AIR] += m_base_attr_mod.m_magic_power*2.5;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			break;
+
+		case Action::CHAIN_LIGHTNING2:
+			dmg.m_min_damage[Damage::AIR] += m_base_attr_mod.m_magic_power*1.7;
+			dmg.m_max_damage[Damage::AIR] += m_base_attr_mod.m_magic_power*3.5;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			break;
+
+		// Faehigkeiten Schuetze
+		case Action::GUIDED_TRIPLE_SHOT:
+			dmg.m_multiplier[Damage::PHYSICAL] *= 1.5;
+			break;
+
+		case Action::MULTISHOT:
+			dmg.m_multiplier[Damage::PHYSICAL] *=0.75;
+			break;
+
+		case Action::WEAK_POINT:
+			dmg.m_status_mod_power[Damage::BERSERK] = m_base_attr_mod.m_dexterity;
+			break;
+
+		case Action::BLIND_RAGE:
+			dmg.m_status_mod_power[Damage::BLIND] = (short) (m_base_attr_mod.m_dexterity*1.5f);
+			dmg.m_status_mod_power[Damage::BERSERK] = m_base_attr_mod.m_dexterity;
+			break;
+
+		case Action::PIERCE:
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			break;
+
+		case Action::VOLLEY_SHOT:
+			dmg.m_multiplier[Damage::PHYSICAL] *=1;
+			break;
+
+		case Action::VACUUM:
+			dmg.m_min_damage[Damage::AIR] += m_base_attr_mod.m_dexterity*1;
+			dmg.m_max_damage[Damage::AIR] += m_base_attr_mod.m_dexterity*2;
+			dmg.m_status_mod_power[Damage::PARALYZED] = m_base_attr_mod.m_dexterity;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			break;
+
+		case Action::DEATH_ROULETTE:
+			dmg.m_multiplier[Damage::PHYSICAL] *=2;
+			break;
+
+		case Action::EXPLODING_ARROW:
+		case Action::EXPLOSION_CASCADE:
+			dmg.m_multiplier[Damage::PHYSICAL] *=2;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			break;
+
+
+
+		// Priester Faehigkeiten
+		case Action::HOLY_LIGHT:
+			dmg.m_min_damage[Damage::PHYSICAL]=0;
+			dmg.m_max_damage[Damage::PHYSICAL]=0;
+			dmg.m_min_damage[Damage::FIRE] +=m_base_attr_mod.m_willpower/3;
+			dmg.m_max_damage[Damage::FIRE] +=m_base_attr_mod.m_willpower/2;
+			dmg.m_min_damage[Damage::FIRE] += min(m_base_attr_mod.m_willpower/6,m_base_attr_mod.m_magic_power*2);
+			dmg.m_max_damage[Damage::FIRE] += min(m_base_attr_mod.m_willpower/4,m_base_attr_mod.m_magic_power*3);
+			dmg.m_min_damage[Damage::ICE]=0;
+			dmg.m_max_damage[Damage::ICE]=0;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			dmg.m_special_flags |= Damage::EXTRA_UNDEAD_DMG;
+			DEBUG("min %f max %f",dmg.m_min_damage[Damage::FIRE],dmg.m_max_damage[Damage::FIRE]);
+			break;
+
+		case Action::HOLY_FIRE:
+			dmg.m_min_damage[Damage::PHYSICAL]=0;
+			dmg.m_max_damage[Damage::PHYSICAL]=0;
+			dmg.m_min_damage[Damage::FIRE] +=m_base_attr_mod.m_willpower/2;
+			dmg.m_max_damage[Damage::FIRE] +=m_base_attr_mod.m_willpower/1.33;
+			dmg.m_min_damage[Damage::FIRE] += min(m_base_attr_mod.m_willpower/6,m_base_attr_mod.m_magic_power*2);
+			dmg.m_max_damage[Damage::FIRE] += min(m_base_attr_mod.m_willpower/4,m_base_attr_mod.m_magic_power*3);
+			dmg.m_min_damage[Damage::ICE]=0;
+			dmg.m_max_damage[Damage::ICE]=0;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			dmg.m_special_flags |= Damage::EXTRA_UNDEAD_DMG;
+			break;
+
+		case Action::LIGHT_BEAM:
+		case Action::BURNING_SUN:
+			dmg.init();
+			dmg.m_attacker_fraction = getTypeInfo()->m_fraction;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			dmg.m_status_mod_power[Damage::BLIND] = (short) (1.5*m_base_attr_mod.m_willpower);
+			break;
+
+		case Action::HYPNOSIS:
+		case Action::HYPNOSIS2:
+			dmg.init();
+			dmg.m_attacker_fraction = getTypeInfo()->m_fraction;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			dmg.m_status_mod_power[Damage::CONFUSED] = m_base_attr_mod.m_willpower;
+			break;
+
+		case Action::BREAK_BINDING:
+			dmg.m_min_damage[Damage::ICE] =m_base_attr_mod.m_willpower/6;
+			dmg.m_max_damage[Damage::ICE] =m_base_attr_mod.m_willpower/4;
+			dmg.m_min_damage[Damage::PHYSICAL] += min(m_base_attr_mod.m_willpower/3,m_base_attr_mod.m_magic_power*2);
+			dmg.m_max_damage[Damage::PHYSICAL] += min(m_base_attr_mod.m_willpower/2,m_base_attr_mod.m_magic_power*3);
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			dmg.m_special_flags |= Damage::EXTRA_SUMMONED_DMG;
+			break;
+
+		case Action::DISRUPT_BINDING:
+			dmg.m_min_damage[Damage::ICE]=0;
+			dmg.m_max_damage[Damage::ICE]=0;
+			dmg.m_min_damage[Damage::ICE] +=m_base_attr_mod.m_willpower/3;
+			dmg.m_max_damage[Damage::ICE] +=m_base_attr_mod.m_willpower/2;
+			dmg.m_min_damage[Damage::PHYSICAL] += min(m_base_attr_mod.m_willpower/2,m_base_attr_mod.m_magic_power*2);
+			dmg.m_max_damage[Damage::PHYSICAL] += min(m_base_attr_mod.m_willpower/1.33,m_base_attr_mod.m_magic_power*3.0);
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			dmg.m_special_flags |= Damage::EXTRA_SUMMONED_DMG;
+			break;
+
+		case Action::ACID:
+			dmg.init();
+			dmg.m_attacker_fraction = getTypeInfo()->m_fraction;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			dmg.m_status_mod_power[Damage::POISONED] = 2*m_base_attr_mod.m_willpower;
+			break;
+
+		case Action::DIVINE_WIND:
+		case Action::DIVINE_STORM:
+			dmg.m_min_damage[Damage::AIR] =m_base_attr_mod.m_willpower/2;
+			dmg.m_max_damage[Damage::AIR] =m_base_attr_mod.m_willpower/1;
+			dmg.m_special_flags |= Damage::UNBLOCKABLE;
+			break;
+
+        default:
+            break;
+	}
+
+	// Faehigkeit brennende Wut
+	if (getBaseAttrMod()->m_special_flags & BURNING_RAGE)
+	{
+		// 50% mehr physischen Schaden
+		dmg.m_multiplier[Damage::PHYSICAL] *= 1.5;
+	}
+
+	// temporaere Effekte, Multiplikatoren umsetzen
+
+	// Feuerschwert
+	if (m_base_attr_mod.m_special_flags & FIRESWORD)
+	{
+		dmg.m_multiplier[Damage::FIRE] *= dmg.m_multiplier[Damage::PHYSICAL];
+		dmg.m_multiplier[Damage::PHYSICAL]=1;
+	}
+
+	// Eispfeile
+	if (m_base_attr_mod.m_special_flags & ICE_ARROWS)
+	{
+		dmg.m_multiplier[Damage::ICE] *= dmg.m_multiplier[Damage::PHYSICAL];
+	}
+
+	// Windpfeile
+	if (m_base_attr_mod.m_special_flags & WIND_ARROWS)
+	{
+		dmg.m_multiplier[Damage::AIR] *= dmg.m_multiplier[Damage::PHYSICAL];
+	}
+
+
+
+}
+
+
+void Creature::recalcDamage()
+{
+
+}
+
+void Creature::calcBaseAttrMod()
+{
+
+	int i;
+	// Alle Werte auf die Basiswerte setzen
+	m_base_attr_mod.m_armor = m_base_attr.m_armor;
+	m_base_attr_mod.m_block =m_base_attr.m_block;
+	m_base_attr_mod.m_attack =m_base_attr.m_attack;
+	m_base_attr_mod.m_strength =m_base_attr.m_strength;
+	m_base_attr_mod.m_dexterity =m_base_attr.m_dexterity;
+	m_base_attr_mod.m_willpower =m_base_attr.m_willpower;
+	m_base_attr_mod.m_magic_power =m_base_attr.m_magic_power;
+	m_base_attr_mod.m_walk_speed =m_base_attr.m_walk_speed;
+	m_base_attr_mod.m_attack_speed =m_base_attr.m_attack_speed;
+	m_base_attr_mod.m_level =m_base_attr.m_level;
+	m_base_attr_mod.m_max_health =m_base_attr.m_max_health;
+
+	for (i=0;i<4;i++)
+	{
+		m_base_attr_mod.m_resistances[i] = m_base_attr.m_resistances[i];
+		m_base_attr_mod.m_resistances_cap[i] = m_base_attr.m_resistances_cap[i];
+
+	}
+
+	for (i=0;i<6;i++)
+	{
+		m_base_attr_mod.m_abilities[i] = m_base_attr.m_abilities[i];
+	}
+
+	m_base_attr_mod.m_special_flags = m_base_attr.m_special_flags;
+
+	// Alle Modifikationen neu anwenden, aber nicht neu in die Liste aufnehmen
+	list<CreatureBaseAttrMod>::iterator j;
+	for (j=m_dyn_attr.m_temp_mods.begin(); j!= m_dyn_attr.m_temp_mods.end();++j)
+	{
+		applyBaseAttrMod(&(*j),false);
+	}
+
+	// Wirkungen durch passive Faehigkeiten
+	if (checkAbility(Action::RESIST_ICE))
+		m_base_attr_mod.m_resistances[Damage::ICE] += 30;
+
+	if (checkAbility(Action::RESIST_AIR))
+		m_base_attr_mod.m_resistances[Damage::AIR] += 30;
+
+
+}
+
+bool Creature::reactOnUse( int id)
+{
+    return true;
+}
+
+void Creature::takeDamage(Damage* d)
+{
+	// Lebewesen kann nur im Zustand aktiv Schaden nehmen
+	if (getState() != STATE_ACTIVE)
+		return;
+
+	DEBUG4("take Damage %i",getId());
+	// Testen ob der Verursacher des Schadens feindlich gesinnt ist
+	if (getWorld()->getRelation(d->m_attacker_fraction,this) != HOSTILE)
+	{
+		// Verursacher ist nicht feindlich, kein Schaden
+		DEBUG5("not hostile, no dmg");
+		return;
+	}
+
+	// Testen ob man selbst der Verursacher ist
+	// (man kann sich selbst generell nicht schaden)
+	if (d->m_attacker_id == getId())
+	{
+		return;
+	}
+
+
+	float dmg=0,dmgt;
+	short res;
+	float rez = 1.0/RAND_MAX;
+	// testen ob der Schaden geblockt wird
+	if (!(d->m_special_flags & Damage::UNBLOCKABLE))
+	{
+		float block = m_base_attr_mod.m_block  ;
+
+
+		// Chance zu blocken ist 1 - Attackewert / Blockwert
+		if (d->m_attack<block)
+		{
+			if (rand()*rez>d->m_attack/block)
+			{
+				DEBUG5("blocked");
+				// Schaden abgewehrt
+				return;
+			}
+		}
+
+
+
+	}
+
+	m_dyn_attr.m_last_attacker_id = d->m_attacker_id;
+
+	// Wirkungen durch passive Faehigkeiten
+	if (checkAbility(Action::CONCENTRATION))
+	{
+		d->m_status_mod_power[Damage::CONFUSED]=0;
+	}
+
+	if (checkAbility(Action::MENTAL_WALL))
+	{
+		d->m_status_mod_power[Damage::BERSERK]=0;
+	}
+
+	// Testen auf kritische Treffer
+	if (rand()*rez <d->m_crit_perc)
+	{
+		DEBUG5("critical");
+		d->m_multiplier[Damage::PHYSICAL] *= 3;
+	}
+
+	// Berechnen des Schadens
+
+	// physischer Schaden
+	dmgt = d->m_min_damage[Damage::PHYSICAL] + rand()*rez *(d->m_max_damage[Damage::PHYSICAL] -d->m_min_damage[Damage::PHYSICAL]);
+	dmgt *= d->m_multiplier[Damage::PHYSICAL];
+
+	// Resistenz anwenden
+	res = min (m_base_attr_mod.m_resistances_cap[Damage::PHYSICAL],m_base_attr_mod.m_resistances[Damage::PHYSICAL]);
+	dmgt *= 0.01*(100-res);
+
+	// Ruestung anwenden
+	float armor = m_base_attr_mod.m_armor;
+
+	// Faehigkeit Turm in der Schlacht
+	if (checkAbility(Action::STEADFAST) && m_base_attr_mod.m_max_health *0.3 > m_dyn_attr.m_health)
+		armor *=1.5;
+
+
+	if (armor>d->m_power && !(d->m_special_flags & Damage::IGNORE_ARMOR))
+	{
+		dmgt = dmgt*d->m_power/armor;
+	}
+
+	dmg += dmgt;
+
+	DEBUG5("phys dmg %f",dmgt);
+
+
+	// restliche 3 Schadensarten
+	int i;
+	for (i=Damage::AIR;i<=Damage::FIRE;i++)
+	{
+		dmgt = d->m_min_damage[i] + rand()*rez *(d->m_max_damage[i] -d->m_min_damage[i]);
+		dmgt *= d->m_multiplier[i];
+
+		// Resistenz anwenden
+		res = min(m_base_attr_mod.m_resistances_cap[i],m_base_attr_mod.m_resistances[i]);
+		dmgt *=0.01*(100-res);
+
+		DEBUG5("dmg %i min %f max %f real %f",i,d->m_min_damage[i],d->m_max_damage[i],dmgt);
+		dmg += dmgt;
+
+	}
+
+	float t;
+	// Anwenden der Statusveraenderungen
+	for (i=0;i<NR_STATUS_MODS;i++)
+	{
+		// Anwenden wenn nicht immun, nicht temporaer immun und Staerke der Modifikation groesser als die eigene Willenskraft
+		if (d->m_status_mod_power[i]>0 && !(m_base_attr_mod.m_immunity & (1 << i)) && m_dyn_attr.m_status_mod_immune_time[i]==0)
+		{
+			DEBUG5("mod %i modpow %i wp %i",i,d->m_status_mod_power[i],m_base_attr_mod.m_willpower);
+			if (d->m_status_mod_power[i]>m_base_attr_mod.m_willpower)
+			{
+				// Modifikation anwenden
+				t = (d->m_status_mod_power[i]-m_base_attr_mod.m_willpower)*1.0 / m_base_attr_mod.m_willpower;
+				t *= 3000;
+				if (t>m_dyn_attr.m_status_mod_time[i])
+					m_dyn_attr.m_status_mod_time[i] =t;
+
+				DEBUG("applying status mod %i for %f ms",i,t);
+			}
+		}
+	}
+
+	DEBUG5("sum dmg %f",dmg);
+
+	// Lebenspunkte abziehen
+	getDynAttr()->m_health -= dmg;
+
+	if (dmg>0)
+	{
+		m_dyn_attr.m_effect_time[CreatureDynAttr::BLEEDING] = max(m_dyn_attr.m_effect_time[CreatureDynAttr::BLEEDING],150.0f);
+	}
+
+	// Statikschild wenn mehr als 2% der Lebenspunkte verloren
+	if ((m_base_attr_mod.m_special_flags & STATIC_SHIELD) && dmg > m_base_attr_mod.m_max_health * 0.02)
+	{
+		// Projektil Statikschild erzeugen
+		DmgProjectile* pr = new DmgProjectile(getWorld(),Projectile::STATIC_SHIELD,getTypeInfo()->m_fraction, getWorld()->getValidProjectileId());
+
+		// Schaden festlegen
+		Damage dmg;
+		dmg.m_status_mod_power[Damage::PARALYZED] = m_base_attr_mod.m_magic_power;
+		dmg.m_min_damage[Damage::AIR] = m_base_attr_mod.m_magic_power*0.2;
+		dmg.m_max_damage[Damage::AIR] = m_base_attr_mod.m_magic_power*0.3;
+		dmg.m_multiplier[Damage::AIR]=1;
+		dmg.m_attacker_fraction = getTypeInfo()->m_fraction;
+		memcpy(pr->getDamage(),&dmg,sizeof(Damage));
+		pr->getGeometry()->m_radius =getGeometry()->m_shape.m_radius+1;
+		getWorld()->insertProjectile(pr,getGeometry()->m_shape.m_coordinate_x,getGeometry()->m_shape.m_coordinate_y,getGridLocation()->m_region);
+	}
+}
+
+void Creature::applyDynAttrMod(CreatureDynAttrMod* mod)
+{
+	m_dyn_attr.m_health += mod->m_dhealth;
+
+	if (m_dyn_attr.m_health>m_base_attr_mod.m_max_health)
+		m_dyn_attr.m_health=m_base_attr_mod.m_max_health;
+
+
+	for (int i = 0;i< NR_STATUS_MODS;i++)
+	{
+		if (mod->m_dstatus_mod_immune_time[i]>0)
+		{
+			m_dyn_attr.m_status_mod_immune_time[i] = max(m_dyn_attr.m_status_mod_immune_time[i],mod->m_dstatus_mod_immune_time[i]);
+			m_dyn_attr.m_status_mod_time[i]=0;
+		}
+	}
+}
+
+void Creature::applyBaseAttrMod(CreatureBaseAttrMod* mod, bool add)
+{
+	int i;
+	// Deltawerte dazu addieren
+	m_base_attr_mod.m_armor +=mod->m_darmor;
+	m_base_attr_mod.m_block +=mod->m_dblock;
+	m_base_attr_mod.m_strength +=mod->m_dstrength;
+	m_base_attr_mod.m_dexterity +=mod->m_ddexterity;
+	m_base_attr_mod.m_willpower +=mod->m_dwillpower;
+	m_base_attr_mod.m_magic_power +=mod->m_dmagic_power;
+	m_base_attr_mod.m_walk_speed +=mod->m_dwalk_speed;
+	m_base_attr_mod.m_max_health += mod->m_dmax_health;
+	m_base_attr_mod.m_max_health += mod->m_dstrength*5;
+	m_base_attr_mod.m_attack_speed += mod->m_ddexterity*3;
+
+	if (mod->m_dmagic_power>0)
+	{
+		DEBUG("magic power mod %i",mod->m_dmagic_power);
+	}
+	m_base_attr_mod.m_attack_speed +=mod->m_dattack_speed;
+
+	// einige Untergrenzen pruefen
+	m_base_attr_mod.m_strength = max(m_base_attr_mod.m_strength,(short) 1);
+	m_base_attr_mod.m_dexterity = max(m_base_attr_mod.m_dexterity,(short) 1);
+	m_base_attr_mod.m_willpower = max(m_base_attr_mod.m_willpower,(short) 1);
+	m_base_attr_mod.m_magic_power = max(m_base_attr_mod.m_magic_power,(short) 1);
+	m_base_attr_mod.m_walk_speed = max(m_base_attr_mod.m_walk_speed,(short) 200);
+	m_base_attr_mod.m_attack_speed = max(m_base_attr_mod.m_attack_speed,(short) 200);
+
+	// Resiszenzen dazu addieren
+	for (i=0;i<4;i++)
+	{
+		m_base_attr_mod.m_resistances[i] += mod->m_dresistances[i];
+		m_base_attr_mod.m_resistances_cap[i] += mod->m_dresistances_cap[i];
+
+	}
+
+	// Faehigkeiten mit OR hinzufuegen
+	for (i=0;i<6;i++)
+	{
+		m_base_attr_mod.m_abilities[i] |= mod->m_xabilities[i];
+	}
+
+	// Flags mit OR hinzufuegen
+	m_base_attr_mod.m_special_flags |= mod->m_xspecial_flags;
+	m_base_attr_mod.m_immunity |= mod->m_ximmunity;
+
+	// Wenn add == true in die Liste der wirksamen Modifikationen aufnehmen
+	if (mod->m_time!=0 && add)
+	{
+		m_dyn_attr.m_temp_mods.push_back(*mod);
+
+		// Schaden neu berechnen
+		recalcDamage();
+	}
+
+
+}
+
+bool Creature::removeBaseAttrMod(CreatureBaseAttrMod* mod)
+{
+	int i;
+	bool ret = false;
+
+	// Deltas abziehen
+	m_base_attr_mod.m_armor -=mod->m_darmor;
+	m_base_attr_mod.m_block -=mod->m_dblock;
+	m_base_attr_mod.m_strength -=mod->m_dstrength;
+	m_base_attr_mod.m_dexterity -=mod->m_ddexterity;
+	m_base_attr_mod.m_willpower -=mod->m_dwillpower;
+	m_base_attr_mod.m_magic_power -=mod->m_dmagic_power;
+	m_base_attr_mod.m_walk_speed -=mod->m_dwalk_speed;
+	m_base_attr_mod.m_attack_speed -=mod->m_dattack_speed;
+	m_base_attr_mod.m_max_health -= mod->m_dstrength*5;
+	m_base_attr_mod.m_attack_speed -= mod->m_ddexterity*3;
+
+	for (i=0;i<4;i++)
+	{
+		m_base_attr_mod.m_resistances[i] -= mod->m_dresistances[i];
+		m_base_attr_mod.m_resistances_cap[i] -= mod->m_dresistances_cap[i];
+
+	}
+
+	// Wenn Faehigkeit veraendert wurde neu berechnen
+	for (i=0;i<6;i++)
+	{
+		if ( mod->m_xabilities[i]!=0)
+			ret = true;
+	}
+
+	// Wenn Flags veraendert wurden neu berechnen
+	if (mod->m_xspecial_flags!=0)
+		ret = true;
+
+	if( mod->m_ximmunity!=0)
+		ret = true;
+
+	// Schaden neu berechnen
+	recalcDamage();
+
+	return ret;
+}
+
+void Creature::getPathDirection(float x_start, float y_start,short region, float base_size, short layer, float dir[2])
+{
+	PathfindInfo** pi= &m_small_path_info;
+	int bsize =1;
+	// true wenn wegsuchendes Objekt fliegt
+	bool fly=false;
+
+	// ermitteln welche Wegfindeinformation genutzt werden soll
+	if (base_size>1)
+	{
+		DEBUG5("switching to medium size info");
+		pi = &m_medium_path_info;
+		bsize=2;
+	}
+	if (base_size>2)
+	{
+		DEBUG5("switching to big size info");
+		pi = &m_big_path_info;
+		bsize=4;
+	}
+
+	if ((layer & Geometry::LAYER_AIR) ==0)
+	{
+		DEBUG5("switching to flying info");
+		pi = &m_small_flying_path_info;
+		bsize=1;
+		fly = true;
+	}
+
+	Geometry* geom = getGeometry();
+	// true, wenn einfach direkter Weg zum Ziel gewaehlt werden soll
+	bool direct = false;
+
+	// true, wenn Wegfindeinformation neu berechnet werden muss
+	bool recalc = false;
+
+	// Position es Wegsuchenden Objekts
+	float x = geom->m_shape.m_coordinate_x;
+	float y = geom->m_shape.m_coordinate_y;
+
+
+	if (*pi == 0)
+	{
+		// Wegfindeinfo existiert noch nicht
+		*pi = new PathfindInfo;
+		// Qualitaet der Suche
+		int qual=4;
+		int dim = 20 * qual / bsize +1;
+
+		// Potenzialmatrix
+		(*pi)->m_pot = new Matrix2d<float>(dim,dim);
+		// Blockmatrix
+		(*pi)->m_block = new Matrix2d<char>(dim,dim);
+
+		(*pi)->m_dim = dim;
+
+		// Ebene ist Base und Air fuer normale, nur AIR fuer fliegende Lebewesen
+		(*pi)->m_layer= Geometry::LAYER_BASE | Geometry::LAYER_AIR;
+		if (fly)
+		{
+			(*pi)->m_layer= Geometry::LAYER_AIR;
+		}
+		(*pi)->m_region=getGridLocation()->m_region;
+		(*pi)->m_base_size = bsize;
+		(*pi)->m_quality=qual;
+		(*pi)->m_id = getId();
+		recalc = true;
+		DEBUG5("recalc: not pathinfo so far");
+	}
+	else
+	{
+		if ( (*pi)->m_region != getGridLocation()->m_region)
+		{
+			// Wegfindeinformation gilt fuer eine andere Region als die, in der sich das Lebewesen befindet
+			// Region neu setzen und neu berechnen
+			(*pi)->m_region=getGridLocation()->m_region;
+			recalc = true;
+			DEBUG5("recalc: new in Region");
+		}
+
+		// Ziel befindet sich in einer anderen Region, keinen Weg angeben
+		if ( region != getGridLocation()->m_region)
+		{
+			dir[0] =0;
+			dir[1] =0;
+			return;
+		}
+
+		// Abstand aktuelle Position zu Position fuer die die Wegfindeinformation erstellt wurde
+		float d = sqr((*pi)->m_start_x -x) +sqr((*pi)->m_start_y -y);
+
+		// Abstand des wegsuchenden Objektes zur einen Position
+		float d2 = sqr((*pi)->m_start_x -x_start) +sqr((*pi)->m_start_y -y_start);
+		if (fabs((*pi)->m_center_x -x_start)>10 || fabs((*pi)->m_center_y -y_start)>10)
+		{
+			// Direkte Wegsuche wenn das Ziel in einer Richtung mehr als 10 entfernt ist
+			direct = true;
+		}
+		else if (d>(*pi)->m_base_size && d > 0.25*d2)
+		{
+			// Ziel hat sich deutlich bewegt, neuen Weg suchen
+			DEBUG5("recalc: goal has moved");
+			recalc = true;
+		}
+
+		// Wenn Informationen ueber 500ms alt neu berechnen
+		if ((*pi)->m_timer >500)
+		{
+			DEBUG5("recalc: info too old");
+			recalc = true;
+		}
+
+	}
+
+	if (recalc && !direct)
+	{
+		// neu berechnen
+
+		// Zentrum und Senke sind die aktuelle Position
+		(*pi)->m_start_x= x;
+		(*pi)->m_start_y= y;
+		(*pi)->m_center_x= x;
+		(*pi)->m_center_y= y;
+		(*pi)->m_timer =0;
+
+		// Blockmatrix berechnen
+		bool suc;
+		suc = getWorld()->calcBlockmat(*pi);
+		if (suc!=true)
+			direct = true;
+		else
+		{
+			// Potentialfeld berechnen
+			suc = getWorld()->calcPotential(*pi);
+			if (suc!=true)
+				direct = true;
+		}
+	}
+
+	if (direct)
+	{
+		// Direkte Richtung
+		// Vektor vom Start zum Ziel, normiert
+		dir[0] = x-x_start;
+		dir[1] = y-y_start;
+
+		float rezsq = 1/(sqr(dir[0]) + sqr(dir[1]));
+		dir[0] *= rezsq;
+		dir[1] *= rezsq;
+
+	}
+	else
+	{
+		// Potentialfeld verwenden um die Richtung zu berechnen
+		DEBUG5("calcing direction from %f %f",x_start,y_start);
+		getWorld()->calcPathDirection(*pi, x_start, y_start, dir);
+	}
+}
+
+void Creature::toString(CharConv* cv)
+{
+	DEBUG5("Creature::tostring");
+	WorldObject::toString(cv);
+	cv->toBuffer((char) getTypeInfo()->m_category);
+	cv->toBuffer((char) getTypeInfo()->m_fraction);
+	m_action.toString(cv);
+	cv->toBuffer((float) (m_dyn_attr.m_health / m_base_attr_mod.m_max_health));
+	// Statusveraenderungen
+	char c=0;
+	for (int i=0;i<NR_STATUS_MODS;i++)
+	{
+		if (m_dyn_attr.m_status_mod_time[i]>0)
+		{
+			c |= (1 <<i );
+		}
+	}
+	cv->toBuffer(c);
+
+	// Effekte
+	c=0;
+	for (int i=0;i<NR_EFFECTS;i++)
+	{
+		if (m_dyn_attr.m_effect_time[i]>0)
+		{
+			c |= (1 <<i );
+		}
+	}
+	cv->toBuffer(c);
+	 /*
+	#define hex(a) ((a)>=10) ? (a)-10+'a' : (a)+'0'
+	 unsigned char* cp;
+	 for (int i=-12;buf+i<(char*) bp;i++)
+	 {
+		 cp = (unsigned char*) buf+i;
+		 //if (i%10==8)
+		//	 printf("\n %p\n",cp);
+
+		 printf("%c%c ",hex(*cp/16),hex(*cp%16));
+
+	 }
+	 printf("\n\n");
+*/
+
+
+}
+
+bool Creature::checkAbility(Action::ActionType at)
+{
+	if (at<0 || at >=192)
+		return false;
+
+	int nr = at / 32;
+	int mask = 1 << (at % 32);
+	DEBUG5("test: %i %i %i",at,nr,mask);
+
+	if ((m_base_attr_mod.m_abilities[nr] & mask) !=0)
+	{
+		DEBUG5("funktioniert %x %x %x",m_base_attr_mod.m_abilities[nr],mask,m_base_attr_mod.m_abilities[nr] & mask);
+		return true;
+	}
+	return false;
+}
+
+
+bool Creature::checkAbilityLearnable(Action::ActionType at)
+{
+	if (checkAbility(at))
+	{
+		// Faehigkeit ist schon erlernt
+		return false;
+	}
+
+	Action::ActionInfo* aci = Action::getActionInfo(at);
+
+	if (aci->m_req_level > m_base_attr.m_level)
+	{
+		// Levelvorraussetzung nicht erfuellt
+		return false;
+	}
+
+
+	for (int i=0;i<3;i++)
+	{
+		if (!checkAbility(aci->m_req_ability[i]))
+		{
+			// Faehigkeiten Vorraussetzung nicht erfuellt
+			return false;
+		}
+	}
+	return true;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/creature.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,523 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf, Chris Drechsler, Daniel Erler
+
+	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.
+*/
+/**
+ * \file Creature.h
+ * \defgroup Creature \ Lebewesen
+ * \ingroup worldobject
+ * \brief Klasse Creature
+ * \author Hans Wulf
+ * \version 1.0
+ * \date 2007/05/28
+ * \note Beinhaltet die Klasse Creature
+ */
+
+#ifndef CREATURE_H
+#define CREATURE_H
+#include <string>
+#include <list>
+#include <algorithm>
+#include "world.h"
+#include "serverwobject.h"
+#include "serveraction.h"
+#include "command.h"
+#include "damage.h"
+#include "itemlist.h"
+#include "creaturestruct.h"
+#include "itemfactory.h"
+// debugging
+#include <iostream>
+
+/**
+ * \class Creature
+ * 
+  * \brief Lebewesen
+ * 
+ * Alle Lebewesen in der Welt sind Objekte der Klasse Creature
+ * 
+ */
+
+// forward declaration
+/**
+ * \fn class Creature
+ * \brief Klasse fuer Lebewesen
+ */
+class Creature : public ServerWObject 
+ {
+//Public stuff
+public:
+	//Fields
+	//Constructors
+	/**
+	 * \fn Creature(World* world, unsigned int id)
+	 * \brief Konstruktor
+	 * \param world Zeiger auf die Welt
+	 * \param id Id des Objekts
+	 *
+	 * Legt ein neues Creature Objekt an.
+	 */
+	Creature(World* world, unsigned int id);
+	
+	/**
+	 * \fn ~Creature();
+	 * \brief Destruktor
+	 *
+	 * Gibt den Allokierten Speicher wieder frei
+	 */
+	~Creature();
+	//Accessor Methods
+	
+	
+	
+	
+	/**
+	 * \fn ServerAction* getAction()
+	 * \brief Gibt einen Zeiger auf die aktuelle Aktion zur&uuml;ck
+	 * \return Action*, Zeiger auf die aktuelle Aktion
+	 */
+	ServerAction* getAction()
+	{
+		return &m_action;
+	}
+	
+	/**
+	 * \fn Command* getCommand()
+	 * \brief Gibt einen Zeiger auf das aktuelle Kommando zur&uuml;ck
+	 * \return Command*, Zeiger auf das aktuelle Kommando
+	 */
+	Command* getCommand()
+	{
+		return &m_command;
+	}
+	
+	/**
+	 * \fn Command* getNextCommand()
+	 * \brief Gibt einen Zeiger auf das naechsteKommando zur&uuml;ck
+	 * \return Command*, Zeiger auf das naechste Kommando
+	 */
+	Command* getNextCommand()
+	{
+		return &m_next_command;
+	}
+	
+	
+	
+	/**
+	 * \fn Damage* getDamage()
+	 * \brief Gibt einen Pointer auf die Damagestruktur zurueck, die den Schaden der aktuellen Aktion des Lebewesens bezeichnet.
+	 * \return Zeiger auf Damage
+	 */
+	Damage* getDamage()
+	{
+		return &m_damage;
+	}
+	
+	/**
+	 * \fn CreatureBaseAttr* getBaseAttrMod()
+	 * \brief Gibt einen Zeiger auf die Struktur mit den modifizierten Basisattributen des Lebewesens zurueck
+	 */
+	CreatureBaseAttr* getBaseAttrMod()
+	{
+		return &m_base_attr_mod;
+		
+	}
+	
+	/**
+	 * \fn CreatureBaseAttr* getBaseAttr()
+	 * \brief Gibt einen Zeiger auf die Struktur mit den Basisattributen des Lebewesens zurueck
+	 */
+	CreatureBaseAttr* getBaseAttr()
+	{
+		return &m_base_attr;
+		
+	}
+	
+	/**
+	 * \fn CreatureDynAttr* getDynAttr()
+	 * \brief Gibt einen Zeiger auf die Struktur mit den dynamischen Attributen des Lebewesens zurueck
+	 */
+	CreatureDynAttr* getDynAttr()
+	{
+		return &m_dyn_attr;
+	}
+	
+	/**
+	 * \fn int getTradeId()
+	 * \brief Gibt die ID des aktuellen Handelsvorgangs zur&uuml;ck. Wenn das Lebewesen aktuell nicht handelt wird 0 zurueckgegeben.
+	 * \return int ID des aktuellen Handelsvorgangs
+	 */
+	int getTradeId()
+	{
+		return m_trade_id;
+	}
+	
+	/**
+	 * \fn void setTradeId(int trade_id)
+	 * \brief Setzt ID des aktuellen Handelsvorgangs 
+	 * \param trade_id des aktuellen Handelsvorgangs
+	 */
+	void setTradeId(int trade_id)
+	{
+		m_trade_id = trade_id;
+	}
+	
+	
+	//Operations
+	/**
+	 * \fn virtual bool init ()
+	 * \brief Initialisiert das Objekt. Die Funktion ist virtuell und wird durch die abgeleiteten Klassen &uuml;berschrieben.
+	 * \return bool, der angibt ob die initialisierung erfolgreich war
+	 */
+	virtual bool init ();
+	
+	/**
+	 * \fn virtual bool destroy ()
+	 * \brief Zerstoert das Objekt. Die Funktion ist virtuell und wird durch die abgeleiteten Klassen &uuml;berschrieben.
+	 * \return bool, der angibt ob die Zerstoerung erfolgreich war
+	 */
+	virtual bool destroy();
+	
+	
+	/**
+	 * \fn virtual bool  update (float time);
+	 * \brief Updatefunktion des Lebewesens, welche für die angebene Zeit ausgeführt wird.
+	 * \param time Zeit die für update zur Verfügung steht
+	 * \return bool, Erfolgreiches Update?
+	 *
+	 * Die Updatefunktion des Lebewesens wird in regelm&auml;ssigen Abst&auml;nden von der World aufgerufen und ben&ouml;tigt die Angabe, wie viel Zeit f&uuml;r das Update zur Verf&uuml;gung gestellt wird. Der R&uuml;ckgabewert gibt dann an ob die Funktion erfolgreich ausgef&uuml;hrt wurde. Da die Funktion hier virtuell definiert wird, wird sie erst in den abgeleiteten Klassen implementiert.
+	 */
+	virtual bool  update (float time);
+	
+	
+	/**
+	 * \fn reactOnUse(int id)
+	 * \brief Beschreibt die Reaktion des Lebewesens, wenn ein anderes Lebewesen auf es die Aktion benutzen ausführt.  
+	 * \param id ist die ID des Lebewesens, welche die Aktion benutzen ausgeführt hat
+	 */
+	bool reactOnUse(int id);
+	
+	
+	/**
+	 * \fn void gainExperience (int exp)
+	 * \brief Das Lebewesen gewinnt exp Erfahrungspunkte. Wenn dabei die noetigen Erfahrungspunkte fuer ein Levelup erreicht werden wird gainLevel() aufgerufen.
+	 * \param exp gewonnene Erfahrungspunkte
+	 */
+	virtual void gainExperience (int exp);
+	
+	
+	/**
+	 * \fn void takeDamage(Damage* damage)
+	 * \brief Das Lebewesen nimmt Schaden in der in damage angegebenen Art und Hoehe. Verändert die dynamischen Attribute des Lebewesens.
+	 * \param damage Schadensart und -hoehe
+	 */
+	void takeDamage(Damage* damage);
+	
+	/**
+	 * \fn void applyBaseAttrMod(CreatureBaseAttrMod* mod,bool add = true)
+	 * \brief Wendet fuer die Zeitdauer time die temporaere Modifikation mod auf das Lebewesen an. Falls time gleich 0 so wird die Veraenderung permanent angewendet
+	 * \param mod Modifikation
+	 */
+	void applyBaseAttrMod(CreatureBaseAttrMod* mod, bool add = true);
+	
+	/**
+	 * \fn applyDynAttrMod(CreatureBaseAttrMod* mod);
+	 * \brief Wendet eine Modifikation der Dynamischen Attribute an
+	 * \param mod Modifikation
+	 */
+	void applyDynAttrMod(CreatureDynAttrMod* mod);
+	
+	/**
+	 * \fn void removeBaseAttrMod(CreatureBaseAttrMod* mod)
+	 * \brief Entfernt alle Veraenderungen, die durch die Modifikation entstanden sind
+	 * \param mod Modifikation
+	 * return gibt an, ob die Basisattribute komplett neu berechnet werden muessen
+	 */
+	bool removeBaseAttrMod(CreatureBaseAttrMod* mod);
+	
+
+	/*
+	 *\fn useItem(Item* item)
+	 *\brief Verwendet einen Gegenstand. Der angegebene Gegenstand wird dabei veraendert, insbesondere ist item nach nach der Ausfuehrung der Funktion ein Nullzeiger, wenn das Item verbraucht wird.
+	 *\param item Gegenstand der verwendet werden soll
+	 */
+	//void useItem(Item* &item);
+	
+	/**
+	 * \fn getPathDirection(float dir[2])
+	 * \brief Gibt die Richtung zurueck, in die man vom Startpunkt aus gehen muss um zu dem Lebewesen zu gelangen
+	 * \param x_start x-Koordinate des Startpunktes
+	 * \param y_start y-Koordinate des Startpunktes
+	 * \param base_size Durchmesser der Standflaeche des Weg suchenden Lebewesens
+	 * \param layer Ebene in der auf Kollisionen getestet werden soll
+	 * \param dir Rueckgabevektor
+	 */
+	void getPathDirection(float x_start, float  y_start,short region, float base_size, short layer,  float dir[2]);
+	
+		
+	/**
+	 * \fn void calcWalkDir(float goalx,goaly,ServerWObject* goal)
+	 * \brief Sucht den Weg zu einem Punkt und setzt die Bewegungsgeschwindigkeit entspechend
+	 * \param goalx x-Koordinate des Zieles
+	 * \param goaly y-Koordinate des Zieles
+	 * \param goal Zeiger auf das Zielobject
+	 */
+	void calcWalkDir(float goalx,float goaly,ServerWObject* goal);
+	
+		/**
+	 * \fn void toString(CharConv* cv)
+	 * \brief Konvertiert das Objekt in einen String und schreibt ihn in der Puffer
+	 * \param buf Ausgabepuffer
+	 * \return Zeiger hinter den beschriebenen Datenbereich
+		 */
+	virtual void toString(CharConv* cv);
+
+	
+	
+protected:
+	
+	/**
+ 	* \fn virtual void gainLevel()
+	* \brief Wird aufgerufen, wenn das Lebewesen ein Levelup erhält. Passt Erfahrung und alle Basisattribute an.
+	*/
+	virtual void gainLevel();
+	
+	/**
+	 * \fn virtual void calcBaseAttrMod()
+	 * \brief Die modifizierten Basisattribute werden neu berechnet. Verwendet die Basisattribute, verwendete Items, sowie temporaere Modifikationen.
+	 */
+	virtual void calcBaseAttrMod();
+	
+	/**
+	 * \fn virtual void calcDamage(ActionType type,Damage& dmg)
+	 * \brief Berechnet den Schaden fuer die aktuell ausgefuehrte Aktion
+	 */
+	virtual void calcDamage(Action::ActionType act,Damage& dmg);
+	
+	/**
+	 * \fn virtual void recalcDamage();
+	 * \brief Berechnet den Schaden, der in internen Damage Objekten angezeigt wird neu
+	 */
+	virtual void recalcDamage();
+	
+	/**
+	 * \fn virtual void calcDamage(ActionType type,Damage& dmg)
+	 * \brief Berechnet den Basisschaden einer Aktion
+	 */
+	virtual void calcBaseDamage(Action::ActionType act,Damage& dmg);
+	
+	/**
+	 * \fn virtual void calcDamage(ActionType type,Damage& dmg)
+	 * \brief Berechnet den Schaden mit Modifikationen durch Faehigkeiten aus dem Basisschaden
+	 */
+	virtual void calcAbilityDamage(Action::ActionType act,Damage& dmg);
+	
+	
+	
+	/**
+	 * \fn virtual void calcAction()
+	 * \brief Berechnet die naechste Aktion
+	 */
+	virtual void calcAction();
+	
+	/**
+	 * \fn virtual void updateCommand()
+	 * \brief aktualisiert das aktuelle Kommando
+	 */
+	virtual void updateCommand();
+	
+	/**
+	 * \fn void calcStatusModCommand()
+	 * \brief Berechnet Kommando, die aufgrund eines Statusmods ausgefuehrt wird
+	 */
+	void calcStatusModCommand();
+		
+	/**
+	 * \fn virtual void initAction()
+	 * \brief initialisiert die aktuell gesetzte Aktion
+	 */
+	virtual void initAction();
+	
+	/**
+	 * \fn virtual float performAction(float time)
+	 * \brief Fuehrt die aktuell gesetzte Aktion fuer die Zeit time aus. Falls der Abschluss der Aktion weniger Zeit in Anspruch nimmt, wird die restliche Zeit zurueckgegeben.
+	 * \param time zur Verfuegung stehende Zeit in ms
+	 * \return Restzeit
+	 */
+	virtual void performAction(float &time);
+	
+	/**
+	 * \fn virtual void performActionCritPart(float dtime, float goalx, float goaly, Creature* cgoal)
+	 * \brief Fuehrt den entscheidenden Part einer Action (Schaden austeilen, Status veraendern usw aus
+	 * \param goalx x-Koordinate des Zieles
+	 * \param goaly x-Koordinate des Zieles
+	 * \param goal Zeiger auf der Zielobjekt, ist NULL wenn kein Zielobjekt existiert
+	 */
+	virtual void performActionCritPart(float goalx, float goaly, ServerWObject* goal);
+	
+	/**
+	 * \fn virtual void die()
+	 * \brief Wird aufgerufen, wenn die aktuellen Lebenspunkte unter 0 sinken. Die genaue Wirkung der Funktion ist abhängig vom exakten Typ des Lebewesens (Monster etc)
+	*/
+	virtual void die();
+	
+	/**
+	 * \fn void handleCollision(Shape* s)
+	 * \brief Fuehrt die Behandlung einer Kollision mit einem Objekt mit der angegebenen Grundfläche aus
+	 * \param s Form der Grundfläche des kollidierenden Objektes
+	 */
+	void handleCollision(Shape* s);
+	
+	/**
+	 * \fn void collisionDetection(float time)
+	 * \brief Untersucht ob in der naechsten Zeit Kollisionen zu erwarten sind
+	 * \param time Zeitraum um den vorrausgerechnet wird
+	 */
+	void collisionDetection(float time);
+	
+	/**
+	 * \fn bool checkAbility(Action::ActionType at)
+	 * \brief Prueft ob die Kreatur ueber die angegebene Faehigkeit verfuegt
+	 * \param at Faehigkeit
+	 * \return true, wenn die Faehigkeit verfuegbar ist
+	 */
+	bool checkAbility(Action::ActionType at);
+
+	
+		/**
+	 * \fn bool checkAbilityLearnable(Action::ActionType at)
+	 * \brief Testet ob eine Faehigkeit erlernbar ist
+	 * \param at Faehigkeit
+	 * \return true, wenn die Faehigkeit erlernbar ist
+		 */
+	bool checkAbilityLearnable(Action::ActionType at);
+	
+	/**
+	 * \fn virtual Action::ActionEquip getActionEquip()
+	 * \brief Gibt aus, ob die Aktion einhaendig oder zweihaendig ausgefuehrt wird
+	 */
+	virtual Action::ActionEquip getActionEquip() =0;
+			
+
+//Private stuff
+private:
+	//Fields
+	
+	
+	
+	
+	/**
+	 * \var m_action;
+	 * \brief Aktion die gerade ausgef&uuml;hrt wird
+	 */
+	ServerAction m_action;
+	
+	/**
+	 * \var m_command;
+	 * \brief Kommando das gerade abgearbeitet wird
+	 */
+	Command m_command;
+	
+	/**
+	 * \var m_next_command;
+	 * \brief Kommando das als naechstes abgearbeitet wird
+	 */
+	Command m_next_command;
+	
+	
+	/**
+	 * \var m_trade_id
+	 * \brief Id des aktuellen Handelsvorgangs
+	 */
+	int m_trade_id;
+	
+	/**
+	 * \var m_base_attr
+	 * \brief Basisattribute des Lebewesens
+	 */
+	CreatureBaseAttr m_base_attr;
+	
+	/**
+	 * \var m_base_attr_mod
+	 * \brief Basisattribute des Lebewesens nach Modifikationen durch Items und temporaere Effekte
+	 */
+	CreatureBaseAttr m_base_attr_mod;
+	
+	
+	/**
+	 * \var m_dyn_attr
+	 * \brief alle sich schnell aendernden Attribute und temporaeren Modifikationen des Lebewesens
+	 */
+	CreatureDynAttr m_dyn_attr;
+	
+	/**
+	 * \var m_damage
+	 * \brief Objekt welches angibt, welcher Schaden mit der aktuellen Aktion angerichtet wird
+	 */
+	Damage m_damage;
+	
+	protected:
+	
+	
+	/**
+	 * \var m_timer1
+	 * \brief Gibt die Zeit in ms an, fuer welche Aktionen die Timer1 benoetigen nicht benutzt werden koennen
+	 */
+	float m_timer1;
+	
+	/**
+	 * \var m_timer2
+	 * \brief Gibt die Zeit in ms an, fuer welche Aktionen die Timer2 benoetigen nicht benutzt werden koennen
+	 */
+	float m_timer2;
+	
+	/**
+	 * \var float m_timer2_max
+	 * \brief Zeit von Timer2 in ms beim starten des Timers
+	 */
+	float m_timer2_max;
+	
+	/**
+	 * \var float m_timer1_max
+	 * \brief Zeit von Timer1 in ms beim starten des Timers
+	 */
+	float m_timer1_max;
+	
+	/**
+	 * \var Action::ActionType m_base_action
+	 * \brief Grundaktion
+	 */
+	Action::ActionType m_base_action;
+	
+
+	PathfindInfo* m_small_path_info;
+	PathfindInfo* m_small_flying_path_info;
+	PathfindInfo* m_medium_path_info;
+	PathfindInfo* m_big_path_info;
+	
+	
+
+	PathfindInfo* m_path_info;
+	
+
+	//Constructors
+	//Accessor Methods
+	//Operations
+};
+
+#endif //CREATURE_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/creaturestruct.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,383 @@
+
+#ifndef CREATURESTRUCT_H
+#define CREATURESTRUCT_H
+
+using namespace std;
+
+
+#include <list>
+#include <string.h>
+
+
+
+#define NR_STATUS_MODS 8
+
+#define NR_EFFECTS 1
+
+/**
+ * \struct CreatureBaseAttr
+ * \brief Struktor mit den Basisattributen einer Kreatur
+ */
+struct CreatureBaseAttr
+{
+	/**
+	 * \enum Attribute
+	 * \brief Aufzaehlung der Attributwerte
+	 */
+	enum Attribute
+	{
+		STRENGTH =0,
+		DEXTERITY=1,
+		MAGIC_POWER =2,
+		WILLPOWER =3
+	};
+	
+	/**
+	 * \var m_max_health;
+	 * \brief maximale Gesundheitspunkte
+	 */
+	float m_max_health;
+	
+	/**
+	 * \var m_level;
+	 * \brief Erfahrungslevel
+	 */
+	char m_level;
+	
+	/**
+	 * \var m_armor;
+	 * \brief der passive R&uuml;stungswert, beeinflusst den Schaden von Angriffen
+	 */
+	short m_armor;
+	
+	/**
+	 * \var m_block;
+	 * \brief der aktive Verteidigungswert, beeinflusst die Chance Angriffe abzuwehren
+	 */
+	short m_block;
+	
+	/**
+	 * \var m_attack;
+	 * \brief Attackewert, beeinfluss die Trefferchance
+	 */
+	short m_attack;
+	
+	
+	/**
+	 * \var m_strength
+	 * \brief Staerke des Lebewesens
+	 */
+	short m_strength;
+	
+	/**
+	 * \var m_dexterity
+	 * \brief Geschicklichkeit des Lebewesens
+	 */
+	short m_dexterity;
+	
+	
+	/**
+	 * \var m_magic_power
+	 * \brief Zauberkraft des Lebewesens
+	 */
+	short m_magic_power;
+	
+	/**
+	 * \var m_willpower;
+	 * \brief Willenskraft des Lebewesens
+	 */
+	short m_willpower;
+	
+	/**
+	 * \var m_resistances[4]
+	 * \brief Resistenzen des Lebewesens gegen die vier Schadensarten in Prozent
+	 */
+	short m_resistances[4];
+	
+	/**
+	 * \var m_resistances_cap[4]
+	 * \brief Obergrenzen fuer die Resistenzen des Lebewesens gegen die vier Schadensarten in Prozent
+	 */
+	short m_resistances_cap[4];
+	
+	/**
+	 * \var m_max_experience
+	 * \brief maximaler Erfahrungswert vor Erreichen des n&auml;chsten Level
+	 */
+	float m_max_experience;
+	
+	
+	/**
+	 * \var m_walk_speed
+	 * \brief gibt die Geschwindigkeit an, mit der der Spieler laufen kann, 100 entspricht einem Schritt pro Sekunde
+	 */
+	short m_walk_speed;
+	
+	/**
+	 * \var m_step_length
+	 * \brief Schrittlaenge beim laufen
+	 */
+	float m_step_length;
+	
+	/**
+	 * \var m_attack_speed
+	 * \brief gibt die Geschwindigkeit an, mit der der Spieler angreifen kann, 1000 entspricht einem Schlag pro Sekunde 
+	 */
+	short  m_attack_speed;
+	
+	/**
+	 * \var m_abilities[6]
+	 * \brief Bitmaske die angibt, welche Fähigkeiten der Spieler benutzen kann.
+	 */
+	int m_abilities[6];
+	
+	/**
+	 * \var m_attack_range
+	 * \brief Gibt die Reichweite der Waffe an. Fuer Schusswaffen auf  ITEM_BOW_RANGE setzen
+	 */
+	float m_attack_range;
+	
+	/**
+	 * \var m_special_flags
+	 * \brief Bitmaske, die angibt, welche Spezialfähigkeiten aktiviert sind (1 bedeutet aktiviert). Die Bedeutung der verschiedenen Bits ist von genauen Typ des Lebewesens abhängig.
+	 */
+	int m_special_flags;
+	
+	/**
+	 * \var char m_immunity
+	 * \brief Bitmaske, welche angibt gegen welche Statusveraenderungen das Lebewesen immun ist
+	 */
+	char m_immunity;
+	
+};
+
+/**
+ * \struct CreatureBaseAttrMod
+ * \brief Struktur fuer die Modifikationen der Basisattribute einer Kreatur
+ */
+struct CreatureBaseAttrMod
+{
+	/**
+	 * \var m_darmor;
+	 * \brief Aenderung des  R&uuml;stungswerts, beeinflusst den Schaden von Angriffen
+	 */
+	short m_darmor;
+	
+	/**
+	 * \var m_block;
+	 * \brief Aenderung des Blockwerts, beeinflusst die Chance Angriffe abzuwehren
+	 */
+	short m_dblock;
+	
+	/**
+	 * \var float m_dmax_health
+	 * \brief Aenderung der maximalen Lebenspunkte
+	 */
+	float m_dmax_health;
+	
+	/**
+	 * \var m_attack;
+	 * \brief Aenderung des Attackewertes, beeinflusst die Chance zu treffen
+	 */
+	short m_dattack;
+	
+	
+	/**
+	 * \var m_dstrength
+	 * \brief Aenderung der Staerke des Lebewesens
+	 */
+	short m_dstrength;
+	
+	/**
+	 * \var m_ddexterity
+	 * \brief Aenderung der Geschicklichkeit des Lebewesens
+	 */
+	short m_ddexterity;
+	
+	
+	/**
+	 * \var m_dmagic_power
+	 * \brief Aenderung der Zauberkraft des Lebewesens
+	 */
+	short m_dmagic_power;
+	
+	/**
+	 * \var m_dwillpower;
+	 * \brief Aenderung der Willenskraft des Lebewesens
+	 */
+	short m_dwillpower;
+	
+	/**
+	 * \var m_dresistances[4]
+	 * \brief Aenderung der Resistenzen des Lebewesens gegen die vier Schadensarten in Prozent
+	 */
+	short m_dresistances[4];
+	
+	/**
+	 * \var m_dresistances_cap[4]
+	 * \brief Aenderung der Obergrenzen fuer die Resistenzen des Lebewesens gegen die vier Schadensarten in Prozent
+	 */
+	short m_dresistances_cap[4];
+	/**
+	 * \var m_dwalk_speed
+	 * \brief Aenderung der  Geschwindigkeit, mit der der Spieler laufen kann, 100 entspricht einem Schritt pro Sekunde
+	 */
+	 
+	short m_dwalk_speed;
+	
+	/**
+	 * \var m_dattack_speed
+	 * \brief Aenderung der  Geschwindigkeit, mit der der Spieler angreifen kann, 100 entspricht einem Schlag pro Sekunde 
+	 */
+	short  m_dattack_speed;
+	
+	/**
+	 * \var m_xspecial_flags
+	 * \brief Aenderung der Specialflags. Die angegebene Bitmaske wird mit OR zur bestehenden hinzugefügt.
+	 */
+ 	int m_xspecial_flags;
+	
+	/**
+	 * \var m_time
+	 * \brief Zeitdauer, die diese Modifikation noch wirksam ist in Millisekunden
+	 */
+	float m_time;
+	
+	/**
+	 * \var m_xabilities[6]
+	 * \brief Bitmaske die die Aenderungen der Faehigkeiten angibt. Die angegebene Bitmaske wird mit OR zur bestehenden hinzugefügt.
+	 */
+	int m_xabilities[6];
+	
+	/**
+	 * \var char m_ximmunity
+	 * \brief Bitmaske die die Aenderungen der Immunitäten angibt. Die angegebene Bitmaske wird mit OR zur bestehenden hinzugefügt.
+	 */
+	
+	char m_ximmunity;
+	
+	/**
+	 * \fn void init()
+	 * \brief Belegt die Struktur mit Nullen
+	 */
+	void init()
+	{
+		DEBUG5("init CreatureBaseAttrMod");
+		// alles nullen
+		memset(this,0, sizeof(CreatureBaseAttrMod));
+	}
+	
+	/**
+	 * \fn CreatureBaseAttrMod()
+	 * \brief Konstruktor
+	 */
+	CreatureBaseAttrMod()
+	{
+		init();
+	}
+	
+};
+
+/**
+ * \struct CreatureDynAttr
+ * \brief Struktur mit den sich staendig aendernden Attributen eines Lebewesens
+ */
+struct CreatureDynAttr
+{
+	/**
+	 * \enum Effect
+	 * \brief Auflistung von visuellen Effekten
+	 */
+	enum Effect
+	{
+		
+		BLEEDING =0,
+	};
+	
+	
+	/**
+	 * \var m_health;
+	 * \brief Anzahl der aktuellen Gesundheitspunkte
+	 */
+	float m_health;
+	
+	/**
+	 * \var m_experience
+	 * \brief Erfahrungswert
+	 */
+	float m_experience;
+	
+	/**
+	 * \var m_last_attacker_id;
+	 * \brief ID des letzten Angreifers, von dem diese Kreatur zuletzt angegriffen wurde
+	 */	
+	int m_last_attacker_id;
+	
+	/**
+	 * \var float m_status_mod_time[NR_EFFECTS]
+	 * \brief Gibt an wielange verschiedene Effekte noch wirksam sind
+	 */
+	float m_effect_time[NR_EFFECTS];
+
+	/**
+	 * \var m_status_mod_time[NR_STATUS_MODS]
+	 * \brief Gibt an wie lange die verschiedenen Status Modifikationen noch wirken. Ein Wert von 0 bedeutet, dass die Statusmodifikation nicht wirksam ist
+	 */
+	float m_status_mod_time[NR_STATUS_MODS];
+	
+	/**
+	 * \var m_status_mod_immune_time[NR_STATUS_MODS]
+	 * \brief Gibt an, wie lange der Spieler gegen verschiedene Statusveränderungen immun ist.
+	 */
+	float m_status_mod_immune_time[NR_STATUS_MODS];
+	
+	/**
+	 * \var m_temp_mods
+	 * \brief Vektor mit alle aktuell wirkenden temporaeren Modifikation auf die Basisattribute
+	 */
+	list<CreatureBaseAttrMod> m_temp_mods;
+};
+
+/**
+ * \struct CreatureDynAttrMod
+ * \brief Struktur fuer die Aenderung der dynamischen Attribute eines Lebewesens
+ */
+struct CreatureDynAttrMod
+{
+	/**
+	 * \var  m_dhealth
+	 * \brief Aenderung der aktuellen Lebenspunkte
+	 **/
+	float m_dhealth;
+	
+	/**
+	 * \var float m_dstatus_mod_immune_time[NR_STATUS_MODS];
+	 * \brief Gibt an, wie lange der Spieler gegen verschiedene Statusveraenderungen immunisiert wird. Heilt
+	 **/
+	float m_dstatus_mod_immune_time[NR_STATUS_MODS];
+
+	/**
+	 * \fn void init()
+	 * \brief Belegt die Datenelemente mit Nullen
+	 */
+	void init()
+	{
+		DEBUG5("init CreatureDynAttrMod");
+		// alles nullen
+		memset(this,0, sizeof(CreatureDynAttrMod));
+	}
+	
+	/**
+	 * \fn CreatureDynAttrMod()
+	 * \brief Konstruktor
+	 */
+	CreatureDynAttrMod()
+	{
+		init();
+	}
+	
+};
+
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/damage.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,254 @@
+#include "damage.h"
+
+Damage::Damage()
+{
+	init();
+}
+
+void Damage::toString(CharConv* cv)
+{
+
+	int i;
+	for (i=0;i<4;i++)
+	{
+		cv->toBuffer(m_min_damage[i]);
+	}
+		
+	for (i=0;i<4;i++)
+	{
+		cv->toBuffer(m_max_damage[i]);
+	}
+	
+	for (i=0;i<4;i++)
+	{
+		cv->toBuffer(m_multiplier[i]);
+	}
+		
+	cv->toBuffer(m_attack);
+	cv->toBuffer(m_power);
+	cv->toBuffer(m_crit_perc);
+		
+	for (i=0;i<NR_STATUS_MODS;i++)
+	{
+		cv->toBuffer(m_status_mod_power[i]);
+	}
+		
+	cv->toBuffer(m_special_flags);
+	
+	
+}
+
+
+void Damage::fromString(CharConv* cv)
+{
+	
+	int i;
+	for (i=0;i<4;i++)
+	{
+		cv->fromBuffer<float>(m_min_damage[i]);
+	}
+		
+	for (i=0;i<4;i++)
+	{
+		cv->fromBuffer<float>(m_max_damage[i]);
+	}
+	
+	for (i=0;i<4;i++)
+	{
+		cv->fromBuffer<float>(m_multiplier[i]);
+	}
+		
+	cv->fromBuffer<float>(m_attack);
+	cv->fromBuffer<float>(m_power);
+	cv->fromBuffer<float>(m_crit_perc);
+		
+	for (i=0;i<NR_STATUS_MODS;i++)
+	{
+		cv->fromBuffer<short>(m_status_mod_power[i]);
+	}
+		
+	cv->fromBuffer<short>(m_special_flags );
+	
+}
+
+		
+void Damage::init()
+{
+		// alles nullen
+	memset(this,0, sizeof(Damage));
+	int i;
+		
+		// Multiplikatoren auf 1 setzen
+	for (i=0;i<4;i++)
+		m_multiplier[i]=1;
+}
+
+std::string Damage::getDamageTypeName(DamageType dt)
+{
+	switch(dt)
+	{
+		case PHYSICAL:
+			return "Phys.";
+		case FIRE:
+			return "Feuer";
+		case ICE:
+			return "Eis";
+		case AIR:
+			return "Luft";
+	}
+	return "";
+}
+
+std::string Damage::getStatusModName(StatusMods sm)
+{
+	switch(sm)
+	{
+		case BLIND:
+			return "blind";
+		case POISONED:
+			return "vergiftet";
+		case MUTE:
+			return "stumm";
+		case CONFUSED:
+			return "verwirrt";
+		case BERSERK:
+			return "Berserker";
+		case PARALYZED:
+			return "gelaehmt";
+		case FROZEN:
+			return "eingefroren";
+		case BURNING:
+			return "brennend";
+			
+	}
+	return "";
+}
+
+void Damage::normalize()
+{
+	for (int i=0;i<4;i++)
+	{
+		m_min_damage[i] *= m_multiplier[i];
+		m_max_damage[i] *= m_multiplier[i];
+		m_multiplier[i]=1;
+	}
+}
+
+float Damage::getSumMinDamage()
+{
+	float s=0;
+	for (int i =0;i<4;i++)
+		s+=m_min_damage[i];
+	return s;
+}
+
+float Damage::getSumMaxDamage()
+{
+	float s=0;
+	for (int i =0;i<4;i++)
+		s+=m_max_damage[i];
+	return s;
+}
+
+std::string Damage::getDamageString(Damage::Usage usage)
+{
+	ostringstream out_stream;
+	out_stream.str("");
+	bool first = true;
+	int i;
+	// Schaden anzeigen
+	for (i=0;i<4;i++)
+	{
+		if (m_max_damage[i]>0)
+		{
+			if (!first)
+				out_stream << "\n";
+			
+			first = false;
+			out_stream <<getDamageTypeName((DamageType) i) <<": "<<(int) m_min_damage[i]<<"-"<< (int) m_max_damage[i];
+		}
+	}
+	
+	// Multiplikatoren anzeigen
+	for (i=0;i<4;i++)
+	{
+		if (m_multiplier[i]!=1 && (m_max_damage[i]>0 || usage ==ITEM))
+		{
+			if (!first)
+				out_stream << "\n";
+			
+			first = false;
+			if (m_multiplier[i]>1)
+			{
+				out_stream <<getDamageTypeName((DamageType) i) <<": +"<<(int) (100*(m_multiplier[i]-1))<< "% Schaden";
+			}
+			else
+			{
+				out_stream <<getDamageTypeName((DamageType) i) <<": -"<<(int) (100*(1-m_multiplier[i]))<< "% Schaden";
+			}
+		}
+	}
+	if (usage != NORMAL)
+	{
+		// Attackewert anzeigen
+		if (m_attack>0)
+		{
+			if (!first)
+				out_stream << "\n";
+			
+			first = false;
+			if (m_special_flags & UNBLOCKABLE)
+			{
+				out_stream <<"trifft immer" ;
+			}
+			else
+			{
+				out_stream <<"Attacke: "<<(int) m_attack;
+			}
+		}
+		
+		// Durchschlagskraft anzeigen
+		if (m_power>0)
+		{
+			if (!first)
+				out_stream << "\n";
+			
+			first = false;
+			if (m_special_flags & IGNORE_ARMOR)
+			{
+				out_stream << "ignoriert Ruestung";
+			}
+			else
+			{
+				out_stream <<"Durchschlagskraft: "<<(int) m_power;
+			}
+		}
+		
+		// Chance auf kritische Treffer
+		if (m_crit_perc>0 && !first)
+		{
+			out_stream << "\n";
+			
+			out_stream << "Chance auf krit. Treffer: "<<(int) (100*m_crit_perc)<<"%";
+			
+		}
+	}
+	
+	// Statusveraenderungen
+	for (i=0;i<8;i++)
+	{
+		if (m_status_mod_power[i]>0)
+		{
+			if (!first)
+				out_stream << "\n";
+			
+			first = false;
+			
+			out_stream <<getStatusModName((StatusMods) i) <<": "<<m_status_mod_power[i];
+		}
+ 	}
+	
+	return out_stream.str();
+	
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/damage.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,207 @@
+#ifndef DAMAGE_H
+#define DAMAGE_H
+
+
+#include "worldobject.h"
+#include <stdlib.h>
+#include <string>
+#include <string.h>
+
+#define NR_STATUS_MODS 8
+
+/**
+ * \struct Damage
+ * \brief Parameter fuer ausgeteilten Schaden
+ */
+struct Damage 
+{
+	/**
+	 * \var m_min_damage[4]
+	 * \brief Gibt den minimalen Schaden fuer die vier verschiedenen Schadensarten an.
+	 */
+	float m_min_damage[4];
+	
+	/**
+	 * \var m_max_damage[4]
+	 * \brief Gibt den maximalen Schaden fuer die vier verschiedenen Schadensarten an.
+	 */
+	float m_max_damage[4];
+	
+	/**
+	 * \var m_multiplier[4]
+	 * \brief Multiplikatoren fuer die einzelnen Schadensarten
+	 */
+	float m_multiplier[4];
+	
+	/**
+	 * \var m_attack
+	 * \brief Gibt den Attackwert an. Der Attackewert beeinflusst Trefferchance.
+	 */
+	float m_attack;
+	
+	/**
+	 * \var m_power
+	 * \brief Gibt die Durchschlagskraft an. Die Durchschlagskraft beeinflusst, wie stark der Schaden durch die Ruestung gemindert wird
+	 */
+	float m_power;
+	
+	/**
+	 * \var  m_attacker_id
+	 * \brief ID des Angreifers
+	 */
+	int m_attacker_id;
+	
+	/**
+	 * \var WorldObject::TypeInfo::Fraction m_attacker_fraction
+	 * \brief Fraktion des Angreifers
+	 */
+	WorldObject::TypeInfo::Fraction m_attacker_fraction;
+	
+
+	/**
+	 * \var float m_crit_perc
+	 * \brief Chance auf kritischen Treffer
+	 */
+	float m_crit_perc;
+	
+	/**
+	 * \var m_status_mod_power
+	 * \brief Gibt fuer alle Statusveraenderungn die Zauberkraft an. Eine Zauberkraft von 0 bedeutet, dass der betreffende Effekt nicht wirksam wird.
+	 */
+	short m_status_mod_power[NR_STATUS_MODS];
+	
+	
+	/**
+	 * \var m_special_flags
+	 * \brief bitkodierte Zusammenfassung besonderer Eigenschaften des Schaden, wie besonderer Schaden gegen bestimmte Typen von Monstern.
+	 */
+	short m_special_flags;
+	
+	/**
+	 * \enum DamageType
+	 * \brief Aufzaehlung der Schadensarten
+	 */
+	enum DamageType
+	{
+		PHYSICAL =0,
+		AIR =1,
+		ICE =2,
+		FIRE =3
+	};
+	
+	/**
+	 * \enum StatusMods
+	 * \brief Aufzaehlung der Statusmodifikationen
+	 */
+	enum StatusMods
+	{
+		BLIND =0,
+		POISONED =1,
+		BERSERK = 2,
+		CONFUSED = 3,
+		MUTE = 4,
+		PARALYZED=5,
+		FROZEN = 6,
+		BURNING = 7,
+		
+	};
+	
+	/**
+	 * \enum SpecialFlags
+	 * \brief Aufzaehlung von Spezialeigenschaften des Schadens
+	 */
+	enum SpecialFlags
+	{
+		NOFLAGS =0,
+		UNBLOCKABLE = 0x1,
+		IGNORE_ARMOR = 0x2,
+		EXTRA_HUMAN_DMG = 0x10,
+		EXTRA_DEMON_DMG = 020,
+		EXTRA_UNDEAD_DMG = 0x40,
+		EXTRA_DWARF_DMG = 0x80,
+		EXTRA_DRAKE_DMG = 0x100,
+		EXTRA_FAIRY_DMG = 0x200,
+		EXTRA_GOBLIN_DMG = 0x400,
+		EXTRA_ANIMAL_DMG = 0x800,
+		EXTRA_SUMMONED_DMG = 0x1000
+	};
+	
+	/**
+	 * \enum Usage
+	 */
+	enum Usage
+	{
+		NORMAL =0,
+		ABILITY =1,
+		ITEM =2,
+	};	
+		
+  
+	/**
+	 * \fn void toString(CharConv* cv)
+	 * \brief Konvertiert das Objekt in einen String und schreibt ihn in der Puffer
+	 * \param buf Ausgabepuffer
+	 * \return Zeiger hinter den beschriebenen Datenbereich
+	 */
+	void toString(CharConv* cv);
+	
+	/**
+	 * \fn void fromString(CharConv* cv)
+	 * \brief Erzeugt das Objekt aus einem String
+	 * \param buf Objekt als String
+	 * \return Zeiger hinter den gelesenen Datenbereich
+	 */
+	void fromString(CharConv* cv);
+	
+	/**
+	 * \fn void init()
+	 * \brief initialisiert die Datenfelder
+	 */
+	void init();
+	
+	/**
+	 * \fn void normalize()
+	 * \brief rechnet alle Multiplikatoren in die Schadenswerte ein
+	 */
+	void normalize();
+	
+	/**
+	 * \fn Damage()
+	 * \brief Konstruktor. Belegt die Datenfelder mit 0
+	 */
+	Damage();
+	
+	/**
+	 * \fn static std::string getDamageTypeName(DamageType dt)
+	 * \brief Gibt zu einem Schadenstyp den Name als String aus
+	 */
+	static std::string getDamageTypeName(DamageType dt);
+	
+	/**
+	 * \fn static std::string getStatusModName(StatusMods sm)
+	 * \brief Gibt zu einer Statusveraenderung den Name als String aus
+	 */
+	static std::string getStatusModName(StatusMods sm);
+	
+	/**
+	 * \fn float getSumMinDamage()
+	 * \brief Gibt die Summe des Minimalschaden ueber die Schadensarten aus
+	 */
+	float getSumMinDamage();
+	
+	/**
+	 * \fn float getSumMaxDamage()
+	 * \brief Gibt die Summe des Maximalschadens ueber die Schadensarten aus
+	 */
+	float getSumMaxDamage();
+	
+	/**
+	 * \fn std::string getDamageString((Usage usage= NORMAL)
+	 * \brief Erzeugt einen String der den angegebenen Schaden anzeigt
+	 * \param complete Wenn true, werden alle Daten ausgegeben
+	 */
+	std::string getDamageString(Usage usage= NORMAL);
+};
+	
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/debug.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,34 @@
+#include "debug.h"
+
+void hexwrite(char* data,int len)
+{
+	unsigned char* ucp;
+	char* cp;
+	char a,b;
+	int i=0;
+	for (cp= data;cp <data+len;cp++)
+	{
+		ucp = (unsigned char*) cp;
+		a= (*ucp)/16;
+		b= (*ucp)%16;
+		if (a>9)
+			printf("%c",a-10+'a');
+		else
+			printf("%c",a+'0');
+
+		if (b>9)
+			printf("%c",b-10+'a');
+		else
+			printf("%c",b+'0');
+			
+		printf(" ");
+		i++;
+		if (i%4==0)
+		{
+			printf("| ");
+		}
+	
+	}
+	printf("\n");
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/debug.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,138 @@
+#ifndef DEBUG_H
+#define DEBUG_H
+
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Alexander Boehm
+
+	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.
+*/
+
+/**
+ * \file debug.h
+ * \defgroup Debuging \ Debugfunktion
+ * \author Alexander Boehm
+ * \version 1.0
+ * \date 2007-05-31
+ * \brief Verwaltung von Debug-Informationen und Ausgaben
+ */
+
+#include <stdio.h>
+//#include "timer.h"
+
+/**
+ * \brief Gibt Informationen aus
+ * \def LOGGER( level,format, ... )
+ * \param level Ausgabelevel
+ * \param format Format der Ausgabe
+ * \param ... Parameter fuer die in format angegebenen Daten
+ *
+ * Fuer eine naehere Erklaerung der Parameter sollte die Dokumentation der Funktion printf
+ * herangezogen werden.
+ */
+#define LOGGER( level,format, ... ) \
+	if( level <= DEBUG_LEVEL ) { \
+		printf( "%s:%i %s > ",__FILE__,__LINE__,__FUNCTION__ ); \
+		printf( format,##__VA_ARGS__ ); \
+		printf( "\n" ); \
+	}
+
+/**
+ * \def ERRORMSG( format, ... )
+ * \brief Gibt Fehlermeldungen aus
+ */
+#define ERRORMSG( format, ... ) \
+	LOGGER( 0,format, ##__VA_ARGS__ )
+
+/**
+ * \def WARNING( format, ... )
+ * \brief Gibt Warnungne aus
+ */
+#define WARNING( format, ... ) \
+	LOGGER( 1,format, ##__VA_ARGS__ )
+
+/**
+ * \def INFO( format, ... )
+ * \brief Gibt unwichtige Informationen aus
+ */
+#define INFO( format, ... ) \
+	LOGGER( 2,format, ##__VA_ARGS__ )
+
+/**
+ * \def DEBUG( format, ... )
+ * \brief Gibt Debug-Informationen aus
+ */
+#define DEBUG( format, ... ) \
+	LOGGER( 3,format, ##__VA_ARGS__ )
+
+/**
+ * \def DEBUG1( format, ... )
+ * \brief Gibt Debug-Informationen aus
+ */
+#define DEBUG1( format, ... ) \
+	LOGGER( 4,format, ##__VA_ARGS__ )
+
+/**
+ * \def DEBUG2( format, ... )
+ * \brief Gibt Debug-Informationen aus
+ */
+#define DEBUG2( format, ... ) \
+	LOGGER( 5,format, ##__VA_ARGS__ )
+
+/**
+ * \def DEBUG3( format, ... )
+ * \brief Gibt Debug-Informationen aus
+ */
+#define DEBUG3( format, ... ) \
+	LOGGER( 6,format, ##__VA_ARGS__ )
+
+/**
+ * \def DEBUG4( format, ... )
+ * \brief Gibt Debug-Informationen aus
+ */
+#define DEBUG4( format, ... ) \
+	LOGGER( 7,format, ##__VA_ARGS__ )
+
+/**
+ * \def DEBUG5( format, ... )
+ * \brief Gibt Debug-Informationen aus
+ */
+#define DEBUG5( format, ... ) \
+	LOGGER( 8,format, ##__VA_ARGS__ )
+
+/**
+ * \def DBG( format, ... )
+ * \brief Abkuerzung fuer DEBUG
+ */
+#define DBG( format, ... ) \
+	DEBUG( format, ##__VA_ARGS )
+
+
+extern "C"
+{
+	void hexwrite(char* data,int len);
+
+
+}
+
+#ifdef WIN32
+#define gettext(text) text
+#endif
+
+
+#endif
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/dmgprojectile.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,917 @@
+#include "dmgprojectile.h"
+
+DmgProjectile::DmgProjectile(World* w,ProjectileType type, WorldObject::TypeInfo::Fraction fr, int id) : Projectile( type,id)
+{
+	m_world =w;
+	m_last_hit_object_id =0;
+	m_flags =0;
+	m_state = FLYING;
+	m_timer_limit = 1000;
+	m_counter =0;
+	m_goal_object =0;
+
+
+	float r=0.1;
+	// Radius, Timerlaufzeit und Status je nach Typ setzen
+	switch(type)
+	{
+		case FIRE_BOLT: r=0.1; break;
+		case ICE_BOLT: r=0.1; break;
+		case LIGHTNING:
+			r=0.15;
+			m_state=STABLE;
+			m_timer_limit = 250;
+			break;
+		case FIRE_BALL:
+			r=0.2;
+			m_max_radius = 1.5;
+			m_flags = EXPLODES;
+			break;
+		case FIRE_WALL:
+			r=0;
+			m_state=GROWING;
+			m_timer_limit = 200;
+			m_max_radius = 2;
+			break;
+		case FIRE_WAVE:
+			r=0;
+			m_state=GROWING;
+			m_timer_limit = 1000;
+			m_max_radius = 7;
+			break;
+		case ICE_RING:
+			r=0;
+			m_state=GROWING;
+			m_timer_limit = 800;
+			m_max_radius = 4;
+			break;
+		case FREEZE:
+			r=4;
+			m_state=STABLE;
+			m_timer_limit = 300;
+			break;
+		case BLIZZARD:
+			r=3;
+			m_state=STABLE;
+			m_timer_limit = 500;
+			break;
+		case THUNDERSTORM:
+			r=5;
+			m_state=STABLE;
+			m_timer_limit = 300;
+			break;
+		case CHAIN_LIGHTNING:
+			r=0.15;
+			m_flags = BOUNCING;
+			break;
+		case STATIC_SHIELD:
+			r=1.5;
+			m_state=STABLE;
+			m_timer_limit = 150;
+		case ARROW: r=0.1; break;
+		case GUIDED_ARROW:
+			r=0.1;
+			m_timer_limit = 1000;
+			break;
+		case EXPLOSION:
+		case ICE_EXPLOSION:
+		case WIND_EXPLOSION:
+		case FIRE_EXPLOSION:
+			m_timer_limit = 200;
+			m_state=EXPLODING;
+			break;
+
+		case LIGHT_BEAM:
+		case DIVINE_BEAM:
+		case ELEM_EXPLOSION:
+		case ACID:
+		case HYPNOSIS:
+			r=0.2;
+			m_timer_limit = 200;
+			m_state=STABLE;
+			break;
+
+        default:
+            break;
+	}
+
+
+	m_geometry.m_radius =r;
+	m_creator_fraction = fr;
+
+}
+
+bool DmgProjectile::update(float time)
+{
+	DEBUG5("projektile type %i coord %f %f time %f , %f/ %f", m_type,getGeometry()->m_coordinate_x,getGeometry()->m_coordinate_y,time,m_timer, m_timer_limit);
+	DEBUG5("speed %f %f",m_speed_x,m_speed_y);
+
+	// Zeit die beim aktuellen Durchlauf der Schleife verbraucht wird
+	float dtime;
+	// true, wenn Timer die Grenze erreicht
+	bool lim = false;
+	// Liste der getroffenen Objekte
+	list<ServerWObject*> hitobj;
+	list<ServerWObject*>::iterator i;
+	ServerWObject* hit;
+
+	// aktuelle Position
+	float x;
+	float y;
+
+	// neue Position
+	float xnew, ynew;
+
+	float rnew,rmin,rc;
+	float rold;
+	float x2,y2;
+
+	// zuletzt getroffenes Objekt (ID)
+	int lid;
+	float dir[2],d;
+	DmgProjectile* pr;
+	while (time>0)
+	{
+		hitobj.clear();
+		dtime = time;
+		x = getGeometry()->m_coordinate_x;
+		y = getGeometry()->m_coordinate_y;
+
+		// Timer erhoehen
+		if (dtime > m_timer_limit-m_timer)
+		{
+			// Grenze erreicht
+			lim = true;
+			dtime =m_timer_limit-m_timer;
+			m_timer = m_timer_limit;
+		}
+		else
+		{
+			m_timer += dtime;
+		}
+		time -= dtime;
+
+
+		switch (m_state)
+		{
+			case FLYING:
+				// Status fliegend behandeln
+				handleFlying(dtime);
+
+				break;
+
+			case EXPLODING:
+				DEBUG5("exploding");
+				// Radius vergroessern
+				m_geometry.m_radius += (m_max_radius)*dtime/(m_timer_limit);
+
+				// Wenn Timer Limit erreicht
+				if (m_timer >= m_timer_limit)
+				{
+					m_state = DESTROYED;
+					Shape s;
+					s.m_coordinate_x = x;
+					s.m_coordinate_y = y;
+					s.m_type = Shape::CIRCLE;
+					s.m_radius = m_geometry.m_radius;
+
+					// Alle Objekte im Explosionsradius suchen
+					hitobj.clear();
+					m_world->getSWObjectsInShape(&s,m_region,&hitobj,getGeometry()->m_layer,WorldObject::CREATURE,0);
+					for (i=hitobj.begin();i!=hitobj.end();++i)
+					{
+						// Schaden austeilen
+							(*i)->takeDamage(&m_damage);
+					}
+
+					if (m_flags & MULTI_EXPLODES)
+					{
+						// Flag mehrfach explodierend gesetzt
+						DEBUG("multiexploding");
+						d= 1/sqrt(sqr(m_speed_x)+sqr(m_speed_y));
+						dir[0] = m_speed_x * d;
+						dir[1] = m_speed_y * d;
+
+						// Schaden halbieren
+						Damage dmg;
+						memcpy(&dmg,&m_damage,sizeof(Damage));
+						for (int i=0;i<4;i++)
+						{
+							dmg.m_multiplier[i] *= 0.5;
+						}
+
+						// vier neue Projektile erzeugen
+						DmgProjectile* pr;
+						pr = new DmgProjectile(m_world,m_type,m_creator_fraction, m_world->getValidProjectileId());
+						memcpy(pr->getDamage(),&dmg,sizeof(Damage));
+						pr->setFlags(DmgProjectile::EXPLODES);
+						pr->setMaxRadius(1);
+						m_world->insertProjectile(pr,x+dir[0]*s.m_radius,y+dir[1]*s.m_radius,m_region);
+
+						pr = new DmgProjectile(m_world,m_type,m_creator_fraction, m_world->getValidProjectileId());
+						memcpy(pr->getDamage(),&dmg,sizeof(Damage));
+						pr->setFlags(DmgProjectile::EXPLODES);
+						pr->setMaxRadius(1);
+						m_world->insertProjectile(pr,x-dir[1]*s.m_radius,y+dir[0]*s.m_radius,m_region);
+
+						pr = new DmgProjectile(m_world,m_type,m_creator_fraction, m_world->getValidProjectileId());
+						memcpy(pr->getDamage(),&dmg,sizeof(Damage));
+						pr->setFlags(DmgProjectile::EXPLODES);
+						pr->setMaxRadius(1);
+						m_world->insertProjectile(pr,x-dir[0]*s.m_radius,y-dir[1]*s.m_radius,m_region);
+
+						pr = new DmgProjectile(m_world,m_type,m_creator_fraction, m_world->getValidProjectileId());
+						memcpy(pr->getDamage(),&dmg,sizeof(Damage));
+						pr->setFlags(DmgProjectile::EXPLODES);
+						pr->setMaxRadius(1);
+						m_world->insertProjectile(pr,x+dir[1]*s.m_radius,y-dir[0]*s.m_radius,m_region);
+
+					}
+				}
+				break;
+
+			case GROWING:
+				// Status wachsend behandeln
+				handleGrowing(dtime);
+
+				break;
+
+			case STABLE:
+				// Status stabil behandeln
+				handleStable(dtime);
+
+				break;
+
+			case DESTROYED:
+				DEBUG5("destroyed");
+				time =0;
+				break;
+
+			case VANISHING:
+				// Status verschwindend
+				if (m_type == FIRE_WALL)
+				{
+					// Radius reduzieren
+					m_geometry.m_radius -= 2* dtime/(m_timer_limit);
+				}
+				if (m_timer >= m_timer_limit)
+						m_state = DESTROYED;
+
+
+
+			default:
+				time =0;
+				break;
+
+		}
+	}
+
+	if (m_type == FIRE_WALL)
+	{
+		// Typ Feuersaeule
+
+		// Flache der Feuersaeule
+		Shape s;
+		s.m_coordinate_x = m_geometry.m_coordinate_x;
+		s.m_coordinate_y = m_geometry.m_coordinate_y;
+		s.m_type = Shape::CIRCLE;
+		s.m_radius = m_geometry.m_radius;
+
+		// Objekte suchen die die Saeule beruehren
+		m_world->getSWObjectsInShape(&s,m_region,&hitobj,getGeometry()->m_layer,WorldObject::CREATURE,0);
+		for (i=hitobj.begin();i!=hitobj.end();++i)
+		{
+			// Schaden austeilen
+			hit = (*i);
+			float m = m_damage.m_multiplier[Damage::FIRE];
+			m_damage.m_multiplier[Damage::FIRE] *= dtime;
+			hit->takeDamage(&m_damage);
+			m_damage.m_multiplier[Damage::FIRE] = m;
+		}
+	}
+
+	DEBUG5("update end");
+	return true;
+
+}
+
+void DmgProjectile::handleFlying(float dtime)
+{
+	list<ServerWObject*> hitobj;
+	list<ServerWObject*>::iterator i;
+	ServerWObject* hit;
+	float x;
+	float y;
+	float xnew, ynew;
+	x = getGeometry()->m_coordinate_x;
+	y = getGeometry()->m_coordinate_y;
+	float dir[2],d;
+	float rnew,rmin,rc;
+	float x2,y2;
+	int lid;
+	float newdir[2];
+	float ndir[0],sdir[2];
+
+	if (m_type == GUIDED_ARROW)
+	{
+		// Lenkpfeil
+
+		// Zielobjekt
+		hit =0;
+
+		if (m_goal_object!=0)
+		{
+			// Zielobjekt ist per ID vorgegeben, Objekt von der Welt holen
+			hit = m_world->getSWObject(m_goal_object,getRegion());
+		}
+
+		if (hit==0)
+		{
+			// kein Zielobjekt vorhanden, automatisch eines suchen
+
+			// Kreis um aktuelle Position mit Umkreis 5
+			Shape s;
+			s.m_coordinate_x = x;
+			s.m_coordinate_y = y;
+			s.m_type = Shape::CIRCLE;
+			s.m_radius = 5;
+
+			// neue Flugrichtung
+			newdir[0]=0;
+			newdir[1]=0;
+
+			// alle Objekte im Kreis suchen
+			m_world->getSWObjectsInShape(&s,m_region,&hitobj,getGeometry()->m_layer, WorldObject::CREATURE,0);
+
+			// alle Objekte als potentielle Ziele loeschen, die dem Erschaffer des Projektils nicht feindlich gesinnt sind
+			if (!hitobj.empty())
+			{
+				i = hitobj.begin();
+				hit=(*i);
+				while (!hitobj.empty() && m_world->getRelation(m_creator_fraction,hit) != WorldObject::HOSTILE)
+				{
+					i=hitobj.erase(i);
+					if (i!=hitobj.end())
+						hit=(*i);
+				}
+			}
+
+			// Suchen jenes Zieles welches am besten zu erreichen ist
+			rmin = 3*sqr(s.m_radius);
+			if (!hitobj.empty())
+			{
+				// normieren der aktuellen Geschwindigkeit
+				d= 1/sqrt(sqr(m_speed_x)+sqr(m_speed_y));
+				sdir[0]= m_speed_x *d;
+				sdir[1]= m_speed_y *d;
+
+				DEBUG5("old speed %f %f",m_speed_x,m_speed_y);
+				// Durchmustern der potentiellen Ziele
+				for (i=hitobj.begin();i!=hitobj.end();++i)
+				{
+
+					hit= (*i);
+					// TODO: die nicht feindlichen sollten eigentlich schon rausgefiltern sein...
+					if (m_world->getRelation(m_creator_fraction,hit) != WorldObject::HOSTILE)
+						continue;
+
+					//DEBUG("calc obj %i",hit->getId());
+					// Koordinaten des Potentiellen Zieles
+					x2 = hit->getGeometry()->m_shape.m_coordinate_x;
+					y2 = hit->getGeometry()->m_shape.m_coordinate_y;
+
+					// Richtung von aktueller Position zum Ziel, normiert
+					dir[0] = x2-x;
+					dir[1] = y2-y;
+					d = 1/sqrt(sqr(dir[0]) + sqr(dir[1]));
+					ndir[0] = dir[0]*d;
+					ndir[1] = dir[1]*d;
+
+					//DEBUG("dir %f %f",dir[0],dir[1]);
+					// effektiver Abstand: normaler Abstand minus 4* skalarprodukt(aktuelle Flugrichtung, Zielrichtung)
+					// Ziele fuer die eine scharfe Wendung noetig ist, werden schlechter bewertet
+					rnew = -4*(ndir[0]*sdir[0]+ndir[1]*sdir[1]);
+					rnew += sqr(dir[0]) + sqr(dir[1]);
+
+					//DEBUG("rnew %f",rnew);
+					// Wenn aktuelles Objekt besser ist als bisher bestes
+					if (rnew<rmin)
+					{
+						// neue Richtung setzen
+						rmin = rnew;
+						newdir[0]=dir[0];
+						newdir[1]=dir[1];
+
+					}
+
+				}
+			}
+		}
+		else
+		{
+			// es gibt ein Zielobjekt
+			// Richtung ist Richtung zum Zielobjekt
+			newdir[0] = hit->getGeometry()->m_shape.m_coordinate_x-x;
+			newdir[1] = hit->getGeometry()->m_shape.m_coordinate_y-y;
+
+		}
+
+		d = sqr(newdir[0]) + sqr(newdir[1]);
+		if (d>0)
+		{
+			// normieren der Zielrichtung
+			d= 0.01/sqrt(d);
+			newdir[0]*=d;
+			newdir[1]*=d;
+
+			float p =0.3*dtime / 50;
+			if (p>1)
+				p=1;
+			DEBUG5("p = %f",p);
+			DEBUG5("newdir %f %f",newdir[0],newdir[1]);
+			// Neue Richtung ergibt sich aus Linearkombination von aktueller Richtung und Zielrichtung
+			m_speed_x = (1-p)*m_speed_x+(p)*newdir[0];
+			m_speed_y = (1-p)*m_speed_y+(p)*newdir[1];
+			DEBUG5("new speed %f %f",m_speed_x,m_speed_y);
+
+			// neue Richtung normieren
+			d = sqr(m_speed_x) + sqr(m_speed_y);
+			if (d>0)
+			{
+				d= 0.01/sqrt(d);
+				m_speed_x *=d;
+				m_speed_y *=d;
+
+			}
+			else
+			{
+				m_speed_x=newdir[0];
+				m_speed_y=newdir[1];
+			}
+		}
+		hitobj.clear();
+		
+		if (m_speed_y!=0 || m_speed_x !=0)
+		{
+			m_geometry.m_angle = atan2(m_speed_y,m_speed_x);
+		}
+	}
+
+	if (m_timer >= m_timer_limit)
+	{
+		DEBUG5("destroyed after timeout");
+		m_state = DESTROYED;
+	}
+
+	// neue Koordinaten nach Ablauf des Zeitquantums
+	xnew = x+m_speed_x*dtime;
+	ynew = y+m_speed_y*dtime;
+
+
+
+	// Objekt an der aktuellen Position suchen
+	DEBUG5("getting objects on Line %f %f %f %f",x,y,xnew,ynew);
+	m_world->getSWObjectsOnLine(x,y,xnew,ynew,m_region,&hitobj,getGeometry()->m_layer,WorldObject::CREATURE | WorldObject::FIXED,0);
+
+	// Alle Objekte herausfiltern die verbuendet sind, sowie das zuletzt gerade getroffene Objekt
+	if (!hitobj.empty())
+	{
+		i = hitobj.begin();
+		hit = (*i);
+		
+		while (!hitobj.empty() && (m_world->getRelation(m_creator_fraction,hit) == WorldObject:: ALLIED || hit->getId() == m_last_hit_object_id ))
+		{
+			i=hitobj.erase(i);
+			if (i!=hitobj.end())
+				hit=(*i);
+		}
+	}
+
+	if (!hitobj.empty())
+	{
+		DEBUG5("hit object");
+		i = hitobj.begin();
+		hit = (*i);
+		//DEBUG("hit object %p",hit);
+		
+		//DEBUG("hit object %i at %f %f",hit->getId(),hit->getGeometry()->m_shape.m_coordinate_x,hit->getGeometry()->m_shape.m_coordinate_y);
+		if (!(m_flags & (EXPLODES | MULTI_EXPLODES) ))
+		{
+			// erstem getroffenen Objekt Schaden zufuegen
+
+			DEBUG5("deal damage %p",hit);
+			DEBUG5("deal damage to %i",(*i)->getId());
+			if (m_flags & PIERCING)
+			{
+				// Projektil fliegt weiter
+				m_last_hit_object_id = hit->getId();
+			}
+			else
+			{
+				// Projektil wird zerstoert
+				DEBUG5("hit obj %i",hit->getId());
+				m_state = DESTROYED;
+				m_timer=0;
+			}
+			hit->takeDamage(&m_damage);
+
+		}
+		else
+		{
+			// Projektil explodiert
+			// Status auf explodierend setzen, Radius, Timer setzen
+			DEBUG5("exploding");
+			m_state = EXPLODING;
+			if (m_type == FIRE_BALL || m_type == FIRE_ARROW)
+				m_type = FIRE_EXPLOSION;
+			else if (m_type == ICE_ARROW)
+				m_type = ICE_EXPLOSION;
+			else if (m_type == WIND_ARROW)
+				m_type = WIND_EXPLOSION;
+			else
+				m_type = EXPLOSION;
+
+			m_max_radius = 1.5;
+
+			m_timer=0;
+			m_timer_limit=200;
+		}
+
+		// true, wenn das Projektil zu einem weiteren Ziel weiterspringt
+		bool bounce = false;
+		if (m_flags & BOUNCING)
+			bounce = true;
+
+		if (m_flags & PROB_BOUNCING)
+		{
+			// zufaelliges weiterspringen, Chance 50%
+			if (rand()<RAND_MAX*0.5)
+			{
+
+				bounce = true;
+			}
+		}
+
+		if (hit->getTypeInfo()->m_type != WorldObject::TypeInfo::TYPE_FIXED_OBJECT && bounce)
+		{
+			// Projektil hat ein Lebewesen getroffen, springt weiter
+			m_state = FLYING;
+			float speed = sqrt(sqr(m_speed_x)+sqr(m_speed_y));
+
+			// Kreis mit Radius 5 um aktuelle Position
+			Shape s;
+			s.m_coordinate_x = m_geometry.m_coordinate_x;
+			s.m_coordinate_y = m_geometry.m_coordinate_y;
+			s.m_type = Shape::CIRCLE;
+			s.m_radius = 5;
+
+			// Alle Objekte im Kreis suchen
+			hitobj.clear();
+			m_world->getSWObjectsInShape(&s,m_region,&hitobj,WorldObject::Geometry::LAYER_AIR,WorldObject::CREATURE,0);
+			rmin = sqr(s.m_radius);
+			lid = hit->getId();
+			hit =0;
+
+			for (i=hitobj.begin();i!=hitobj.end();++i)
+			{
+				// Durchmustern der potentiellen Ziele
+				DEBUG5("testing obj %i, lid %i",(*i)->getId(),lid);
+
+				// letztes getroffendes Objekt ausschliessen
+				if (lid==(*i)->getId())
+					continue;
+
+				// alle nicht feindlich gesinnten Objekte ausschliessen
+				if (m_world->getRelation(m_creator_fraction,(*i)) != WorldObject::HOSTILE)
+					continue;
+
+				// kein zurueckspringen zu dem davor zuletzt getroffenen Objekt
+				if (m_last_hit_object_id== (*i)->getId())
+					continue;
+
+				// Abstand zur aktuellen Position ermitteln
+				x2 = (*i)->getGeometry()->m_shape.m_coordinate_x;
+				y2 = (*i)->getGeometry()->m_shape.m_coordinate_y;
+
+				rnew = sqr(x2-xnew)+sqr(y2-ynew);
+				DEBUG5("radius %f",rnew);
+				// Das Objekt herraussuchen, welches den minimalen Abstand aufweist
+				if (rnew < rmin)
+				{
+					rmin = rnew;
+					hit = (*i);
+				}
+			}
+
+			m_last_hit_object_id = lid;
+			if (hit!=0)
+			{
+				// Es wurde ein Ziel gefunden
+				DEBUG5("next obj %i",hit->getId());
+				DEBUG5("counter %i",m_counter);
+
+				// Neue Richtung ist Vektor von aktueller Position zum neuen Ziel
+				x2 = hit->getGeometry()->m_shape.m_coordinate_x;
+				y2 = hit->getGeometry()->m_shape.m_coordinate_y;
+				dir[0] = x2-xnew;
+				dir[1] = y2-ynew;
+				d = 1/sqrt(sqr(dir[0])+sqr(dir[1]));
+				dir[0] *=d;
+				dir[1] *=d;
+				m_speed_x = dir[0] *speed;
+				m_speed_y = dir[1] *speed;
+
+
+				DEBUG5("koord %f %f to %f %f",xnew,ynew,x2,y2);
+				DEBUG5("dir %f %f",dir[0],dir[1]);
+				m_timer =0;
+
+				// bei Kettenblitz Schaden pro Sprung um 20% reduzieren
+				if (m_type == CHAIN_LIGHTNING)
+					m_damage.m_multiplier[Damage::AIR] *= 0.8;
+				
+				if (m_speed_y!=0 || m_speed_x !=0)
+				{
+					m_geometry.m_angle = atan2(m_speed_y,m_speed_x);
+				}
+			}
+			else
+			{
+				// kein Ziel gefunden, Projektil zerstoeren
+				m_state = DESTROYED;
+			}
+
+			// Zaehler, bei 5 Spruengen Projektil zerstoeren
+			m_counter ++;
+			if (m_counter>=5)
+			{
+				m_state = DESTROYED;
+			}
+		}
+
+	}
+	// neue Koordinaten setzen
+	getGeometry()->m_coordinate_x = xnew;
+	getGeometry()->m_coordinate_y = ynew;
+
+}
+
+void DmgProjectile::handleGrowing(float dtime)
+{
+	list<ServerWObject*> hitobj;
+	list<ServerWObject*>::iterator i;
+	ServerWObject* hit;
+	float x;
+	float y;
+	float xnew, ynew;
+	float rnew,rmin,rc;
+	float rold;
+	float x2,y2;
+	int lid;
+
+	// aktuelle Position
+	x = getGeometry()->m_coordinate_x;
+	y = getGeometry()->m_coordinate_y;
+
+	rold = m_geometry.m_radius;
+	// Radius erhoehen
+	m_geometry.m_radius += m_max_radius* dtime/(m_timer_limit);
+
+	if (m_type == FIRE_WAVE || m_type == ICE_RING)
+	{
+		// Schaden an die neu getroffenen Lebewesen austeilen
+		rnew = m_geometry.m_radius;
+		// Flaeche die der Kreis nach dem Update ueberdeckt
+		Shape s;
+		s.m_coordinate_x = m_geometry.m_coordinate_x;
+		s.m_coordinate_y = m_geometry.m_coordinate_y;
+		s.m_type = Shape::CIRCLE;
+		s.m_radius = rnew;
+
+		// Alle Objekte suchen die sich in dem Kreis befinden
+		m_world->getSWObjectsInShape(&s,m_region,&hitobj,getGeometry()->m_layer,WorldObject::CREATURE,0);
+		lid = m_last_hit_object_id;
+		DEBUG5("last hit id = %i",lid);
+		rmin =0;
+
+		// Flaeche die vor dem Update ueberdeckt wurde minus 10%
+		s.m_radius = rold-(rnew-rold)*0.1;
+
+		// Schaden wird nur an die Objekte ausgeteilt, die im neuen, aber nicht im alten Kreis sind
+		if (!hitobj.empty())
+		{
+			for (i=hitobj.begin();i!=hitobj.end();++i)
+			{
+				hit = (*i);
+				DEBUG5("covering obj %i",hit->getId());
+
+				// Kein Schaden an nicht feindliche Objekte austeilen
+				if (m_world->getRelation(m_creator_fraction,hit) != WorldObject::HOSTILE)
+					continue;
+
+				// kein Schaden an Objekte austeilen, die sich im inneren Kreis befinden
+				if (World::intersect(&(hit->getGeometry()->m_shape),&s))
+				{
+					DEBUG5("is inside inner circle");
+					continue;
+				}
+
+				// kein Schaden an das zuletzt getroffene Objekt austeilen
+				if (hit->getId() == lid)
+				{
+					DEBUG5("is last hit obj %i",hit->getId());
+					continue;
+				}
+
+				// Schaden austeilen
+				hit->takeDamage(&m_damage);
+				m_last_hit_object_id = hit->getId();
+			}
+		}
+	}
+
+	if (m_timer >= m_timer_limit)
+	{
+		// Timer abgelaufen
+
+		// Standardverhalten Projektil zerstoeren
+		m_state = DESTROYED;
+
+		if (m_type == FIRE_WALL)
+		{
+			// fuer Feuersaeule: Uebergang in stabilen Zustand
+			m_timer =0;
+			m_timer_limit=5000;
+			m_state = STABLE;
+		}
+	}
+
+}
+
+void DmgProjectile::handleStable(float dtime)
+{
+
+	list<ServerWObject*> hitobj;
+	list<ServerWObject*>::iterator i;
+	ServerWObject* hit;
+
+	// aktuelle Position
+	float x;
+	float y;
+	x = getGeometry()->m_coordinate_x;
+	y = getGeometry()->m_coordinate_y;
+
+	float dir[2],d;
+	float x2,y2;
+	DmgProjectile* pr;
+
+	if (m_timer >= m_timer_limit)
+	{
+		// Timer Limit erreicht
+		m_state = DESTROYED;
+
+		if (m_type == BLIZZARD)
+		{
+			// Flaeche die vom Blizzard bedeckt wird
+			Shape s;
+			s.m_coordinate_x = m_geometry.m_coordinate_x;
+			s.m_coordinate_y = m_geometry.m_coordinate_y;
+			s.m_type = Shape::CIRCLE;
+			s.m_radius = m_geometry.m_radius;
+
+			// Alle Objekte in der Flaeche suchen
+			m_world->getSWObjectsInShape(&s,m_region,&hitobj,getGeometry()->m_layer,WorldObject::CREATURE,0);
+			for (i=hitobj.begin();i!=hitobj.end();++i)
+			{
+				// Schaden austeilen
+				hit = (*i);
+				hit->takeDamage(&m_damage);
+			}
+
+			// Schaden wird in 5 Wellen austeilt
+			if (m_counter <5)
+			{
+				// naechste Welle: Timer zuruecksetzen, Zaehler erhoehen
+				m_counter ++;
+				m_timer =0;
+				m_state = STABLE;
+
+			}
+		}
+
+		if (m_type == FREEZE || m_type == STATIC_SHIELD)
+		{
+			// vom Zauber ueberdeckte Flaeche
+			Shape s;
+			s.m_coordinate_x = m_geometry.m_coordinate_x;
+			s.m_coordinate_y = m_geometry.m_coordinate_y;
+			s.m_type = Shape::CIRCLE;
+			s.m_radius = m_geometry.m_radius;
+
+			// Alle Objekte in der Flaeche suchen
+			m_world->getSWObjectsInShape(&s,m_region,&hitobj,getGeometry()->m_layer,WorldObject::CREATURE,0);
+			for (i=hitobj.begin();i!=hitobj.end();++i)
+			{
+				// Schaden austeilen
+				hit = (*i);
+				hit->takeDamage(&m_damage);
+			}
+		}
+
+		if (m_type ==  THUNDERSTORM)
+		{
+			// Punkt in der Flaeche des Zaubers auswuerfeln
+			dir[0] = m_geometry.m_radius;
+			dir[1] = m_geometry.m_radius;
+
+			while (sqr(dir[0]) + dir[1] > sqr(m_geometry.m_radius))
+			{
+				dir[0] = m_geometry.m_radius - 2*m_geometry.m_radius*rand()*1.0/RAND_MAX;
+				dir[1] = m_geometry.m_radius - 2*m_geometry.m_radius*rand()*1.0/RAND_MAX;
+			}
+
+			// Kreis um den ausgewuerfelten Punkt mit Radius 1.5
+			Shape s;
+			s.m_coordinate_x = dir[0]+x;
+			s.m_coordinate_y = dir[1]+y;
+			s.m_type = Shape::CIRCLE;
+			s.m_radius = 1.5;
+			hitobj.clear();
+
+			// Alle Objekte in dem Kreis suchen
+			m_world->getSWObjectsInShape(&s,m_region,&hitobj,getGeometry()->m_layer,WorldObject::CREATURE,0);
+
+			DEBUG5("center %f %f",s.m_coordinate_x,s.m_coordinate_y);
+
+			// Alle nicht feindlichen Objekte aus der Liste entfernen
+			if (!hitobj.empty())
+			{
+				i = hitobj.begin();
+				hit = (*i);
+				while (i != hitobj.end() && m_world->getRelation(m_creator_fraction,hit) != WorldObject::HOSTILE)
+				{
+					i=hitobj.erase(i);
+					if (i!=hitobj.end())
+						hit=(*i);
+
+				}
+			}
+
+			if (!hitobj.empty())
+			{
+				// Ziel gefunden
+				i = hitobj.begin();
+				hit = (*i);
+
+				DEBUG5("hit obj %i",hit->getId());
+
+				// Position des gefundenen Zieles
+				x2 = hit->getGeometry()->m_shape.m_coordinate_x;
+				y2 = hit->getGeometry()->m_shape.m_coordinate_y;
+
+				// beim Ziel Projektil vom Typ Blitz erzeugen
+				pr = new DmgProjectile(m_world,Projectile::LIGHTNING,m_creator_fraction, m_world->getValidProjectileId());
+				memcpy(pr->getDamage(),&m_damage,sizeof(Damage));
+				m_world->insertProjectile(pr,x2,y2,m_region);
+			}
+
+			// Gewitter besteht aus 30 Blitzen
+			if (m_counter <30)
+			{
+				// naechster Blitz: Timer zuruecksetzen
+				m_counter ++;
+				m_timer =0;
+				m_state = STABLE;
+
+			}
+			
+		}
+
+		if (m_type == FIRE_WALL)
+		{
+			// Zauber Feuersaeule
+			// Uebergang zum Zustand verschwindend
+			m_timer =0;
+			m_timer_limit=200;
+			m_state = VANISHING;
+		}
+
+		if (m_type == LIGHTNING || m_type ==LIGHT_BEAM  || m_type ==ELEM_EXPLOSION || m_type ==ACID || m_type ==DIVINE_BEAM  || m_type ==HYPNOSIS)
+		{
+			// Objekt an der Stelle suchen an der der Zauber wirkt
+			hit = m_world->getSWObjectAt( getGeometry()->m_coordinate_x,getGeometry()->m_coordinate_y,m_region,getGeometry()->m_layer );
+
+			if (hit !=0)
+			{
+				// Ziel gefunden, Schaden austeilen
+				m_last_hit_object_id = hit->getId();
+				hit->takeDamage(&m_damage);
+			}
+		}
+
+	}
+}
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/dmgprojectile.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,240 @@
+#ifndef DMGPROJECTILE_H
+#define DMGPROJECTILE_H
+
+
+#include "projectile.h"
+#include "damage.h"
+#include "worldobject.h"
+#include <algorithm>
+#include <math.h>
+
+class World;
+class ServerWObject;
+
+/**
+ * \class DmgProjectile
+ * \brief Klasse fuer Projektile, die Schaden anrichten
+ */
+class DmgProjectile : public  Projectile
+{
+	public:
+		
+	/**
+	 * \enum Flags
+	 * \brief Zaehlt Sondereigenschaften von Geschossen auf
+	 */
+	enum Flags
+	{
+		EXPLODES = 1,
+		MULTI_EXPLODES = 2,
+		PIERCING = 4,
+		BOUNCING = 8,
+		PROB_BOUNCING = 16
+		
+	};
+	/**
+	 * \fn DmgProjectile(ProjectileType type, WorldObject::TypeInfo::Fraction fr, int id)
+	 * \brief Konstruktor
+	 * \param type Typ des Projektils
+	 * \param fr Fraktion des Urhebers
+	 */
+	DmgProjectile(World* w, ProjectileType type, WorldObject::TypeInfo::Fraction fr, int id);
+			
+	/**
+	 * \fn virtual update ( float time)
+	 * \brief Aktualisiert das Projektil, nachdem eine bestimmte Zeit vergangen ist. Alle Aktionen des Objekts werden auf diesem Weg ausgeloest. 
+	 * \param time Menge der vergangenen Zeit in Millisekunden
+	 * \return bool, der angibt, ob die Aktualisierung fehlerfrei verlaufen ist
+	 */
+	virtual  bool  update ( float time);
+
+	
+	/**
+	 * \fn void setSpeedX(float sx)
+	 * \brief Setzt die Geschwindigkeit in x-Richtung
+	 * \param sx Geschwindigkeit in x-Richtung
+	 */
+	void setSpeedX(float sx)
+	{
+		m_speed_x = sx;
+		if (m_speed_y!=0 || m_speed_x !=0)
+		{
+			m_geometry.m_angle = atan2(m_speed_y,m_speed_x);
+		}
+	}
+	
+	/**
+	 * \fn void setSpeedY(float sy)
+	 * \brief Setzt die Geschwindigkeit in Y-Richtung
+	 * \param sy Geschwindigkeit in y-Richtung
+	 */
+	void setSpeedY(float sy)
+	{
+		m_speed_y = sy;
+		if (m_speed_y!=0 || m_speed_x !=0)
+		{
+			m_geometry.m_angle = atan2(m_speed_y,m_speed_x);
+		}
+	}
+	
+	/**
+	 * \fn short getRegion()
+	 * \brief Gibt die Region aus, in der das Projektil sich befindet
+	 * \return Region
+	 */
+	short getRegion()
+	{
+		return m_region;
+	}
+	
+	/**
+	 * \fn void setRegion(short r)
+	 * \brief setzt die Region
+	 * \param r Region
+	 */
+	void setRegion(short r)
+	{
+		m_region=r;
+	}
+	
+	/**
+	 * \fn void setCounter(short cnt)
+	 * \brief Setzt den internen Zaehler
+	 * \param cnt Zaehler
+	 */
+	void setCounter(short cnt)
+	{
+		m_counter = cnt;
+	}
+	
+	/**
+	 * \fn void setMaxRadius(float mr)
+	 * \brief setzt den maximalen Radius
+	 * \param mr maximaler Radius
+	 */
+	void setMaxRadius(float mr)
+	{
+		m_max_radius = mr;
+	}
+		
+		
+	
+	/**
+	 * \fn void setFlags(char f)
+	 * \brief Setzt die Flags
+	 * \param f Flags
+	 */
+	void setFlags(char f)
+	{
+		m_flags = f;
+	}
+	
+	/**
+	 * \fn Damage* getDamage()
+	 * \brief Gibt Struktur mit Schadensinformationen aus
+	 * \return Damage Objekt
+	 * 
+	 */
+	Damage* getDamage()
+	{
+		return &m_damage;
+	}
+	
+	/**
+	 * \fn void setGoalObject(int id)
+	 * \brief Setzt das ZielObjekt
+	 */
+	void setGoalObject(int id)
+	{
+		m_goal_object = id;
+	}
+	
+	
+	private:
+		
+	/**
+	 * \fn void handleFlying(float dtime)
+	 * \brief Fuehrt update fuer Objekt im Zustand FLYING aus
+	 */
+	void handleFlying(float dtime);
+		
+	/**
+	 * \fn void handleFlying(float dtime)
+	 * \brief Fuehrt update fuer Objekt im Zustand GROWING aus
+	 */
+	void handleGrowing(float dtime);
+	
+	/**
+	 * \fn void handleFlying(float dtime)
+	 * \brief Fuehrt update fuer Objekt im Zustand STABLE aus
+	 */
+	void handleStable(float dtime);
+	
+	/**
+	 * \var float m_speed_x
+	 * \brief Geschwindigkeit in x-Richtung
+	 */
+	float m_speed_x;
+	
+	/**
+	 * \var float m_speed_y
+	 * \brief Geschwindigkeit in y-Richtung
+ 	*/
+	float m_speed_y;
+	
+	/**
+	 * \var short m_region
+	 * \brief Region in der sich das Projektil befindet
+	 */
+	short m_region;
+	
+	/**
+	 * \var Damage m_damage
+	 * \brief Schaden den das Projektil anrichtet
+	 */
+	Damage m_damage;
+	
+	/**
+	 * \var World* m_world
+	 * \brief Zeiger auf die Welt
+	 */
+	World* m_world;
+	
+	/**
+	 * \var int m_last_hit_object_id
+	 * \brief Zeiger auf das zuletzt getroffene Objekt
+	 */
+	int m_last_hit_object_id;
+	
+	/**
+	 * \var int m_creator
+	 * \brief Erzeuger des Geschosses (wird nicht getroffen)
+	 */
+	WorldObject::TypeInfo::Fraction m_creator_fraction;
+	
+	/**
+	 * \var char m_flags
+	 * \brief einige Einstellungen
+	 */
+	char m_flags;
+	
+	/**
+	 * \var float m_max_radius
+	 * \brief maximaler Radius den das Objekt erreicht
+	 */
+	float m_max_radius;
+	
+	/**
+	 * \var int m_goal_object
+	 * \brief Zielobjekt
+	 */
+	int m_goal_object;
+	
+};
+
+
+#include "serverwobject.h"
+#include "world.h"
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/document.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,1460 @@
+/*
+	Summoning Wars - document.cpp
+	Copyright (C) 2007  Hans Wulf, Michael Kempf
+
+	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/>.
+*/
+
+#include "fstream"
+#include "document.h"
+
+
+// Constructors/Destructors
+// Initialisiert Document zu Testzwecken
+Document::Document()
+	: m_special_keys() , m_shortkey_map()
+{
+
+	DEBUG("reading ip");
+	// IP aus Konfigurationsdatei einlesen
+	{
+		ifstream file("config");
+		DEBUG("file opened");
+		if ( file.is_open() )
+		{
+			file >> getNetworkInfo()->m_server_ip;
+			ERRORMSG("Server-IP: %s", getNetworkInfo()->m_server_ip);
+		}
+		else
+		{
+			ERRORMSG("config nicht gefunden");
+		}
+	}
+
+	bool network_error = false;
+
+	// Informationen zu Aktionen initialisieren
+	Action::init();
+
+	// Datenstrukturen fuer Objekte und Projektile anlegen
+	m_objects_bintree= new map<int, ClientWObject*>;
+	m_projectiles = new map<int,Projectile*>;
+	m_drop_items = new map<int,DropItem>;
+
+	m_region_data.m_static_objects = new map<int,WorldObject*>;
+	m_region_data.m_static_objects->clear();
+	m_region_data.m_tiles =0;
+
+	// Netzwerk initialisieren
+	getNetworkInfo()->m_network = new ClientNetwork();
+
+
+	// Status der GUI setzen
+	getGUIState()->m_left_mouse_hold= false;
+	getGUIState()->m_right_mouse_hold= false;
+	getGUIState()->m_shift_hold = false;
+	getGUIState()->m_sheet= MAIN_MENU;
+	getGUIState()->m_shown_windows = SAVEGAME_LIST;
+	getGUIState()->m_pressed_key = OIS::KC_UNASSIGNED;
+	getGUIState()->m_cursor_object ="";
+	getGUIState()->m_cursor_object_id =0;
+	getGUIState()->m_cursor_item_id =0;
+	getGUIState()->m_right_mouse_hold_time=0;
+	getGUIState()->m_left_mouse_hold_time=0;
+
+	// Pointer/Inhalte mit 0 initialisieren
+	m_gui_state.m_chat_window_content = "";
+	m_data_locks=0;
+	m_main_player =0;
+	m_party =0;
+	m_savegame =0;
+	m_detailed_item=0;
+	m_ability_pos=Action::NOACTION;
+
+
+	// aktuell eingestellte Aktionen setzen
+
+	// Status setzen
+	m_state = INACTIVE;
+
+	m_modified =GUISHEET_MODIFIED | WINDOWS_MODIFIED;
+
+	// Shortkeys einstellen
+	m_shortkey_map.clear();
+	installShortkey(OIS::KC_I,SHOW_INVENTORY);
+	installShortkey(OIS::KC_C,SHOW_CHARINFO);
+	installShortkey(OIS::KC_T,SHOW_SKILLTREE);
+	installShortkey(OIS::KC_P,SHOW_PARTYMENU);
+	installShortkey(OIS::KC_M,SHOW_CHATBOX);
+	installShortkey(OIS::KC_W,SWAP_EQUIP);
+	installShortkey(OIS::KC_1,USE_POTION);
+	installShortkey(OIS::KC_2,(ShortkeyDestination) (USE_POTION+1));
+	installShortkey(OIS::KC_3,(ShortkeyDestination) (USE_POTION+2));
+	installShortkey(OIS::KC_4,(ShortkeyDestination) (USE_POTION+3));
+	installShortkey(OIS::KC_5,(ShortkeyDestination) (USE_POTION+4));
+	installShortkey(OIS::KC_6,(ShortkeyDestination) (USE_POTION+5));
+	installShortkey(OIS::KC_7,(ShortkeyDestination) (USE_POTION+6));
+	installShortkey(OIS::KC_8,(ShortkeyDestination) (USE_POTION+7));
+	installShortkey(OIS::KC_9,(ShortkeyDestination) (USE_POTION+8));
+	installShortkey(OIS::KC_0,(ShortkeyDestination) (USE_POTION+9));
+
+	// besondere Tasten festlegen
+	m_special_keys.clear();
+	m_special_keys.insert(OIS::KC_ESCAPE);
+	m_special_keys.insert(OIS::KC_LSHIFT);
+	m_special_keys.insert(OIS::KC_LCONTROL);
+
+}
+
+void Document::serverConnect()
+{
+	// Verbindung aufbauen
+	NetStatus ret;
+	getNetworkInfo()->m_network->serverConnect( getNetworkInfo()->m_server_ip,REQ_PORT);
+	m_state = CONNECTING;
+
+
+
+
+}
+
+void Document::sendSavegame()
+{
+	// Savegame einlesen
+	DEBUG5("lese savegame");
+	char head[8];
+	int i;
+	char* bp = head;
+	string fname = "../client/";
+	fname += m_save_file;
+	if (m_gui_type == GL_GUI)
+	{
+		fname =  m_save_file;
+	}
+	DEBUG5("savegame is %s",fname.c_str());
+	
+	ifstream file(fname.c_str(),ios::in| ios::binary);
+	if (file.is_open())
+	{
+		for (i=0;i<8;i++)
+		{
+			file.get(head[i]);
+		}
+		CharConv cv((unsigned char*) head,8);
+		char binsave;
+		cv.fromBuffer<char>(binsave);
+		short version;
+		cv.fromBuffer<short>(version);
+		int len;
+		cv.fromBuffer<int>(len);
+		char c;
+		cv.fromBuffer<char>(c);
+		DEBUG5("lese %i bytes",len);
+		char* data= new char[len];
+		memcpy(data,head,8);
+		for (i=8;i<len;i++)
+		{
+			file.get(data[i]);
+		}
+		//hexwrite(data+45,len-45);
+
+		// Savegame an den Server senden
+		ClientHeader header;
+		header.m_content = PTYPE_C2S_SAVEGAME; 	// Savegame von Client zu Server
+		header.m_chatmessage = false;			// keine Chatnachricht
+		CharConv save;
+		header.toString(&save);
+		save.toBuffer(data,len);
+		getNetworkInfo()->m_network->pushSlotMessage(save.getBitStream());
+
+
+		// aktuelle Aktion setzen
+		// TODO: aus dem Savegame einlesen
+		
+		/*int n=0;
+		if (c==WorldObje)
+			n=4;
+		if (c==WorldObject::TypeInfo::SUBTYPE_MAGE)
+			n=6;
+		if (c==WorldObject::TypeInfo::SUBTYPE_ARCHER)
+			n=5;
+		if (c==WorldObject::TypeInfo::SUBTYPE_PRIEST)
+			n=7;
+*/
+/*
+		char* tmp = data +101;
+		n = cv->fromBuffer<short>(tmp);
+		DEBUG("left action %i",n);
+		setLeftAction((Action::ActionType) n);
+		m_left_action =(Action::ActionType) n;
+
+		n = cv->fromBuffer<short>(tmp);
+		DEBUG("right action %i",n);
+		setRightAction((Action::ActionType) n);
+		m_right_action=(Action::ActionType) n;
+*/
+		setRightAction(Action::ATTACK) ;
+		m_left_action = Action::ATTACK;
+		setLeftAction(Action::ATTACK);
+		m_right_action = Action::ATTACK;
+
+
+		m_state = CONNECTED;
+		m_gui_state.m_shown_windows = NO_WINDOWS;
+		m_gui_state.m_sheet = GAME_SCREEN;
+		m_modified = WINDOWS_MODIFIED | GUISHEET_MODIFIED;
+
+
+		delete data;
+	}
+	else
+	{
+		ERRORMSG("konnte Savegame nicht oeffnen");
+	}
+	DEBUG5("done");
+}
+
+Document::~Document()
+{
+	delete m_region_data.m_static_objects;
+	delete m_projectiles;
+	delete m_objects_bintree;
+	delete getNetworkInfo()->m_network;
+	delete m_drop_items;
+
+}
+// Methods
+
+/*
+ClientWorldObject* Document::getWorldObject(int id)
+{
+	 map<int,ClientWorldObject*>::iterator iter;
+
+    // Objekt im Binaerbaum suchen
+     iter = m_objects_bintree->find(id);
+
+    // Testen ob ein Objekt gefunden wurde
+    if (iter == m_objects_bintree->end())
+     {
+         // keins gefunden, NULL ausgeben
+        return 0;
+     }
+   else
+    {
+        // Zeiger auf Objekt ausgeben
+        return iter->second;
+    }
+}
+*/
+
+void Document::sendCommand(ClientCommand* comm)
+{
+	CharConv cv;
+
+	// Header anlegen
+	ClientHeader header;
+	header.m_content = PTYPE_C2S_DATA; 	// Daten von Client zu Server
+	header.m_chatmessage = false;			// keine Chatnachricht
+
+
+	// Header in den Puffer schreiben
+	 header.toString(&cv);
+	// Kommando in den Puffer schreiben
+	comm->toString(&cv);
+	DEBUG4("Kommando (%f %f) button: %i id: %i action: %i",comm->m_coordinate_x,comm->m_coordinate_y,comm->m_button, comm->m_id,comm->m_action);
+
+
+
+	 // Datenpaket zum Server senden
+	m_network_info.m_network->pushSlotMessage(cv.getBitStream());
+
+}
+
+void Document::lock()
+{
+	while (m_data_locks>0)
+		//DEBUG("waiting in lock");
+		;
+
+	m_data_locks++;
+}
+
+void Document::unlock()
+{
+	m_data_locks--;
+
+	if (m_data_locks>0)
+		ERRORMSG("kritischer Abschnitt verletzt");
+}
+
+OIS::KeyCode Document::getMappedKey(ShortkeyDestination sd)
+{
+	map<OIS::KeyCode, ShortkeyDestination>::iterator it;
+	for (it=m_shortkey_map.begin(); it!= m_shortkey_map.end();++it)
+	{
+		if (it->second == sd)
+		{
+			return it->first;
+		}
+	}
+
+	return OIS::KC_UNASSIGNED;
+}
+
+void Document::installShortkey(OIS::KeyCode key,ShortkeyDestination dest)
+{
+	// Taste auf die das Ereignis bisher gemappt war
+	OIS::KeyCode oldkey = getMappedKey(dest);
+	// entfernen
+	if (oldkey != OIS::KC_UNASSIGNED)
+	{
+		m_shortkey_map.erase(oldkey);
+	}
+
+	// Mapping anlegen
+	m_shortkey_map[key]=dest;
+
+}
+
+void Document::onButtonSendMessageClicked ( )
+{
+	DEBUG5("onbuttonmessageclicked");
+
+	// Header anlegen
+	/*ClientHeader header;
+	short slen = strlen(m_gui_state.m_chat_sendline_content.c_str());
+	short len = slen+ sizeof(ClientHeader)+sizeof(short)+1;
+
+	// Puffer fuer das Datenpaket
+	char* data = new char[len];
+	memset(data,0,len);
+	char* bp = data;
+	header.m_content = PTYPE_C2S_DATA;	// Daten vom Client zum server
+	header.m_chatmessage = true;			// Chatmessage enthalten
+
+	// Header in den Puffer kopieren
+	bp = header.toString(bp);
+
+	// Chatnachricht in den Puffer kopieren
+	cv->toBuffer(bp,slen+1);
+	memcpy(bp,m_gui_state.m_chat_sendline_content.c_str(),slen);
+
+	bp += slen;
+	*bp =0;
+	bp ++;
+	len = bp - data;
+
+
+	// Nachricht an den Server senden
+
+	NetStatus ret;
+	ret = m_network_info.m_network->pushSlotMessage(data,len);
+
+	// Rueckgabewert pruefen
+	if (ret != NET_OK)
+	{
+		DEBUG("Netzwerkfehler beim Daten senden: %i", ret);
+		getNetworkInfo()->m_network_error = true;
+	}
+	delete data;
+*/
+}
+
+
+void Document::onButtonSaveExitClicked ( )
+{
+	m_save_timer=0;
+
+	if (m_state!=SHUTDOWN_REQUEST)
+	{
+		setState(SHUTDOWN_REQUEST);
+	}
+	else
+	{
+		setState(SHUTDOWN);
+	}
+
+	ClientCommand command;
+
+	// Paket mit Daten fuellen
+	// Button ist Speichern+Beenden, alle anderen Daten gleich 0
+	command.m_button=BUTTON_SAVE_QUIT;
+	command.m_coordinate_x=0;
+	command.m_coordinate_y=0;
+	command.m_id=0;
+	command.m_number=0;
+
+	// Paket an den Server senden
+	sendCommand(&command);
+
+
+
+}
+
+
+void Document::onRightMouseButtonClick(float x, float y)
+{
+	ClientCommand command;
+
+
+	ClientWObject* cwo;
+	map<int,ClientWObject*>::iterator iter;
+
+	// herstellen der Koordinaten im Koordinatensystem des Spiels
+	x += m_main_player->getGeometry()->m_shape.m_coordinate_x;
+	y += m_main_player->getGeometry()->m_shape.m_coordinate_y;
+	m_gui_state. m_clicked_x =x;
+	m_gui_state. m_clicked_y =y;
+
+	// Paket mit Daten fuellen
+	command.m_button=RIGHT_MOUSE_BUTTON;
+	command.m_coordinate_x=x;
+	command.m_coordinate_y=y;
+	command.m_action = m_right_action;
+
+	m_gui_state.m_left_mouse_hold=false;
+	m_gui_state.m_right_mouse_hold_time=0;
+
+	DEBUG("angeklickte Koordinaten: %f %f",x,y);
+
+	m_gui_state.m_clicked_object_id=0;
+	command.m_id=0;
+	lock();
+	int id = getObjectAt(x,y);
+	m_gui_state.m_clicked_object_id = id;
+	command.m_id =id;
+	unlock();
+	command.m_number=0;
+
+	if (command.m_id!=0)
+		DEBUG("angeklicktes Objekt %i",command.m_id);
+
+
+	// Paket an den Server senden
+	 sendCommand(&command);
+
+
+
+
+}
+
+void Document::onLeftMouseButtonClick(float x, float y)
+{
+
+	ClientCommand command;
+
+
+	ClientWObject* cwo;
+	map<int,ClientWObject*>::iterator iter;
+
+	// herstellen der Koordinaten im Koordinatensystem des Spiels
+	x += m_main_player->getGeometry()->m_shape.m_coordinate_x;
+	y += m_main_player->getGeometry()->m_shape.m_coordinate_y;
+	m_gui_state. m_clicked_x =x;
+	m_gui_state. m_clicked_y =y;
+
+	// Paket mit Daten fuellen
+	command.m_button=LEFT_MOUSE_BUTTON;
+	if (m_gui_state.m_shift_hold)
+	{
+		command.m_button=LEFT_SHIFT_MOUSE_BUTTON;
+	}
+	command.m_coordinate_x=x;
+	command.m_coordinate_y=y;
+	command.m_action = m_left_action;
+
+	m_gui_state.m_right_mouse_hold=false;
+	m_gui_state.m_left_mouse_hold_time=0;
+
+
+	DEBUG4("angeklickte Koordinaten: %f %f",x,y);
+
+	//TODO: suchen welches objekt angeklickt wurde
+	map<int,ClientWObject*>::iterator i;
+	ClientWObject* wo =0;
+	m_gui_state.m_clicked_object_id=0;
+	command.m_id=0;
+	Shape* s=0;
+	float sx,sy;
+	lock();
+	int id = getObjectAt(x,y);
+	m_gui_state.m_clicked_object_id = id;
+	command.m_id =id;
+	unlock();
+	command.m_number=0;
+
+	if (command.m_id!=0)
+	{
+		DEBUG5("angeklicktes Objekt %i",command.m_id);
+	}
+
+	if (command.m_id ==0 && m_gui_state.m_cursor_item_id!=0)
+	{
+		// Item angeklickt
+		command.m_action = Action::TAKE_ITEM;
+		command.m_id = m_gui_state.m_cursor_item_id;
+	}
+
+	// Paket an den Server senden
+	sendCommand(&command);
+
+
+}
+
+int Document::getObjectAt(float x,float y)
+{
+	if (m_gui_type == GL_GUI)
+	{
+		map<int,ClientWObject*>::iterator i;
+		ClientWObject* wo =0;
+		Shape* s=0;
+		float sx,sy;
+
+		for (i=m_objects_bintree->begin();i!=m_objects_bintree->end();++i)
+		{
+			wo = i->second;
+			s = &(wo->getGeometry()->m_shape);
+			sx = s->m_coordinate_x;
+			sy = s->m_coordinate_y;
+
+			if (s->m_type == Shape::CIRCLE)
+			{
+				if ((sx-x)*(sx-x) + (sy-y)*(sy-y) < s->m_radius*s->m_radius)
+				{
+					return wo->getId();
+				}
+			}
+			else
+			{
+				float ex = s->m_extent_x;
+				float ey = s->m_extent_y;
+
+				if (x>=sx -ex && x<=sx +ex && y>=sy -ey && y<=sy +ey)
+				{
+					return wo->getId();
+				}
+			}
+
+		}
+		return 0;
+	}
+	else
+	{
+		return m_gui_state.m_cursor_object_id;
+	}
+
+}
+
+
+void Document::onButtonPartyApply(int pnr)
+{
+	ClientCommand command;
+	command.m_button = BUTTON_PARTY_APPLY;
+	command.m_id = pnr;
+	sendCommand(&command);
+}
+
+void Document::onButtonPartyAccept(int cnr)
+{
+	ClientCommand command;
+	command.m_button = BUTTON_PARTY_ACCEPT;
+	if (m_party->getNrCandidates() > cnr)
+	{
+		command.m_id = m_party->getCandidates()[cnr];
+		sendCommand(&command);
+	}
+}
+
+void Document::onItemLeftClick(short pos)
+{
+	ClientCommand command;
+	command.m_button = BUTTON_ITEM_LEFT;
+	command.m_id = pos;
+	sendCommand(&command);
+
+}
+
+void Document::onItemRightClick(short pos)
+{
+	ClientCommand command;
+	command.m_button = BUTTON_ITEM_RIGHT;
+	command.m_id = pos;
+	sendCommand(&command);
+
+}
+
+void Document::requestItemDetailedInfo( short pos)
+{
+	ClientCommand command;
+	command.m_button = REQUEST_DETAILED_ITEM;
+	command.m_id = pos;
+	sendCommand(&command);
+}
+
+void Document::requestAbilityDamage(Action::ActionType abl)
+{
+	ClientCommand command;
+	command.m_button = REQUEST_ABILITY_DAMAGE;
+	command.m_id = abl;
+	sendCommand(&command);
+}
+
+void Document::increaseAttribute(CreatureBaseAttr::Attribute attr)
+{
+	ClientCommand command;
+	command.m_button = BUTTON_INCREASE_ATTRIBUTE;
+	command.m_id = attr;
+	DEBUG("increasing attribute %i",attr);
+	sendCommand(&command);
+}
+
+void Document::learnAbility(Action::ActionType act)
+{
+	ClientCommand command;
+	command.m_button = BUTTON_LEARN_ABILITY;
+	command.m_id = act;
+	sendCommand(&command);
+}
+
+void Document::dropCursorItem()
+{
+	ClientCommand command;
+	command.m_button = DROP_ITEM;
+	sendCommand(&command);
+}
+
+void Document::emitDebugSignal(int i)
+{
+	ClientCommand command;
+	command.m_button = DEBUG_SIGNAL;
+	command.m_id = i;
+	sendCommand(&command);
+}
+
+void Document::onButtonInventoryClicked()
+{
+	// Inventar oeffnen wenn es gerade geschlossen ist und schliessen, wenn es geoeffnet ist
+	if (getGUIState()->m_shown_windows & INVENTORY)
+	{
+
+		getGUIState()->m_shown_windows &= ~INVENTORY;
+
+		// Item das aktuell in der Hand ist fallen lassen
+		if (getMainPlayer()->m_equipement->getItem(Equipement::CURSOR_ITEM)!=0)
+		{
+			dropCursorItem();
+		}
+	}
+	else
+	{
+		// wenn Inventar geoeffnet wird, dann Skilltree schliessen
+		getGUIState()->m_shown_windows &= ~SKILLTREE;
+		m_gui_state.m_pressed_key = OIS::KC_UNASSIGNED;
+
+		getGUIState()->m_shown_windows |= INVENTORY;
+
+
+
+	}
+
+	// Geoeffnete Fenster haben sich geaendert
+	m_modified |= WINDOWS_MODIFIED;
+
+}
+
+void Document::onButtonCharInfoClicked()
+{
+	// Charakterinfo oeffnen wenn es gerade geschlossen ist und schliessen, wenn es geoeffnet ist
+	if (getGUIState()->m_shown_windows & CHARINFO)
+	{
+		getGUIState()->m_shown_windows &= ~CHARINFO;
+	}
+	else
+	{
+		getGUIState()->m_shown_windows |= CHARINFO;
+	}
+
+	// Geoeffnete Fenster haben sich geaendert
+	m_modified |= WINDOWS_MODIFIED;
+}
+
+void Document::onButtonSkilltreeClicked()
+{
+	// Skilltree oeffnen wenn er gerade geschlossen ist und schliessen, wenn er geoeffnet ist
+	if (getGUIState()->m_shown_windows & SKILLTREE)
+	{
+		getGUIState()->m_shown_windows &= ~SKILLTREE;
+	}
+	else
+	{
+		// wenn Skilltree geoeffnet wird, dann Inventar schliessen
+		getGUIState()->m_shown_windows &= ~INVENTORY;
+
+		getGUIState()->m_shown_windows |= SKILLTREE;
+	}
+
+	m_gui_state.m_pressed_key = OIS::KC_UNASSIGNED;
+
+	// Geoeffnete Fenster haben sich geaendert
+	m_modified |= WINDOWS_MODIFIED;
+}
+
+void Document::onButtonOpenChatClicked()
+{
+	// Cchatfenster oeffnen wenn es gerade geschlossen ist und schliessen, wenn es geoeffnet ist
+	if (getGUIState()->m_shown_windows & CHAT)
+	{
+		getGUIState()->m_shown_windows &= ~CHAT;
+	}
+	else
+	{
+		getGUIState()->m_shown_windows |= CHAT;
+	}
+
+	// Geoeffnete Fenster haben sich geaendert
+	m_modified |= WINDOWS_MODIFIED;
+}
+
+void Document::onSwapEquip()
+{
+	ClientCommand command;
+	command.m_button = BUTTON_SWAP_EQUIP;
+	sendCommand(&command);
+}
+
+void Document::setLeftAction(Action::ActionType act)
+{
+	if (m_gui_state.m_pressed_key != OIS::KC_UNASSIGNED)
+	{
+		// Im Skilltree wird Kurztaste ausgewaehlt
+		installShortkey(m_gui_state.m_pressed_key,(ShortkeyDestination) (USE_SKILL_LEFT+act));
+		return;
+	}
+	// wenn kein Spieler gesetzt ist, dann keine Faehigkeit setzen
+	if (m_main_player ==0)
+		return;
+
+	int acti = (int) act;
+	Action::ActionInfo* aci = Action::getActionInfo(act);
+
+	// Testen ob die Faehigkeit zur Verfuegung steht
+	if (!m_main_player->checkAbility(act))
+	{
+		// Faehigkeit steht nicht zur Verfuegung, abbrechen
+		return;
+	}
+
+	// passive Faehigkeiten koennen nicht auf Maustasten gelegt werden
+	if (aci->m_distance == Action::PASSIVE)
+		return;
+
+	// Faehigkeiten die nicht auf einfachen Angriffen beruhen koennen nicht auf die linke Maustaste gelegt werden
+	if (aci->m_base_action== Action::NOACTION)
+		return;
+
+	DEBUG("Setting Action %i",act);
+	m_gui_state.m_left_mouse_hold = false;
+	m_left_action = act;
+
+
+
+	ClientCommand command;
+	command.m_button = BUTTON_SET_LEFT_ACTION;
+	command.m_action = act;
+	sendCommand(&command);
+}
+
+void Document::setRightAction(Action::ActionType act)
+{
+	if (m_gui_state.m_pressed_key != OIS::KC_UNASSIGNED)
+	{
+		// Im Skilltree wird Kurztaste ausgewaehlt
+		installShortkey(m_gui_state.m_pressed_key,(ShortkeyDestination) (USE_SKILL_RIGHT+act));
+		DEBUG("setting short key %i for action %i",m_gui_state.m_pressed_key,USE_SKILL_RIGHT+act);
+		return;
+	}
+
+	// wenn kein Spieler gesetzt ist, dann keine Faehigkeit setzen
+	if (m_main_player ==0)
+		return;
+
+	int acti = (int) act;
+	Action::ActionInfo* aci = Action::getActionInfo(act);
+
+	// Testen ob die Faehigkeit zur Verfuegung steht
+	if (!m_main_player->checkAbility(act))
+	{
+		// Faehigkeit steht nicht zur Verfuegung, abbrechen
+		return;
+	}
+
+	// passive Faehigkeiten koennen nicht auf Maustasten gelegt werden
+	if (aci->m_distance == Action::PASSIVE)
+		return;
+
+
+	DEBUG("Setting Action %i",act);
+	m_gui_state.m_right_mouse_hold = false;
+	m_right_action = act;
+
+	ClientCommand command;
+	command.m_button = BUTTON_SET_RIGHT_ACTION;
+	command.m_action = act;
+	sendCommand(&command);
+}
+
+std::string Document::getAbilityDescription()
+{
+	ostringstream out_stream;
+	out_stream.str("");
+
+	if (m_main_player !=0 && m_ability_pos != Action::NOACTION)
+	{
+		// Struktur mit Informationen zur Aktion
+		Action::ActionInfo* aci = Action::getActionInfo(m_ability_pos);
+
+		// Name der Faehigkeit
+		out_stream << Action::getName(m_ability_pos);
+		// out_stream << Action::getName(m_ability_pos);
+
+		// Beschreibung
+		//out_stream << "\n" << "Beschreibung: bla blubb";
+		out_stream << "\n" << gettext("doc_description") << Action::getDescription(m_ability_pos);
+
+		// Gibt an, ob der Spieler die Faehigkeit besitzt
+		bool avlb = true;
+		short ac = m_ability_pos;
+		if ((m_main_player->m_abilities[ac/32] & (1 << (ac %32))) ==0)
+		{
+			// Spieler besitzt Faehigkeit nicht
+			avlb = false;
+
+			// Level ab dem Faehigkeit verfuegbar ist
+			out_stream <<"\n"<< gettext("doc_minimum_level") << aci->m_req_level;
+		}
+
+		// Timerinfo
+		if (aci->m_timer_nr!=0)
+		{
+			out_stream <<"\n"<< gettext("doc_timer") << aci->m_timer_nr;
+			out_stream <<"\n"<< gettext("doc_timer_runtime") << (int) aci->m_timer*0.001 << " s";
+		}
+
+		// Schaden
+		std::string dmgstring = m_ability_damage.getDamageString(Damage::ABILITY);
+		if (dmgstring !="")
+		{
+			out_stream << "\n" << dmgstring;
+		}
+
+	}
+
+	return out_stream.str();
+}
+
+bool Document::onKeyPress(OIS::KeyCode key)
+{
+
+	if (key == OIS::KC_ESCAPE)
+	{
+		if (m_gui_state.m_shown_windows == NO_WINDOWS)
+		{
+			onButtonSaveExitClicked();
+		}
+		else
+		{
+			m_gui_state.m_shown_windows =  NO_WINDOWS;
+			// Geoeffnete Fenster haben sich geaendert
+			m_modified |= WINDOWS_MODIFIED;
+		}
+	}
+
+	if (m_gui_state.m_shown_windows & SKILLTREE)
+	{
+		// Skilltree wird angezeigt
+		// Tastendruecke werden anders interpretiert
+
+		// Wirkung die bisher auf der Taste liegt
+		ShortkeyDestination dest = NO_KEY;
+		if (m_shortkey_map.find(key) != m_shortkey_map.end())
+		{
+			dest = m_shortkey_map.find(key)->second;
+		}
+
+		if (m_special_keys.find(key)==m_special_keys.end() && (dest == NO_KEY || dest >= USE_SKILL_LEFT))
+		{
+			m_gui_state.m_pressed_key = key;
+			return true;
+		}
+
+	}
+
+	map<OIS::KeyCode, ShortkeyDestination>::iterator it = m_shortkey_map.find(key);
+
+	if (it == m_shortkey_map.end())
+	{
+		// Kein Aktion fuer die Taste vorhanden
+		return false;
+	}
+	else
+	{
+		// Aktion welche mit der Taste verbunden ist
+		ShortkeyDestination dest = it->second;
+		if (dest == SHOW_INVENTORY)
+		{
+			onButtonInventoryClicked();
+		}
+		else if (dest == SHOW_CHARINFO)
+		{
+			onButtonCharInfoClicked();
+		}
+		else if (dest == SHOW_SKILLTREE)
+		{
+			onButtonSkilltreeClicked();
+		}
+		else if (dest == SWAP_EQUIP)
+		{
+			onSwapEquip();
+		}
+		else if (dest >=USE_POTION && dest < USE_POTION+10)
+		{
+			onItemRightClick(Equipement::SMALL_ITEMS + (dest-USE_POTION));
+		}
+		else if (dest>=USE_SKILL_LEFT && dest <USE_SKILL_RIGHT)
+		{
+			setLeftAction((Action::ActionType) (dest-USE_SKILL_LEFT));
+		}
+		else if (dest>=USE_SKILL_RIGHT && dest <USE_SKILL_RIGHT+200)
+		{
+			setRightAction((Action::ActionType) (dest-USE_SKILL_RIGHT));
+		}
+		else if(dest == SHOW_PARTYMENU)
+		{
+			emitDebugSignal(0);
+		}
+		else if(dest == SHOW_CHATBOX)
+		{
+			emitDebugSignal(3);
+		}
+		else
+		{
+			return false;
+		}
+
+		return true;
+
+	}
+}
+
+bool  Document::onKeyRelease(OIS::KeyCode key)
+{
+	if (m_gui_state.m_pressed_key != OIS::KC_UNASSIGNED)
+	{
+		m_gui_state.m_pressed_key = OIS::KC_UNASSIGNED;
+	}
+}
+
+void Document::update(float time)
+{
+	DEBUG5("modified is %i",m_modified);
+	DEBUG5("State is %i",m_state);
+	switch (m_state)
+	{
+		case INACTIVE:
+			break;
+
+		case CONNECT_REQUEST:
+			serverConnect();
+			break;
+
+		case CONNECTING:
+			if (m_network_info.m_network->getSlotStatus() == NET_CONNECTED)
+			{
+				sendSavegame();
+			}
+
+		case CONNECTED:
+			updateContent(time);
+			break;
+
+		case SHUTDOWN_REQUEST:
+			updateContent(time);
+			m_save_timer += time;
+			if (m_save_timer >3000)
+			{
+				ERRORMSG("no savegame received, shutdown");
+				m_state = SHUTDOWN;
+			}
+			break;
+
+		case SHUTDOWN_WRITE_SAVEGAME:
+			// Savegame schreiben
+			pthread_t thread;
+			void* ret;
+			pthread_create(&thread,0,&Document::writeSaveFile,this);
+			pthread_join(thread, &ret);
+
+			// Verbindung zum Server schliessen
+			m_network_info.m_network->serverDisconnect();
+			m_network_info.m_network->kill();
+			m_state = SHUTDOWN;
+			break;
+
+		default:
+			break;
+	}
+	DEBUG5("done");
+}
+
+void Document::updateContent(float time)
+{
+	DEBUG5("update content");
+
+	if (m_gui_state.m_left_mouse_hold)
+	{
+		DEBUG5("linke Maustaste festgehalten");
+		m_gui_state.m_left_mouse_hold_time += time;
+		if (m_gui_state.m_left_mouse_hold_time>= 200)
+		{
+			ClientCommand command;
+
+			command.m_button=LEFT_MOUSE_BUTTON;
+			if (m_gui_state.m_shift_hold)
+			{
+				command.m_button=LEFT_SHIFT_MOUSE_BUTTON;
+			}
+			command.m_coordinate_x=m_gui_state.m_clicked_x;
+			command.m_coordinate_y=m_gui_state.m_clicked_y;
+			command.m_id = m_gui_state.m_clicked_object_id;
+			command.m_action = m_left_action;
+			command.m_number=0;
+
+			m_gui_state.m_left_mouse_hold_time=0;
+			sendCommand(&command);
+
+		}
+	}
+
+	if (m_gui_state.m_right_mouse_hold_time>= 200)
+	{
+		DEBUG("rechte Maustaste festgehalten");
+		m_gui_state.m_right_mouse_hold_time += time;
+
+		if (m_gui_state.m_right_mouse_hold_time>= 200)
+		{
+			ClientCommand command;
+
+			command.m_button=RIGHT_MOUSE_BUTTON;
+			command.m_coordinate_x=m_gui_state.m_clicked_x;
+			command.m_coordinate_y=m_gui_state.m_clicked_y;
+			command.m_id = m_gui_state.m_clicked_object_id;
+			command.m_action = m_right_action;
+			command.m_number=0;
+
+			m_gui_state.m_right_mouse_hold_time=0;
+			sendCommand(&command);
+
+		}
+
+	}
+
+	ServerHeader headerp;
+
+	Packet* data=0;
+	CharConv* cv;
+	static int nodata=0;
+	if (m_network_info.m_network->numberSlotMessages()==0)
+		nodata++;
+
+	if (nodata>=3)
+		DEBUG5("no data for %i turns",nodata);
+
+	int datcount=0;
+	// Daten vom Server holen
+	m_network_info.m_network->update();
+
+	if ( m_network_info.m_network->getSlotStatus()!=NET_CONNECTED )
+	{
+		DEBUG5("disconnected");
+
+	}
+
+	while( m_network_info.m_network->getSlotStatus()==NET_CONNECTED &&  m_network_info.m_network->numberSlotMessages()>0 )
+	{
+		//DEBUG("number of messages %i",m_network_info.m_network->numberSlotMessages());
+		datcount++;
+		nodata=0;
+		m_network_info.m_network->popSlotMessage(data);
+		DEBUG5("got information , length %i\n",data->length);
+
+		cv = new CharConv(data);
+
+
+		headerp.fromString(cv);
+
+		if (headerp.m_content == PTYPE_S2C_DATA)
+		{
+			
+			DEBUG5("got data pkg");
+			handleDataPkg(cv,&headerp);
+			
+		}
+		else if (headerp.m_content == PTYPE_S2C_SAVEGAME)
+		{
+			DEBUG5("got savegame");
+			handleSavegame(cv);
+
+		}
+		else if (headerp.m_content == PTYPE_S2C_ITEM)
+		{
+			handleDetailedItem(cv);
+
+		}
+		else if (headerp.m_content == PTYPE_S2C_DAMAGE)
+		{
+			handleAbilityDamage(cv,&headerp);
+		}
+		else if (headerp.m_content == PTYPE_S2C_REGION)
+		{
+			handleRegionData(cv);
+		}
+		else
+		{
+			WARNING("Got corrupted package type %i",headerp.m_content);
+			// TODO: do something to fix this....
+
+		}
+		
+		delete cv;
+		
+		m_network_info.m_network->deallocatePacket(data);
+
+	}
+
+
+	if (datcount>3)
+	{
+		DEBUG5("got %i data packages",datcount);
+	}
+
+	DEBUG5("update finished");
+}
+
+void Document::handleDataPkg(CharConv* cv, ServerHeader* headerp)
+{
+	//DEBUG("read bits: %i bytes",cv->getBitStream()->GetReadOffset());
+	
+	map<int, ClientWObject*>::iterator iter;
+	ClientWObject* cwo=0;
+	map<int,Projectile*>::iterator it;
+	Projectile* pr=0;
+
+	if (!headerp->m_chatmessage)
+	{
+		
+			//usleep( 25000 );
+			//INFO( "get_ob %i",  m_temp_objects_bintree->size() );
+		DEBUG5( "Got a begin of update" );
+
+			// Daten sperren
+		lock();
+		if (m_main_player)
+		{
+			DEBUG5("mainplayer %i, pointer %p",m_main_player->getId(),m_main_player);
+		}
+
+			//Datenstrukturen leeren
+			// Anmerkung: main_player wird mit geloescht
+		for (iter = m_objects_bintree->begin(); iter!=m_objects_bintree->end(); iter++)
+		{
+			cwo = iter->second;
+			DEBUG5("Speicher freigeben: obj %i at %p", cwo->getId(),cwo);
+			if (cwo!=0)
+				delete cwo;
+		}
+
+		m_objects_bintree->clear();
+
+		for (it=m_projectiles->begin();it!=m_projectiles->end();++it)
+		{
+			pr = (it->second);
+			if (pr)
+				delete pr;
+		}
+		m_projectiles->clear();
+		DEBUG5("data cleared");
+		// Neue Daten einlesen
+		
+		m_main_player = new ClientMPlayer(0);
+			// Daten aus dem Startpaket auslesen
+		m_main_player->fromString(cv);
+		cwo = m_main_player;
+		DEBUG5("inserting object %i, pointer %p",cwo->getId(),cwo);
+		m_objects_bintree->insert(make_pair(cwo->getId(),cwo));
+
+		// TODO: QuestInformationen auslesen
+
+		// Partyinformationen
+		if (m_party !=0)
+		{
+			delete m_party;
+			m_party=0;
+		}
+		m_party = new Party();
+		m_party->fromString(cv);
+
+
+		
+
+		
+
+		int i;
+		DEBUG5("number of objects %i",headerp->m_objects);
+		for (i=0;i<headerp->m_objects;i++)
+		{
+			cwo = new ClientWObject(0);
+			cwo->fromString(cv);
+
+
+			DEBUG5("inserting object %i, pointer %p",cwo->getId(),cwo);
+
+			// WorldObject in die temporaeren Datenstrukturen einfuegen
+			m_objects_bintree->insert(make_pair(cwo->getId(),cwo));
+
+				//DEBUG4( "got (%f,%f) [%i] type %i subtype %i",cwo->m_coordinate_x,cwo->m_coordinate_y,cwo->m_id,cwo->m_type,cwo->m_subtype );
+
+		}
+
+		// Geschosse einlesen
+		DEBUG5("Number of projectiles %i",headerp->m_projectiles);
+		for (i=0;i<headerp->m_projectiles;i++)
+		{
+			pr = new Projectile();
+			pr->fromString(cv);
+			DEBUG5("got Projectile %i %f %f",pr->getType(),pr->getGeometry()->m_coordinate_x,pr->getGeometry()->m_coordinate_y);
+
+
+			m_projectiles->insert(make_pair(pr->getId(),pr));
+		}
+
+		
+		// Items einlesen
+		DEBUG5("Number of Items %i",headerp->m_items);
+		m_main_player->m_equipement->fromString(cv,headerp->m_items);
+
+		
+		
+		
+		
+		// Items am Boden einlesen
+		DropItem di;
+		map<int,DropItem>::iterator it3;
+		for (it3 = m_drop_items->begin(); it3 != m_drop_items->end(); ++it3)
+		{
+			delete it3->second.m_item;
+		}
+		m_drop_items->clear();
+		DEBUG5("Number of dropped Items %i",headerp->m_drop_items);
+		for (i=0;i<headerp->m_drop_items;i++)
+		{
+			di.m_item = new Item;
+			di.fromString(cv);
+			m_drop_items->insert(make_pair(di.m_x*10000+di.m_y,di));
+		}
+		
+		// Daten entsperren
+		unlock();
+		
+	}
+	else
+	{
+		/*
+		int i;
+		short len =cv->fromBuffer<short>(datap);
+		int count = 0;
+		string::size_type position = 0;
+		while (count < 3 && m_gui_state.m_chat_window_content.find('\n', position) != string::npos)
+		{
+			position = m_gui_state.m_chat_window_content.find('\n', position+1);
+			count++;
+			DEBUG5("Count: %i", count);
+			DEBUG5("Pos: %i", position);
+		}
+		if (count >= 3)
+		{
+			position = m_gui_state.m_chat_window_content.find('\n', 0);
+			m_gui_state.m_chat_window_content.erase(0, position+1);
+		}
+		m_gui_state.m_chat_window_content = m_gui_state.m_chat_window_content + '\n' + datap;
+		*/
+	}
+
+	DEBUG5("objects modified");
+	m_modified |= OBJECTS_MODIFIED;
+
+
+}
+
+
+void Document::handleSavegame(CharConv* cv)
+{
+	DEBUG5("received Save file");
+	if (m_savegame!=0)
+		delete m_savegame;
+
+	int len = cv->getBitStream()->GetNumberOfUnreadBits()/8;
+	DEBUG5("savegame length %i",len);
+	m_savegame = new char[len];
+	cv->getBitStream()->Read(m_savegame, len);
+	
+	//hexwrite(datap,len);
+
+
+	if (m_state ==SHUTDOWN_REQUEST)
+	{
+		// Savegame erhalten, Shutdown
+		m_state = SHUTDOWN_WRITE_SAVEGAME;
+	}
+
+}
+
+void Document::handleDetailedItem(CharConv* cv)
+{
+	if (m_detailed_item !=0)
+	{
+		delete m_detailed_item;
+	}
+
+	// Daten des Items einlesen
+	m_detailed_item = new ServerItem();
+	m_detailed_item->fromStringComplete(cv, m_detailed_item_pos);
+	DEBUG4("received item at %i",m_detailed_item_pos);
+
+	// Itemdaten wurden geaendert
+	m_modified |= ITEM_MODIFIED;
+	DEBUG5("m_modified %i",m_modified);
+
+}
+
+void Document::handleAbilityDamage(CharConv* cv, ServerHeader* headerp)
+{
+	// Feld fuer detailliertes Item wird missbraucht fuer den Aktionstyp...
+	m_ability_pos = (Action::ActionType) headerp->m_detailed_item;
+
+	// Schaden einlesen
+	m_ability_damage.init();
+	m_ability_damage.fromString(cv);
+
+	// geaenderte Daten anzeigen
+	m_modified |= ABILITY_MODIFIED;
+}
+
+void Document::handleRegionData(CharConv* cv)
+{
+	DEBUG("got region data");
+
+	// Groesse der Region einlesen
+	cv->fromBuffer<short>(m_region_data.m_dimx);
+	cv->fromBuffer<short>(m_region_data.m_dimy);
+
+	// Anzahl der Objekte
+	short nr;
+	 cv->fromBuffer<short>(nr);
+
+	DEBUG("receiving %i objects",nr);
+
+	map<int,WorldObject*>::iterator it;
+
+	// alte Objekte loeschen
+	for (it = m_region_data.m_static_objects->begin(); it!=m_region_data.m_static_objects->end();++it)
+	{
+		delete (it->second);
+	}
+	m_region_data.m_static_objects->clear();
+
+	if (m_region_data.m_tiles!=0)
+	{
+		delete m_region_data.m_static_objects;
+	}
+	WorldObject* wo;
+
+	// neue Objekte einlesen
+	int i,j;
+	for (i=0;i<nr;i++)
+	{
+		wo = new WorldObject(0);
+		wo->fromString(cv);
+
+		// einfuegen in Binaerbaum
+		m_region_data.m_static_objects->insert(make_pair(wo->getId(),wo));
+
+		DEBUG("got WorldObject %s %p",wo->getNameId().c_str(),wo);
+	}
+
+	// Matrix fuer die Tiles anlegen
+	if (m_region_data.m_tiles!=0)
+		delete (m_region_data.m_tiles);
+
+
+	m_region_data.m_tiles = new Matrix2d<char>(2*m_region_data.m_dimx,2*m_region_data.m_dimy);
+
+	// Tiles einlesen
+	for (i=0;i<m_region_data.m_dimx*2;i++)
+	{
+		for (j=0;j<m_region_data.m_dimy*2;j++)
+		{
+			cv->fromBuffer<char>(*(m_region_data.m_tiles->ind(i,j)));
+			//printf("%i ",*(m_region_data.m_tiles->ind(i,j)));
+		}
+		//printf("\n");
+	}
+
+
+	// Daten zur Region wurden geaendert
+	m_modified |= REGION_MODIFIED;
+
+}
+
+void* Document::writeSaveFile(void* doc_ptr)
+{
+	Document* doc = (Document*) doc_ptr;
+	if (doc->m_savegame!=0)
+	{
+
+		// Savegame schreiben
+		char* bp = doc->m_savegame;
+
+
+		// Laenge der Datei
+		int len = *((int*) (bp+3));
+
+		int i;
+		bp = doc->m_savegame;
+		// Daten byteweise in Datei schreiben
+		ofstream file(doc->m_save_file.c_str(),ios::out | ios::binary);
+		DEBUG("length of file %i",len);
+		//hexwrite(bp,len);
+		if ( file.is_open() )
+		{
+			DEBUG("writing save file");
+			for (i=0;i<len;i++)
+			{
+				file<< bp[i];
+			}
+
+		}
+	}
+
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/document.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,943 @@
+/*
+	Summoning Wars - document.h
+	Copyright (C) 2007  Hans Wulf
+
+	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/>.
+*/
+
+
+/**
+ * \file document.h
+ * \defgroup Document \ Dokument
+ * \brief Stellt das Dokumentkonzept dar
+ * \author Hans Wulf
+ * \version 1.0
+ * \date 2007/05/28
+ * \note Beinhaltet die Klasse Document
+ */
+
+#ifndef DOCUMENT_H
+#define DOCUMENT_H
+
+#include <string>
+#include <list>
+#include <map>
+#include <set>
+
+
+// OIS
+/*
+#ifdef WIN32
+    #include "ois\OISEvents.h"
+    #include "ois\OISInputManager.h"
+    #include "ois\OISMouse.h"
+    #include "ois\OISKeyboard.h"
+    #include "ois\OISJoyStick.h"
+#else
+    #include "OISEvents.h"
+    #include "OISInputManager.h"
+    #include "OISMouse.h"
+    #include "OISKeyboard.h"
+    #include "OISJoyStick.h"
+#endif
+*/
+
+#include "networkstruct.h"
+#include "constants.h"
+#include "projectile.h"
+#include "party.h"
+#include "clientwobject.h"
+#include "clientmplayer.h"
+#include "clientnetwork.h"
+#include "debug.h"
+#include "damage.h"
+#include "itemlist.h"
+#include "random.h"
+#include "serveritem.h"
+#include "matrix2d.h"
+#include "tiles.h"
+#include "dropitem.h"
+#include <pthread.h>
+
+#include "gettext.h"
+
+/**
+ * \class Document
+ * \brief Diese Klasse enthaelt alle Daten fuer Repraesentation der Spielwelt auf der Clientseite.
+ *
+ * 
+ */
+
+#typedef int KeyCode
+
+class Document
+{
+
+
+	public:
+
+	
+
+
+	/**
+	 * \enum State
+	 * \brief zaehlt verschiedene Zustaende auf, in denen sich das Dokument befinden kann
+	 */
+	enum State
+	{
+		INACTIVE =0,
+
+		CONNECT_REQUEST =1,
+
+		CONNECTING =2,
+
+		CONNECTED =3,
+
+		SHUTDOWN_REQUEST =4,
+  
+		SHUTDOWN_WRITE_SAVEGAME=8,
+
+		SHUTDOWN =5,
+
+		DISCONNECTED =6,
+  
+ 		START_SERVER =7,
+	};
+
+
+	/**
+	 * \enum Modifications
+	 * \brief Zaehlt Inhalte auf, die veraendert werden koennen
+	 */
+	enum Modifications
+	{
+		NO_MODIFICATIONS=0,
+		OBJECTS_MODIFIED=1,
+		GUISHEET_MODIFIED=2,
+		WINDOWS_MODIFIED=4,
+		ITEM_MODIFIED=8,
+		ABILITY_MODIFIED=16,
+		REGION_MODIFIED = 32,
+	};
+
+	/**
+	 * \enum GUISheets
+	 * \brief Verschiedene Ebenen die angezeigt werden können
+	 */
+	enum GUISheets
+	{
+		MAIN_MENU=1,
+		GAME_SCREEN=2,
+	};
+
+	/**
+	 * \enum Windows
+	 * \brief Fenster die waerend des Spieles angezeigt werden koennen
+	 */
+	enum Windows
+	{
+		NO_WINDOWS =0,
+		INVENTORY =1,
+		CHARINFO=2,
+		SKILLTREE=4,
+		MENU =8,
+		CHAT = 16,
+		PARTY = 32,
+		SAVEGAME_LIST = 64,
+		START_MENU = 128,
+	};
+
+	/**
+	 * \enum ShortkeyDestination
+	 * \brief Listet Aktion auf, die ueber Kurztasten verfuegbar sind
+	 */
+	enum ShortkeyDestination
+	{
+		NO_KEY=0,
+		SHOW_INVENTORY =1,
+		SHOW_CHARINFO =2,
+		SHOW_SKILLTREE =3,
+		SHOW_PARTYMENU=4,
+		SHOW_CHATBOX =5,
+		SWAP_EQUIP=10,
+		USE_POTION = 30,
+		USE_SKILL_LEFT=100,
+		USE_SKILL_RIGHT=300,
+	};
+
+	/**
+	 * \struct NetworkInfo
+	 * \brief Struktur fuer die Daten zum Netzwerk auf Clientseite
+	 */
+	struct NetworkInfo
+	{
+		/**
+		 * \var m_network_error
+		 * \brief false, wenn ein Netzwerkfehler aufgetreten ist
+		 */
+		bool m_network_error;
+
+		/**
+		 * \var m_server_ip[16]
+		 * \brief Speichert die IP des Servers
+		 */
+		char m_server_ip[16];
+
+		/**
+		 * \var m_network_slot
+		 * \brief Speichert den verwendeten Netzwerk-Slot
+		 */
+		int m_network_slot;
+
+		/**
+		 * \var ClientNetwork* m_network
+		 * \brief Objekt für die Netzwerkanbindung des Clients
+		 */
+		ClientNetwork* m_network;
+
+		/**
+		 * \var int m_timeout_counter
+		 * \brief Zaehler fuer Timeouts
+		 */
+		int m_timeout_counter;
+
+		/**
+		 * \var bool m_host
+		 * \brief Gibt an, ob der eigene Rechner der Host ist
+		 */
+		bool m_host;
+	};
+
+	
+	/**
+	 * \struct GUIState
+	 * \brief Informationen zum aktuellen Zustand der GUI
+	 */
+	struct GUIState
+	{
+
+		/**
+		 * \var m_chat_window_content
+		 * \brief Inhalt des Chat-Nachrichtenfensters
+		 */
+		string m_chat_window_content;
+
+
+		/**
+		 * \var m_chat_sendline_content
+		 * \brief Inhalt der Chat-Eingabezeile
+	 	 */
+		string m_chat_sendline_content;
+
+		 /**
+		 * \var m_left_mouse_hold
+		 * \brief Gibt an, ob die linke Maustaste festgehalten wird
+	 	 */
+		bool m_left_mouse_hold;
+
+		 /**
+		 * \var m_right_mouse_hold
+		 * \brief Gibt an, ob die rechte Maustaste festgehalten wird
+	 	 */
+		bool m_right_mouse_hold;
+
+		/**
+		 * \var m_mouse_hold
+		 * \brief Gibt an, ob die Shift-Taste festgehalten wird
+		 */
+		bool m_shift_hold;
+
+		 /**
+		 * \var m_clicked_object_id
+		 * \brief ID des angeklickten Objekts
+	 	 */
+		int m_clicked_object_id;
+
+		 /**
+		 * \var m_clicked_x
+		 * \brief angeklickte x-Koordinate
+		  */
+		float m_clicked_x;
+
+		 /**
+		 * \var m_clicked_y
+		 * \brief angeklickte y-Koordinate
+		  */
+		float m_clicked_y;
+
+		/**
+		 * \var float m_left_mouse_hold_time
+		 * \brief Zaehler der die Anzahl Frames zaehlt die die linke Maustaste festgehalten wurde
+		 */
+		float m_left_mouse_hold_time;
+
+
+		/**
+		 * \var float m_right_mouse_hold_time
+		 * \brief Zaehler der die Anzahl Frames zaehlt die die rechte Maustaste festgehalten wurde
+		 */
+		float m_right_mouse_hold_time;
+
+		/**
+		 * \var GUISheets* m_sheet
+		 * \brief Aktuell angezeigte Ebene
+		 */
+		GUISheets m_sheet;
+
+		/**
+		 * \var int m_shown_windows
+		 * \brief aktuell angezeigte Fenster als Bitmaske
+		 */
+		int m_shown_windows;
+
+		/**
+		 * \var KeyCode m_pressed_key
+		 * \brief aktuell festgehaltene Taste
+		 */
+		KeyCode m_pressed_key;
+
+		/**
+		 * \var std::string m_cursor_object
+		 * \brief Ogre Name des Objektes auf das gerade der Mauszeiger zeigt
+		 */
+		std::string m_cursor_object;
+
+		/**
+		 * \var int m_cursor_object_id
+		 * \brief ID des Objektes auf das gerade der Mauszeiger zeigt
+		 */
+		int m_cursor_object_id;
+
+		/**
+		 * \var int m_cursor_item_id
+		 * \brief ID des Gegenstandes auf den gerade der Mauszeiger zeigt
+		 */
+		int m_cursor_item_id;
+
+	};
+
+
+
+// Konstruktor / Destruktor
+	/**
+	 * \fn Document()
+	 * \brief Konstruktor
+	 *
+	 * Legt ein neues Document-Objekt an
+	 */
+	Document();
+	
+	
+	/**
+	 * \fn ~Document()
+	 * \brief Destruktor
+	 *
+	 * Gibt den allokierten Speicher wieder frei
+	 */
+	~Document();
+// Setter und Getter
+
+	/**
+	 * \fn void setSaveFile(string s)
+	 * \brief Setzt den Name des Savefiles
+	 * \param s Name des Savefiles
+	 */
+	void setSaveFile(string s)
+	{
+		m_save_file =s;
+	}
+
+	/**
+	 * \fn string getSaveFile()
+	 * \brief Gibt den Name des Savefiles aus
+	 */
+	string getSaveFile()
+	{
+		return m_save_file;
+	}
+
+	/**
+	 * \fn static void* writeSaveFile(void* doc_ptr)
+	 * \param doc_ptr Zeiger auf das Dokument
+	 * \brief Schreibt das Savefile
+	 */
+	static void* writeSaveFile(void* doc_ptr);
+
+	/**
+	 * \fn NetworkInfo* getNetworkInfo()
+	 * \brief Gibt Zeiger auf die Netzwerkinformationen zurueck
+	 * return Netzwerkinformation
+	 */
+	NetworkInfo* getNetworkInfo()
+	{
+		return &m_network_info;
+	}
+
+	/**
+	 * \fn GUISTate* getGUIState()
+	 * \brief Gibt Zustand der GUI Datenfelder zurueck
+	 * \return Zustand der GUI
+	 */
+	GUIState* getGUIState()
+	{
+		return &m_gui_state;
+	}
+
+
+	/**
+	 * \fn State getState()
+	 * \brief Gibt aktuellen Status des Dokuments aus
+	 */
+	State getState()
+	{
+		return m_state;
+	}
+
+	/**
+	 * \fn void setState(State s)
+	 * \brief Setzt den Status des Dokuments
+	 */
+	void setState(State s)
+	{
+		m_state =s;
+	}
+
+	/**
+	 * \fn bool getModified()
+	 * \brief Gibt aus, ob Daten des Dokumentes geaendert wurden
+	 * \return modifiziert
+	 */
+	int getModified()
+	{
+		return m_modified;
+	}
+
+	/**
+	 * \fn void setModified(int mod)
+	 * \brief Setzt den Zustand modifiziert
+	 * \param mod neuer Zustand
+	 */
+	void setModified(int mod)
+	{
+		m_modified = mod;
+	}
+
+	/**
+	 * \fn map<int, ServerWObject*>* getModifiedObjects()
+	 * \brief Gibt Datenstruktur mit allen modifizierten Objekten aus
+	 * \return Objekte
+	 */
+	map<int, ServerWObject*>* getModifiedObjects()
+	{
+		return m_modified_objects;
+	}
+
+	/**
+	 * \fn list<Projectile>* getProjectiles()
+	 * \brief Gibt die Liste mit den Geschossen aus
+	 * \return Liste der Geschosse
+	 */
+	map<int,Projectile*>* getProjectiles()
+	{
+		return m_projectiles;
+	}
+	
+	
+
+	
+	/**
+	 * \fn ServerItem* getDetailedItem()
+	 * \brief Gibt Zeiger auf das Item, das aktuell per Tooltip genauer angezeigt wird zurueck
+	 */
+	ServerItem* getDetailedItem()
+	{
+		return m_detailed_item;
+	}
+
+	
+	/**
+	 * \fn ServerItem* getDetailedItem()
+	 * \brief Gibt Position des Items, das aktuell per Tooltip genauer angezeigt wird zurueck
+	 */
+	short getDetailedItemPos()
+	{
+		return m_detailed_item_pos;
+	}
+
+	
+	/**
+	 * \fn Action::ActionType getAbilityPos()
+	 * \brief Gibt die Position der Aktion die gerade als Tooltip angezeigt zurueck
+	 */
+	Action::ActionType getAbilityPos()
+	{
+		return m_ability_pos;
+	}
+
+	/**
+	 * \fn ClientMPlayer* getMainPlayer()
+	 * \brief Gibt Zeiger auf die Spielerfigur zurueck
+	 * \return Spielerobjekt
+	 */
+	ClientMPlayer* getMainPlayer()
+	{
+		return m_main_player;
+	}
+
+	/**
+	 * \fn Party* getParty()
+	 * \brief Gibt die Party aus der der Spieler angehoert
+	 * \return Party
+	 */
+	Party* getParty()
+	{
+		return m_party;
+	}
+
+	/**
+	 * \fn void setLeftAction(Action::ActionType a)
+	 * \brief Setzt die Aktion, die durch die linke Maustaste ausgeloest wird
+	 */
+	void setLeftAction(Action::ActionType a);
+
+	
+	/**
+	 * \fn Action::ActionType getLeftAction()
+	 * \brief Gibt die Aktion, die durch die linke Maustaste ausgeloest wird, zurueck
+	 */
+	Action::ActionType getLeftAction()
+	{
+		return m_left_action;
+	}
+
+	/**
+	 * \fn void setRightAction(Action::ActionType a)
+	 * \brief Setzt die Aktion, die durch die rechte Maustaste ausgeloest wird
+	 */
+	void setRightAction(Action::ActionType a);
+
+	
+	/**
+	 * \fn Action::ActionType getRightAction()
+	 * \brief Gibt die Aktion, die durch die rechte Maustaste ausgeloest wird, zurueck
+	 */
+	Action::ActionType getRightAction()
+	{
+		return m_right_action;
+	}
+
+	/**
+	 * \fn map<int,DropItem>* getDropItems()
+	 * \brief Gibt die Liste aller fuer den Spieler sichtbaren Gegenstaende am Boden zurueck
+	 */
+	map<int,DropItem>* getDropItems()
+	{
+		return m_drop_items;
+	}
+
+
+	/**
+	 * \fn std:.string getAbilityDescription()
+	 * \brief Gibt die Beschreibung der Faehigkeit, ueber der Mauszeiger ist, aus
+	 */
+	std::string getAbilityDescription();
+
+	/**
+	 * \fn KeyCode getMappedKey(ShortkeyDestination sd)
+	 * \brief Gibt die Taste zurueck, die das angegebene Ereignis ausloest
+	 */
+	KeyCode getMappedKey(ShortkeyDestination sd);
+
+	/**
+	 * \fn void installShortkey(KeyCode key,ShortkeyDestination dest)
+	 * \brief Bindet eine Taste an ein Ereignis
+	 * \param key Taste
+	 * \param dest Ereignis, das auf die Taste hin ausgeloest werden soll
+	 */
+	void installShortkey(KeyCode key,ShortkeyDestination dest);
+
+	/**
+	 * \fn void lock()
+	 * \brief Sperrt das Dokument
+	 */
+	void lock();
+
+	/**
+	 * \fn void unlock()
+	 * \brief Entsperrt das Dokument
+	 */
+	void unlock();
+
+
+
+	/**
+	 * \fn void onButtonSendMessageClicked ( )
+	 * \brief Button zum Absenden einer Nachricht wurde angeklickt
+	 */
+	void onButtonSendMessageClicked ( );
+
+
+
+
+	/**
+	 * \fn void onButtonSaveExitClicked ( )
+	 * \brief Button zum Speichern und Beenden des Spiels wurde angeklickt
+	 */
+	void onButtonSaveExitClicked ( );
+
+
+	/**
+	 * \fn void onButtonInventoryClicked()
+	 * \brief Behandelt Klick auf Inventar Button
+	 */
+	void onButtonInventoryClicked();
+
+	/**
+	 * \fn void onButtonCharInfoClicked()
+	 * \brief Behandelt Klick auf CharakterInfo Button
+	 */
+	void onButtonCharInfoClicked();
+
+
+	/**
+	 * \fn void onButtonSkillTreeClicked()
+	 * \brief Behandelt Klick auf Skilltree Button
+	 */
+	void onButtonSkilltreeClicked();
+
+	/**
+	 * \fn void onButtonOpenChatClicked()
+	 * \brief Behandelt Klick auf Chat oeffnen Button
+	 */
+	void onButtonOpenChatClicked();
+
+	/**
+	 * \fn void onSwapEquip()
+	 * \brief Wechselt die Ausruestung
+	 */
+	void onSwapEquip();
+
+	/**
+	 * \fn void onLeftMouseButtonClick (float x, float y)
+	 * \brief Behandelt die Reaktion auf einen Linksklick ins Spielfeld
+	 * \param x X-Koordinate
+	 * \param y Y-Koordinate
+	 */
+	void onLeftMouseButtonClick(float x, float y);
+
+
+	/**
+	 * \fn void onRightMouseButtonClick (float x, float y)
+	 * \brief Behandelt die Reaktion auf einen Rechtsklick ins Spielfeld
+	 * \param x X-Koordinate
+	 * \param y Y-Koordinate
+	 */
+	void onRightMouseButtonClick(float x, float y);
+
+
+	/**
+	 * \fn void onItemLeftClick(short pos)
+	 * \brief Behandelt Linksklick auf ein Item
+	 */
+	void onItemLeftClick(short pos);
+
+	/**
+	 * \fn void onItemRightClick(short pos)
+	 * \brief Behandelt Rechtsklick auf ein Item
+	 */
+	void onItemRightClick(short pos);
+
+	/**
+	 * \fn void requestItemDetailedInfo( short pos)
+	 * \brief Fordert vom Server weitere Informationen zu einem Item an
+	 */
+	void requestItemDetailedInfo( short pos);
+
+	/**
+	 * \fn void requestAbilityDamage(Action::ActionType abl)
+	 * \brief Fordert vom Server den Schaden einer Faehigkeit an
+	 */
+	void requestAbilityDamage(Action::ActionType abl);
+
+	/**
+	 * \fn void increaseAttribute(CreatureBaseAttr::Attribute attr)
+	 * \brief Erhoeht das angegebene Attribut
+	 */
+	void increaseAttribute(CreatureBaseAttr::Attribute attr);
+
+	/**
+	 * \fn void learnAbility(Action::ActionType act)
+	 * \brief Lernt die angegebene Faehigkeit
+	 */
+	void learnAbility(Action::ActionType act);
+
+	/**
+	 * \fn void dropCursorItem()
+	 * \brief Laesst das Item fallen, das aktuell am Cursor haengt
+	 */
+	void dropCursorItem();
+
+	/**
+	 * \fn bool onKeyPress(KeyCode key)
+	 * \brief Behandelt einen Tastendruck
+	 * \param key Keycode der Taste
+	 */
+	bool onKeyPress(KeyCode key);
+
+	/**
+	 * \fn bool onKeyRelease(KeyCode key)
+	 * \brief Behandelt loslassen einer Taste
+	 */
+	bool onKeyRelease(KeyCode key);
+
+	void onButtonPartyApply(int pnr);
+
+	void onButtonPartyAccept(int cnr);
+
+	void emitDebugSignal(int i=0);
+
+	/**
+	 * \fn void update( )
+	 * \brief Aktualisiert den Inhalt der GUI, holt alle Daten neu vom Netzwerk
+	 */
+	void update(float time=0);
+
+	/**
+	 * \fn void serverConnect()
+	 * \brief Baut Verbindung zum Server auf
+	 */
+	void serverConnect();
+
+
+	// Private stuff
+	private:
+	//Fields
+		/**
+	 * \fn void sendCommand(ClientCommand* command)
+	 * \param command Kommando, das gesendet werden soll
+	 * \return Status des Netzwerkes nach der Sendeanfrage
+	 * \brief sendet ein Kommando an den Server
+		 **/
+		void sendCommand(ClientCommand* comm);
+
+		/**
+		 * \fn void sendSavegame()
+		 * \brief Sendet ein Savegame zum Server
+		 */
+		void sendSavegame();
+		
+		/**
+		 * \fn void updateContent(float time)
+		 * \brief Aktualisiert den Inhalt des Dokuments
+		 */
+		void updateContent(float time);
+
+		/**
+		 * \fn void handleDatapkg(CharConv* cv)
+		 * \param datap Zeiger auf das Datenpaket
+		 * \param headerp Zeiger auf den Header des Datenpaketes
+		 * \brief Behandlung von Datenpaketen
+	 	*/
+		void handleDataPkg(CharConv* cv,ServerHeader* headerp);
+
+
+		/**
+		 * \fn void handleSavegame(CharConv* cv)
+		 * \brief Behandlung von Savegamepaketen
+		 * \param datap Zeiger auf die Daten
+	 	*/
+		void handleSavegame(CharConv* cv);
+
+		/**
+		 * \fn void handleDetailedItem(CharConv* cv)
+		 * \brief Behandlung von Informationen zu einem Item
+		 * \param datap Zeiger auf die Daten
+	 	*/
+		void handleDetailedItem(CharConv* cv);
+
+		/**
+		 * \fn void handleRegionData(CharConv* cv)
+		 * \brief Behandlung der Daten einer Region
+	 	 */
+		void handleRegionData(CharConv* cv);
+
+	/**
+		 * \fn void handleDatapkg(CharConv* cv)
+	 * \param datap Zeiger auf das Datenpaket
+	 * \param headerp Zeiger auf den Header des Datenpaketes
+	 * \brief Behandlung von informationen zum Schaden einer Aktion
+	 */
+		void handleAbilityDamage(CharConv* cv, ServerHeader* headerp);
+
+	/**
+	 * \fn int getObjectAt(float x,float y)
+	 * \brief Ermittelt die ID des Objektes an den angegebenen Koordinaten
+	 * \return ID
+	 */
+	int getObjectAt(float x,float y);
+
+	/** \var NetworkInfo m_network_info
+	 * \brief Enthaelt Daten zum Netzwerk
+	 */
+		NetworkInfo m_network_info;
+
+	/**
+	 * \var GUIState m_gui_state
+	 * \brief Enthaelt alle Informationen zum Zustand der GUI
+	 */
+		GUIState m_gui_state;
+
+
+	/**
+	 * \var  m_modified_objects
+	 * \brief Speichert die an den Client &uuml;bertragenen Objekte in einem Bin&auml;rbaum
+	 */
+	map<int, ServerWObject*>* m_modified_objects;
+
+	/**
+	 * \var list<int> m_removed_objects
+	 * \brief Liste mit den IDs geloeschter Objekte
+	 */
+	list<int> m_removed_objects;
+	
+	/**
+	 * \var list<int> m_removed_projectiles
+	 * \brief Liste mit den IDs geloeschter Objekte Projektile
+	 */
+	list<int> m_removed_projectiles;
+
+	/**
+	 * \var RegionData m_region_data
+	 * \brief Statische Daten zur aktuellen Region
+	 */
+	RegionData m_region_data;
+
+	/**
+	 * \var m_main_player
+	 * \brief Zeiger auf das Spielerobjekt das der Nutzer kontrolliert
+	 */
+		ClientMPlayer* m_main_player;
+
+	/**
+	 * \var Party* m_party
+	 * \brief Zeiger auf die Party der der Spieler angehoert
+	 */
+		Party* m_party;
+
+	/**
+	 * \var Action::ActionType m_left_action
+	 * \brief Aktion die auf linke Maustaste ausgefuehrt wird
+	 */
+		Action::ActionType m_left_action;
+
+	/**
+	 * \var Action::ActionType m_right_action
+	 * \brief Aktion die auf rechte Maustaste ausgefuehrt wird
+	 */
+		Action::ActionType m_right_action;
+
+	/**
+	 * \var map<int,Projectile*> m_projectiles
+	 * \brief Liste der Projektil
+	 */
+	map<int,Projectile*>* m_projectiles;
+
+	/**
+	 * \var map<int,DropItem>* m_drop_items;
+	 * \brief Liste der Items am Boden
+	 */
+	map<int,DropItem>* m_drop_items;
+
+	/**
+	 * \var ServerItem* m_detailed_item
+	 * \brief Item mit detaillierten Informationen
+	 */
+		ServerItem* m_detailed_item;
+
+	/**
+	 * \var short m_detailed_item_pos
+	 * \brief Position des Items mit detaillierten Informationen
+	 */
+		short m_detailed_item_pos;
+
+	/**
+	 * \var Damage m_ability_damage
+	 * \brief Schaden der Faehigkeit auf die der Mauszeiger zeigt
+	 */
+		Damage m_ability_damage;
+
+	/**
+	 * \var short m_ability_pos
+	 * \brief Faehigkeit auf die der Mauszeiger zeigt
+	 */
+		Action::ActionType m_ability_pos;
+
+	/**
+	 * \var m_data_locks
+	 * \brief Gibt die Anzahl der Locks auf den Daten des Dokuments an. Die Daten koennen nur veraendert und von aussen gelesen werden, wenn die Anzahl gleich 0 ist
+	 */
+		int m_data_locks;
+
+	/**
+	 * \var char* m_savegame
+	 * \brief Aktueller Spielstand in Binaerformat
+	 */
+		char* m_savegame;
+
+
+	/**
+	 * \var int m_modified
+	 * \brief Bitmaske welche angibt welche Teile des Dokuments veraendert wurden
+	 */
+		int m_modified;
+
+	/**
+	 * \var string m_save_file
+	 * \brief Dateiname des Savefiles
+	 */
+		string m_save_file;
+
+	/**
+	 * \var State m_state
+	 * \brief Status des Dokuments
+	 */
+		State m_state;
+
+	/**
+	 * \var map<unsigned int,ShortkeyDestination> m_shortkey_map
+	 * \brief Bildet Taste auf Ereignis, das per Shortkey ausgeloest werden kann ab
+	 */
+		map<KeyCode,ShortkeyDestination> m_shortkey_map;
+
+	/**
+	 * \var set<KeyCode> m_special_keys
+	 * \brief Menge der Tasten, die eine besondere Bedeutung haben und die deswegen nicht frei zugewiesen werden koennen
+	 */
+		set<KeyCode> m_special_keys;
+
+
+	/**
+	* \var float m_save_timer
+	* \brief Timer, der der die Zeit zaehlt, die auf ein Savegame gewartet wird
+	 */
+		float m_save_timer;
+
+
+};
+
+
+#endif //DOCUMENT_H
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/dropitem.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,37 @@
+#include "dropitem.h"
+
+void DropItem::toString(CharConv* cv)
+{
+
+	m_item->toString(cv,0);
+	cv->toBuffer(m_x);
+	cv->toBuffer(m_y);
+	
+
+	
+}
+
+void DropItem::fromString(CharConv* cv)
+{
+	short pos;
+	
+	m_item->fromString(cv,pos);
+	cv->fromBuffer<short>(m_x );
+	cv->fromBuffer<short>(m_y);
+	
+}
+
+
+int DropItem::getId()
+{
+	return 10000* m_x + m_y;
+}
+
+string DropItem::getNameId()
+{
+	ostringstream out_stream;
+	
+	out_stream.str("");
+	out_stream << m_item->getName() << ":" << getId();
+	return out_stream.str();
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/dropitem.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,71 @@
+#ifndef DROP_ITEM_H
+#define DROP_ITEM_H
+
+#include "item.h"
+#include "itemlist.h"
+#include <sstream>
+
+/**
+ * \struct DropItem
+ * \brief Wrapper Struktur fuer Gegenstaende die auf dem Boden liegen
+ */
+struct DropItem
+{
+	/**
+	 * \var Item* m_item
+	 * \brief Zeiger auf das Item
+	 */
+	Item* m_item;
+	
+	/**
+	 * \brief short m_x
+	 * \brief Position (x-Richtung) in 0.5x0.5 Feldern
+	 */
+	short m_x;
+
+	/**
+	 * \brief short m_y
+	 * \brief Position (y-Richtung) in 0.5x0.5 Feldern
+	 */
+	short m_y;
+	
+	/**
+	 * \var float m_time
+	 * \brief Zeit die der Gegenstand schon auf dem Boden liegt
+	 */
+	float m_time;
+	
+	/**
+	 * \fn void toString(CharConv* cv)
+	 * \brief Konvertiert das Objekt in einen String und schreibt ihn in der Puffer
+	 * \param buf Ausgabepuffer
+	 * \return Zeiger hinter den beschriebenen Datenbereich
+	 */
+	virtual void toString(CharConv* cv);
+			
+			
+	/**
+	 * \fn void fromString(CharConv* cv)
+	 * \brief Erzeugt das Objekt aus einem String
+	 * \param buf Objekt als String
+	 * \return Zeiger hinter den gelesenen Datenbereich
+	 */
+	virtual void fromString(CharConv* cv);
+	
+	/**
+	 * \fn int getId()
+	 * \brief Gibt ID des Gegenstandes aus
+	 */
+	int getId();
+	
+	/**
+	 * \fn string getNameId()
+	 * \brief Gibt Name es Items mit angehaengter ID aus
+	 */
+	string getNameId();
+	
+};
+
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/dropslot.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,119 @@
+#ifndef DROPSLOT_H
+#define DROPSLOT_H
+
+/**
+ * \struct DropSlot
+ * \brief charakterisiert ein Item, das ein Monster droppen kann
+ */
+struct DropSlot
+{
+	
+	
+	/**
+	 * \var float m_size_probability[5]
+	 * \brief Wahrscheinlichkeit mit der ein Item einer bestimmten Groesse gedroppt wird
+	 */
+	float m_size_probability[5];
+	
+	/**
+	 * \brief minimales Level, das das gedroppte Item haben muss
+	 */
+	int m_min_level;
+	
+	/**
+	 * \var int max_level
+	 * \brief maximales Level das das gedroppte Item haben darf
+	 */
+	int m_max_level;
+	
+	/**
+	 * \var float m_magic_probability
+	 * \brief Chance, das der Gegenstand magisch wird
+	 */
+	float m_magic_probability;
+	
+	/**
+	 * \var float m_magic_power
+	 * \brief Staerke der Verzauberung, falls der Gegenstand magisch wird. 
+	 */
+	float m_magic_power;
+	
+	/**
+	 * \fn DropSlot()
+	 * \brief Konstruktor. Belegt die Daten so, dass nie ein Gegenstand erzeugt wird
+	 */
+	DropSlot()
+	{
+		for (int i=0;i<4;i++)
+		{
+			m_size_probability[i]=0;
+		}
+		
+		m_min_level =-1;
+		m_max_level =-1;
+		m_magic_probability =0;
+		m_magic_power =0;
+	};
+	
+	/**
+	 * \fn void init(float size_prob[4], int min_level, int max_level, float magic_prob, float magic_power)
+	 * \brief Belegt die Daten der Struktur
+	 * \param size_prob Wahrscheinlichkeit mit der ein Item einer bestimmten Groesse gedroppt wird
+	 * \param min_level minimales Level, das das gedroppte Item haben muss
+	 * \param max_level  maximales Level das das gedroppte Item haben darf
+	 * \param magic_prob Chance, das der Gegenstand magisch wird
+	 * \param magic_power Staerke der Verzauberung, falls der Gegenstand magisch wird.
+	 */
+	void init(float size_prob[4], int min_level, int max_level, float magic_prob, float magic_power)
+	{
+		float sum =0;
+		for (int i=0;i<4;i++)
+		{
+			m_size_probability[i]=size_prob[i];
+			sum += size_prob[i];
+		}
+		
+		m_size_probability[4] = 1-sum;
+		
+		m_min_level = min_level;
+		m_max_level =max_level;
+		m_magic_probability =magic_prob;
+		m_magic_power =magic_power;		
+	}
+};
+
+/**
+ * \struct DropChance
+ * \brief Chance, dass ein Items dropt
+ */
+struct DropChance
+{
+	/**
+	 * \var int m_level
+	 * \brief Level ab dem das Item droppen kann
+	 */
+	int m_level;
+	
+	/**
+	 *  \var float m_probability
+	 * \brief relative Wahrscheinlichkeit, dass das Item droppt
+	 */
+	float m_probability;
+	
+	/**
+	 * \var Item::Size m_size
+	 * \brief Groesse des Items
+	 */
+	Item::Size m_size;
+	
+	DropChance(int lev, float prob, Item::Size size)
+	{
+		m_level = lev;
+		m_probability = prob;
+		m_size = size;
+	}
+};
+
+#endif
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/fixedobject.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,57 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Daniel Erler
+
+	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.
+*/
+
+#include "fixedobject.h"
+
+//Constructors/Destructors
+FixedObject::FixedObject(World* world, int id) : ServerWObject(world, id)
+{
+	bool tmp=FixedObject::init();
+	if (!tmp)
+	{
+		DEBUG("Initialisierung des Fixed Objects fehlgeschlagen!");
+	}
+}
+
+
+
+FixedObject::FixedObject(World* world, int id,  TypeInfo::ObjectSubtype object_subtype)  : ServerWObject(world, id)
+{
+	getTypeInfo()->m_subtype = object_subtype;
+	bool tmp=FixedObject::init();
+	if (!tmp)
+	{
+		DEBUG("Initialisierung des Fixed Objects fehlgeschlagen!");
+	}
+}
+
+//Methods
+bool FixedObject::init()
+{
+	//eigene Initialisierung
+	getTypeInfo()->m_type = TypeInfo::TYPE_FIXED_OBJECT;
+
+	return true;
+}
+
+bool FixedObject::update(float time)
+{
+	return true;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/fixedobject.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,127 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Daniel Erler
+
+	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.
+*/
+/**
+ * \file fixedobject.h
+ * \defgroup Fixedobject \ Fixes Objekt
+ * \ingroup worldobject
+ * \brief Stellt ein unbewegliches Objekt dar
+ * \author Daniel Erler
+ * \version 1.0
+ * \date 2007/05/28
+ * \note Beinhaltet die Klasse FixedObject
+ */
+
+#ifndef FIXEDOBJECT_H
+#define FIXEDOBJECT_H
+#include <string>
+
+#include "serverwobject.h"
+
+/**
+ * \class FixedObject
+ * \brief Dieses Objekt stellt ein fixes Objekt dar. Es kann seine Position in der Welt nicht ver&auml;ndern.
+ */
+class FixedObject : public ServerWObject {
+/**
+ * Public stuff
+ */
+public:
+	/**
+	 * Fields
+	 */
+	/**
+	 * 
+	 */
+	/**
+	 * Constructors
+	 */
+	/**
+	 * \fn FixedObject(World* world, unsigned int id)
+	 * \brief Konstruktor
+	 */
+	FixedObject(World* world, int id);
+	/**
+	 * \fn FixedObject(World* world, float coordinate_x, float coordinate_y, unsigned int id)
+	 * \brief Konstruktor
+	 */
+	
+	
+	FixedObject(World* world,  int id, TypeInfo::ObjectSubtype object_subtype);
+	/**
+	 * Accessor Methods
+	 */
+	/**
+	 * Operations
+	 */
+	/**
+	* \fn virtual bool init()
+	* \brief Initialisierung von unbewegten Gegenständen
+	* \return bool Gibt an, ob die Initialisierung erfolgreich war
+	*/
+	virtual bool init ();
+	
+	/**
+	 * \fn virtual bool  update (float time)
+	 * \brief aktualisiert das Objekt nach dem eine bestimmte Zeit vergangen ist
+	 * \param time vergangene Zeit in ms
+	 */
+	virtual bool  update (float time);
+
+
+/**
+ * Protected stuff
+ */
+protected:
+	/**
+	 * Fields
+	 */
+	/**
+	 * 
+	 */
+	/**
+	 * Constructors
+	 */
+	/**
+	 * Accessor Methods
+	 */
+	/**
+	 * Operations
+	 */
+/**
+ * Private stuff
+ */
+private:
+	/**
+	 * Fields
+	 */
+	/**
+	 * 
+	 */
+	/**
+	 * Constructors
+	 */
+	/**
+	 * Accessor Methods
+	 */
+	/**
+	 * Operations
+	 */
+};
+#endif //FIXEDOBJECT_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/gettext.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,14 @@
+#ifndef GETTEXT_H
+#define GETTEXT_H
+
+
+#ifdef WIN32
+#else
+    #include <libintl.h>
+#endif
+
+#include <locale.h>
+
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/goblin.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,96 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf, Daniel Erler
+
+	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.
+*/
+
+#include "goblin.h"
+
+Goblin::Goblin(World* world, int id) : Monster( world,  id)
+{			
+	bool tmp = init();
+	
+}
+
+
+
+Goblin::~Goblin()
+{
+	// allokierten Speicher freigeben
+}
+
+//Methods
+bool Goblin::init ()
+{
+	getTypeInfo()->m_subtype = TypeInfo::SUBTYPE_GOBLIN;
+	getTypeInfo()->m_category = TypeInfo::GOBLIN;
+	getTypeInfo()->m_fraction = TypeInfo::FRAC_MONSTER;
+			
+	CreatureBaseAttr* bas = getBaseAttr();
+	CreatureDynAttr* dyn = getDynAttr();
+	
+	float p0[4] ={0.1,0.2,0.2,0.2};
+	m_drop_slots[0].init(p0, 0,20, 0.3, 500);
+	m_drop_slots[1].init(p0,0, 10, 0.3, 1000);
+	
+	dyn->m_experience=0;
+	dyn->m_health = 150;
+	
+	bas->m_max_experience = 100000;
+	bas->m_level =1;
+	bas->m_max_health = 150;
+	bas->m_armor = 10;
+	bas->m_block=0;
+	bas->m_attack = 10;
+	bas->m_strength = 15;
+	bas->m_dexterity = 10;
+	bas->m_magic_power = 5;
+	bas->m_willpower = 10;
+	bas->m_resistances[0] =0;
+	bas->m_resistances[1] =0;
+	bas->m_resistances[2] =0;
+	bas->m_resistances[3] =0;
+	bas->m_resistances_cap[0] =50;
+	bas->m_resistances_cap[1] =50;
+	bas->m_resistances_cap[2] =50;
+	bas->m_resistances_cap[3] =50;
+	bas->m_walk_speed = 2000;
+	bas->m_attack_speed=1500;
+	bas->m_step_length = 0.5;
+	m_base_action = Action::ATTACK;
+	
+	
+	int i;
+	for (i=1;i<6;i++)
+		bas->m_abilities[i]=0;
+	
+	// Debugging
+	//bas->m_abilities[0] = 0xf1f;
+	bas->m_abilities[0] = 0xf2f;	
+	//bas->m_abilities[1]=0x10;
+	//bas->m_abilities[2] = 0x2;
+	bas->m_abilities[3] = 0x2;
+	//bas->m_abilities[3] = 0x14;
+	
+	bas->m_attack_range =1;
+	
+	bas->m_special_flags=0;
+
+	calcBaseAttrMod();
+	
+	return true;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/goblin.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,99 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf
+
+	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.
+*/
+
+/**
+ * \file goblin.h
+ * \defgroup Goblin \ Goblin
+ * \ingroup Monster
+ * \brief Stellt das Objekt Goblin zur Verf&uuml;gung
+ * \author Hans Wulf
+ * \version 1.0
+ * \date 2007/06/05
+ * \note Beinhaltet die Klasse Goblin und spezifiziert sein Verhalten
+ */
+#ifndef GOBLIN_H
+#define GOBLIN_H
+#include <string>
+#include "monster.h"
+#include "world.h"
+
+/**
+ * \class Goblin
+ * \brief Der Goblin ist ein schnelles und gef&auml;hrliches Monster.
+ */
+class Goblin : public Monster {
+//Public stuff
+public:
+	//Fields
+	//Constructors
+	/**
+	 * \fn Goblin(World* world, int id)
+	 * \brief Konstruktor
+	 * \param world Welt
+	 * \param id Objekt-ID
+	 *
+	 * Legt ein neues Goblin Objekt an.
+	 */
+	Goblin(World* world,  int id);
+
+	/**
+	 * \fn ~Goblin()
+	 * \brief Destruktor
+	 *
+	 * Gibt den Allokierten Speicher wieder frei
+	 */
+	~Goblin();
+	//Accessor Methods
+	//Operations
+	/**
+	 * \fn virtual bool init ()
+	 * \brief Initialisiert den Goblin. 
+	 * \return bool, der angibt ob die initialisierung erfolgreich war
+	 */
+	virtual bool init ();
+	
+	
+	/**
+	 * \fn virtual bool destroy ()
+	 * \brief Zerstoert das Objekt. Die Funktion ist virtuell und wird durch die abgeleiteten Klassen &uuml;berschrieben.
+	 * \return bool, der angibt ob die Zerstoerung erfolgreich war
+	 */
+	virtual bool destroy()
+	{
+		Monster::destroy();
+	}
+	
+	/**
+	 * \fn virtual void updateCommand()
+	 * \brief aktualisiert das aktuelle Kommando
+	 */
+	virtual void updateCommand()
+	{
+		Monster::updateCommand();
+	}
+	//bool update(float time);
+//Private stuff
+private:
+	//Fields
+	//Constructors
+	//Accessor Methods
+	//Operations
+
+};
+#endif //GOBLIN_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/gridunit.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,233 @@
+#include "gridunit.h"
+
+Gridunit::Gridunit()
+	: m_items()
+{
+	DEBUG5("initialising Gridunit at %p",this);
+	// Anzahl Objekte aller Sorten auf 0 setzen
+	m_nr_dead=0;
+	m_nr_fixed=0;
+	m_nr_creature=0;
+
+}
+
+bool Gridunit::insertObject(ServerWObject* object)
+{
+	// Ebene in der das Objekt eingeordnet wird
+	WorldObject::Group g = getObjectGroup(object);
+
+	// Zeiger auf Array in das eingefuegt wird
+	ServerWObject ** arr = getObjects(g);
+	
+	// Zeiger auf Anzahl der Objekte in der Ebene
+	short &  np = getObjectsNr(g);
+
+	if (np== MAX_GRIDUNIT_OBJ)
+	{
+		// Maximale Anzahl in der Ebene erreicht, Fehler anzeigen
+		return false;
+	}
+	else
+	{
+		// Element einfuegen, Zahler erhoehen
+		arr[np] = object;
+		np++;
+		DEBUG5("inserted object %p, as number %i in group %i",object,np,g);
+	}
+	
+	/*
+	if ((layer & WorldObject::Geometry::LAYER_FIXED) == layer)
+	{
+		// Objekt wird in Ebene FIXED eingeordnet
+		DEBUG5("inserting into fixed layer");
+
+		i = m_nr_fixed;
+		if (i== MAX_GRIDUNIT_OBJ)
+		{
+			// Maximale Anzahl in der Ebene erreicht, Fehler anzeigen
+			return false;
+		}
+		else
+		{
+			// Element einfuegen, Zahler erhoehen
+			m_fixed[i] = object;
+			m_nr_fixed++;
+		}
+	}
+	else if ((layer & WorldObject::Geometry::LAYER_DEAD) == layer)
+	{
+		DEBUG5("inserting into dead layer");
+		// Objekt wird in Ebene DEAD eingeordnet
+		i = m_nr_dead;
+		if (i== MAX_GRIDUNIT_OBJ)
+		{
+			// Maximale Anzahl in der Ebene erreicht, Fehler anzeigen
+			return false;
+		}
+		else
+		{
+			// Element einfuegen, Zahler erhoehen
+			m_dead[i] = object;
+			m_nr_dead++;
+		}
+	}
+	else if (layer == WorldObject::Geometry::LAYER_SPECIAL)
+	{
+		return true;
+	}
+	else
+	{
+		DEBUG5("inserting into creature layer");
+		// Objekt wird in Ebene CREATURE eingeordnet
+		i = m_nr_creature;
+		if (i== MAX_GRIDUNIT_OBJ)
+		{
+			// Maximale Anzahl in der Ebene erreicht, Fehler anzeigen
+			return false;
+		}
+		else
+		{
+			// Maximale Anzahl in der Ebene erreicht, Fehler anzeigen
+			m_creature[i] = object;
+			m_nr_creature++;
+		}
+	}
+	*/
+}
+
+bool  Gridunit::moveObject(ServerWObject* object,WorldObject::Group group )
+{
+	bool ret = deleteObject(object);
+	if (ret==false)
+		return false;
+	
+	// Zeiger auf Array in das eingefuegt wird
+	ServerWObject ** arr = getObjects(group);
+	
+	// Zeiger auf Anzahl der Objekte in der Ebene
+	short &  np = getObjectsNr(group);
+
+	if (np== MAX_GRIDUNIT_OBJ)
+	{
+		// Maximale Anzahl in der Ebene erreicht, Fehler anzeigen
+		return false;
+	}
+	else
+	{
+		// Element einfuegen, Zahler erhoehen
+		arr[np] = object;
+		np++;
+		DEBUG5("inserted object %p, as number %i in group %i",object,np,group);
+	}
+}
+
+bool Gridunit::deleteObject(ServerWObject* object, short index)
+{
+	// Ebene aus der geloescht werden soll
+	WorldObject::Group g = getObjectGroup(object);
+	
+	// Zeiger auf Array aus dem geloescht wird
+	ServerWObject ** arr = getObjects(g);
+	
+	// Zeiger auf Anzahl der Objekte in der Ebene
+	short &  np = getObjectsNr(g);
+	/*
+	if ((layer & WorldObject::Geometry::LAYER_FIXED )== layer)
+	{
+		// Loeschen aus FIXED Ebene
+		arr = m_fixed;
+		np = &m_nr_fixed;
+		DEBUG5("deleting from fixed layer");
+
+
+	}
+	else if ((layer & WorldObject::Geometry::LAYER_DEAD )== layer)
+	{
+		// Loeschen aus DEAD Ebene
+		arr = m_dead;
+		np = &m_nr_dead;
+		DEBUG5("deleting from dead layer");
+
+	}
+	else
+	{
+		// Loeschen aus CREATURE ebene
+		arr = m_creature;
+		np = &m_nr_creature;
+		DEBUG5("deleting from creature layer");
+
+	}
+	*/
+	DEBUG5("deleting obj %p from group %i",object,g);
+	if (index != -1)
+	{
+		// Stelle an der geloescht werden soll ist explizit vorgegeben
+		if (arr[index]==object)
+		{
+			// Letztes Objekt an die Stelle des geloeschten kopieren
+			arr[index] = arr[m_nr_fixed-1];
+			// Anzahl Objekte in dem Array reduzieren
+			np--;
+			return true;
+		}
+		else
+		{
+			// Objekt befindet sich nicht an der Stelle, Fehler ausgeben
+//			ERROR("Object not found at index %i",index);
+
+			return false;
+		}
+	}
+	else
+	{
+		// Suchen an welcher Stelle sich das Objekt befindet
+		for (int i=0;i<np;i++)
+		{
+		DEBUG5(" testing object %i",i);
+			if (arr[i]==object)
+			{
+				// Objekt gefunden
+				// Anzahl Objekte in dem Array reduzieren
+				np--;
+				
+				// Letztes Objekt an die Stelle des geloeschten kopieren
+				arr[i] = arr[np];
+				return true;
+			}
+		}
+	}
+
+	// Objekt nicht gefunden, Fehler anzeigen
+	ERRORMSG("Object %s not found ind group %i",object->getNameId().c_str(),g);
+	return false;
+
+}
+
+bool Gridunit::insertItem(DropItem* item)
+{
+	m_items.push_back(item);
+	return true;
+}
+
+bool Gridunit::deleteItem(DropItem* item)
+{
+	list<DropItem*>::iterator it;
+	for (it = m_items.begin();it != m_items.end();++it)
+	{
+		if ((*it)==item)
+		{
+			m_items.erase(it);
+			return true;
+		}
+	}
+	return false;
+}
+
+short&  Gridunit::getObjectsNr(WorldObject::Group group)
+{
+	if (group == WorldObject::CREATURE) return m_nr_creature;
+	else if (group == WorldObject::FIXED) return m_nr_fixed;
+	else return m_nr_dead;
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/gridunit.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,170 @@
+#ifndef GRIDUNIT_H
+#define GRIDUNIT_H
+
+#include "serverwobject.h"
+#include <list>
+#include "dropitem.h"
+#include "debug.h"
+
+#define MAX_GRIDUNIT_OBJ 20
+
+/**
+ * \struct Gridunit
+ * \brief Struktur fuer ein 4x4 Feld der Welt#
+ */
+struct Gridunit
+{
+	
+	
+	private:
+
+	/**
+	 * \var m_dead[20]
+	 * \brief Liste der toten Spieler auf dem Feld
+	 */
+	ServerWObject* m_dead[MAX_GRIDUNIT_OBJ];
+
+	/**
+	 * \var m_nr_dead
+	 * \brief Anzahl der toten Spieler auf dem Feld
+	 */
+	short m_nr_dead;
+
+	/**
+	 * \var m_fixed[20]
+	 * \brief Liste der festen Objekte auf dem Feld
+	 */
+
+	ServerWObject* m_fixed[MAX_GRIDUNIT_OBJ];
+
+	/**
+	 * \var m_nr_fixed
+	 * \brief Anzahl der festen Objekte auf dem Feld
+	 */
+	short m_nr_fixed;
+
+	/**
+	 * \var m_creature
+	 * \brief Liste der Kreaturen auf dem Feld
+	 */
+	ServerWObject* m_creature[MAX_GRIDUNIT_OBJ];
+
+	/**
+	 * \var m_nr_creature
+	 * \brief Anzahl der Kreaturen auf dem Feld
+	 */
+	short m_nr_creature;
+
+	/**
+	 * \var list<ServerItem*>* m_items
+	 * \brief Liste der Items auf dem Feld
+	 */
+	list<DropItem*> m_items;
+
+
+	public:
+
+		/**
+	 	 * \fn Gridunit()
+		 * \brief Konstruktor
+		 */
+		Gridunit();
+
+		/**
+		 * \fn ~Gridunit()
+		 * \brief Destruktor
+		 */
+		~Gridunit()
+		{
+		}
+
+
+
+		/**
+		 * \fn short getObjectNr(WorldObject::Geometry::Layer layer)
+		 * \brief Gibt die Anzahl der Objekte in einer der Schichten aus.
+		 * \param layer Schicht, deren Objektanzahl ausgegeben werden soll. Muss eines der folgenden sein: LAYER_FIXED, LAYER_CREATURE,LAYER_DEAD
+		 */
+		short&  getObjectsNr(WorldObject::Group group);
+		
+		
+		/**
+		 * \fn WorldObject::Group getObjectGroup(WorldObject* object)
+		 * \brief Gibt aus zu welcher Gruppierung ein Objekt gehoert
+		 */
+		WorldObject::Group getObjectGroup(WorldObject* object)
+		{
+			if (object->getTypeInfo()->m_type == WorldObject::TypeInfo::TYPE_FIXED_OBJECT)
+				return WorldObject::FIXED;
+			if (object->getState() == WorldObject::STATE_DEAD || object->getState() == WorldObject::STATE_DIEING )
+				return WorldObject::DEAD;
+			return WorldObject::CREATURE;
+			
+		}
+
+		/**
+		 * \fn getObjects(short layer)
+		 * \brief Gibt die Objekte einer Schicht als Array aus
+		 * \param layer Schicht, deren Objekte ausgegeben werden sollen. Muss eines der folgenden sein: LAYER_FIXED, LAYER_CREATURE,LAYER_DEAD
+		 * \return Array mit Zeigern auf die Objekte
+		 */
+		ServerWObject** getObjects(WorldObject::Group group)
+		{
+			if (group == WorldObject::CREATURE) return m_creature;
+			else if (group == WorldObject::FIXED) return m_fixed;
+			else if (group == WorldObject::DEAD) return m_dead;
+			return 0;
+		}
+
+		/**
+		 * \fn bool insertObject(ServerWObject* object)
+		 * \brief Fuegt das angegebenen Objekt in das Feld ein
+		 * \param object einzufuegendes Objekt
+		 * return gibt an, ob die Operation erfolgreich war
+		 */
+		bool insertObject(ServerWObject* object);
+
+		/**
+		 * \fn deleteObject(ServerWObject* object, short index=-1)
+		 * \brief Loescht das angegebene Objekt aus dem Feld
+		 * \param object zu loeschendes Objekt
+		 * \param index Index des Objektes im Array. Angabe beschleunigt die Funktion, ist aber optional
+		 * \return gibt an, ob die Operation erfolgreich war
+		 */
+		bool deleteObject(ServerWObject* object, short index=-1);
+
+		/**
+		 * \fn bool moveObject(ServerWObject* object,WorldObject::Group group )
+		 * \brief verschiebt das Objekt in die angegebene Gruppe
+		 * \param object das zu verschiebende Objekt
+		 * \param group Gruppe in die das Objekt verschoben wird
+		 */
+		bool moveObject(ServerWObject* object,WorldObject::Group group );
+		
+		/**
+		 * \fn void insertItem(DropItem* item)
+		 * \brief Fuegt Gegenstand ein
+		 * \param item einzufuegender Gegenstand
+		 */
+		bool insertItem(DropItem* item);
+
+		/**
+		 * \fn void deleteItem(short x, short y)
+		 * \brief Loescht einen Gegenstand aus dem Feld
+		 * \param item zu loeschender Gegenstand
+		 */
+		bool deleteItem(DropItem* item);
+
+		/**
+		 * \fn list<DropItem*>* getItems()
+		 * \brief Gibt die Liste der Items aus
+		 */
+		list<DropItem*>* getItems()
+		{
+			return &m_items;
+		}
+
+};
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/item.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,147 @@
+#include "item.h"
+
+
+string Item::getName()
+{
+    #ifndef WIN32
+        return (gettext((getString()).c_str()));
+    #else
+        return getString();
+    #endif
+}
+
+
+string Item::getString()
+{
+	/*
+	switch (m_type)
+	{
+		case NOITEM:
+			return "noitem";
+			break;
+		case ARMOR:
+			switch (m_subtype)
+			{
+				case LEATHER_ARMOR:
+					return "leather_armor";
+				case TILED_ARMOR:
+					return "tiled_armor";
+				case HEAVY_ARMOR:
+					return "heavy_armor";
+
+				default:
+					return "armor";
+			}
+			break;
+		case HELMET:
+			switch (m_subtype)
+			{
+				case STEEL_HELMET:
+					return "steel_helmet";
+				case DIVINE_HELMET:
+					return "divine_helmet";
+
+				default:
+					return "helmet";
+			}
+			break;
+		case GLOVES:
+			return "gloves";
+			break;
+		case WEAPON:
+			switch (m_subtype)
+			{
+				case SHORT_SWORD:
+					return "short_sword";
+				case LONG_SWORD:
+					return "long_sword";
+				case WOODEN_BOW:
+					return "wooden_bow";
+				case LONG_BOW:
+					return "long_bow";
+				case BURNING_BOW:
+					return "burning_bow";
+				case BATTLE_AXE:
+					return "battle_axe";
+				case HOLY_FLAIL:
+					return "holy_flail";
+
+				default:
+					return "weapon";
+			}
+			break;
+		case SHIELD:
+			switch (m_subtype)
+			{
+				case WOODEN_SHIELD:
+					return "wooden_shield";
+				case IRON_SHIELD:
+					return "iron_shield";
+
+				default:
+					return "shield";
+			}
+			break;
+		case POTION:
+			switch (m_subtype)
+			{
+				case SMALL_HEAL_POTION:
+					return "small_heal_potion";
+				case BIG_HEAL_POTION:
+					return "big_heal_potion";
+				case HEAL_BLIND_POTION:
+					return "heal_blind_potion";
+				case UNFREEZE_POTION:
+					return "instant_unfreeze_potion";
+
+				default:
+					return "potion";
+			}
+			break;
+		case RING:
+			return "ring";
+			break;
+		case AMULET:
+			return "amulet";
+			break;
+		default:
+			return "unknown";
+			break;
+	}
+	*/
+	return m_subtype;
+}
+
+
+void Item::toString(CharConv* cv, short pos)
+{
+
+	cv->toBuffer((char) m_type);
+	char stmp[11];
+	stmp[10] = '\0';
+	strncpy(stmp,m_subtype.c_str(),10);
+	cv->toBuffer(stmp,10);
+	cv->toBuffer((char) m_size);
+	cv->toBuffer(pos);
+
+
+}
+
+void Item::fromString(CharConv* cv, short& pos)
+{
+	char ctmp;
+	short tmp;
+	cv->fromBuffer<char>(ctmp);
+	m_type = (Type) ctmp;
+	char stmp[11];
+	stmp[10] ='\0';
+	cv->fromBuffer(stmp,10);
+	m_subtype = stmp;
+	cv->fromBuffer<char>(ctmp);
+	m_size = (Size) ctmp;
+	cv->fromBuffer<short>(pos);
+
+}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/item.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,206 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf, Daniel Erler
+
+	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.
+*/
+/**
+ * \file item.h
+ * \defgroup Item \ Gegenstand
+ * \brief Beschreibt den Aufbau von Gegenst&auml;nden, die ein Spieler haben kann.
+ * \author Hans Wulf
+ * \version 1.0
+ * \date 2007/05/28
+ * \note Beinhaltet die Klasse Item
+ */
+#ifndef ITEM_H
+#define ITEM_H
+
+
+#include <string>
+#include <cstring>
+#ifdef WIN32
+
+#else
+    #include <libintl.h>
+#endif
+#include <locale.h>
+#include "charconv.h"
+#include "debug.h"
+
+using namespace std;
+
+
+/**
+ * \struct Item
+ * \brief Dieses Objekt ist ein Gegenstand und hat als solches Eigenschaften, wie Preis, Anzahl oder Gewicht.
+ */
+struct Item {
+	/**
+	 * \enum Size
+	 * \brief TODO
+	 */
+	enum Size
+	{
+		GOLD = 3,
+		SMALL = 2,
+		MEDIUM = 1,
+		BIG = 0,
+	};
+
+
+	/**
+	 * \enum Type
+	 * \brief TODO
+	 */
+	enum Type
+	{
+		NOITEM = 0,
+		ARMOR  = 1,
+		HELMET = 2,
+		GLOVES = 6,
+		WEAPON = 8,
+		SHIELD = 5,
+		POTION = 4,
+		RING = 3,
+		AMULET= 7,
+ 		GOLD_TYPE = 10
+	};
+
+	/**
+	 * \var  Subtype
+	 */
+	typedef std::string Subtype;
+/*
+	enum Subtype
+	{
+		NOSUBTYPE = 0,
+
+		SHORT_SWORD = 1,
+		LONG_SWORD = 2,
+		WOODEN_BOW = 3,
+		LONG_BOW = 4,
+		BURNING_BOW = 5,
+		BATTLE_AXE = 6,
+		HOLY_FLAIL = 7,
+		FROZEN_MAGIC_WAND = 14,
+
+
+		LEATHER_ARMOR = 1000,
+		TILED_ARMOR = 1001,
+		HEAVY_ARMOR = 1002,
+
+		STEEL_HELMET = 2000,
+		DIVINE_HELMET =2001,
+
+		MAGIC_RING = 3000,
+
+		SMALL_HEAL_POTION = 4000,
+		BIG_HEAL_POTION = 4001,
+		HEAL_BLIND_POTION = 4002,
+		UNFREEZE_POTION = 4003,
+
+
+		WOODEN_SHIELD = 5000,
+		IRON_SHIELD=5001,
+
+		LEATHER_GLOVES = 6000,
+
+		MAGIC_AMULET = 7000,
+	};
+*/
+	/**
+	 * \enum CharRequirement
+	 * \brief Aufzaehlung der Charakterklassen als Vorraussetzung fuer das Verwendung eines Gegenstandes
+	 */
+	enum CharRequirement
+	{
+		REQ_WARRIOR=1,
+		REQ_MAGE=2,
+		REQ_ARCHER=4,
+		REQ_PRIEST=8,
+		REQ_NONE=15,
+	};
+
+	/**
+	 * \fn virtual ~Item()
+	 * \brief Destruktor
+	 */
+	virtual ~Item()
+	{
+	}
+
+	/**
+	 * \fn String getName()
+	 * \brief Gibt den lesbaren Name des Objektes aus
+	 */
+	virtual string getName();
+
+	/**
+	 * \fn String getString()
+	 * \brief Gibt den Name des Objektes aus
+	 */
+	virtual string getString();
+
+	/**
+	 * \fn void toString(CharConv* cv, short pos)
+	 * \brief Konvertiert das Objekt in einen String und schreibt ihn in der Puffer
+	 * \param buf Ausgabepuffer
+	 * \return Zeiger hinter den beschriebenen Datenbereich
+	 */
+	virtual void toString(CharConv* cv, short pos);
+
+
+	/**
+	 * \fn void fromString(void CharConv* cv, short& pos)
+	 * \brief Erzeugt das Objekt aus einem String
+	 * \param buf Objekt als String
+	 * \return Zeiger hinter den gelesenen Datenbereich
+	 */
+	virtual void fromString(CharConv* cv,short& pos);
+
+
+	/**
+	* \var m_subtype;
+	* \brief Gibt die Unterart eines Gegenstands an ((Langschwert, Dolch usw)
+	*/
+	Subtype m_subtype;
+
+
+	/**
+	 * \var m_type;
+	 * \brief Gibt Typ des Gegenstands an (Waffe, Helm usw...)
+	 */
+	Type m_type;
+
+	/**
+	* \var m_size
+	\brief Gibt die Groesse des Gegenstandes (klein,mittel, gross) an
+	*/
+	Size m_size;
+
+
+
+
+};
+
+/*
+
+*/
+
+
+
+#endif //ITEM_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/itemfactory.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,832 @@
+#include "itemfactory.h"
+
+#define USE_ITEMLOADER
+
+#include <iostream>
+using namespace std;
+
+map<Item::Subtype, DropChance> ItemFactory::m_item_probabilities;
+
+map<Item::Subtype, Item::Type> ItemFactory::m_item_types;
+
+map<Item::Subtype,ItemBasicData*> ItemFactory::m_item_data;
+
+ItemFactory::ItemFactory()
+{
+}
+
+
+ServerItem* ItemFactory::createItem(Item::Type type, Item::Subtype subtype,float magic_power)
+{
+	DEBUG5("creating item %i / %s",type, subtype.c_str());
+	map<Item::Subtype,ItemBasicData*>::iterator it;
+	it = m_item_data.find(subtype);
+	ServerItem * item;
+	float min_enchant =30;
+	float max_enchant =100;
+
+	if (it != m_item_data.end())
+	{
+		DEBUG("found item data for subtype %s",subtype.c_str());
+		ItemBasicData* idata = it->second;
+		item = new ServerItem(*idata);
+
+		//createMagicMods(item,idata->m_modchance,magic_power, idata->m_min_enchant, idata->m_max_enchant);
+
+		// Preis ausrechnen
+		item->calcPrice();
+
+		return item;
+	}
+
+
+
+	item = new ServerItem;
+
+	item->m_type = type;
+	item->m_subtype = subtype;
+
+	CreatureBaseAttrMod * m_creature_base_attr_mod=0;
+	CreatureDynAttrMod * m_creature_dyn_attr_mod=0;
+	WeaponAttr * m_weaponattr=0;
+
+
+
+
+	float modchance[31];
+	memset(modchance,0,31*sizeof(float));
+
+	if (type == Item::ARMOR ||
+		type == Item::HELMET ||
+		type == Item::GLOVES ||
+		type == Item::SHIELD ||
+		type == Item::RING ||
+		type == Item::AMULET)
+	{
+		m_creature_base_attr_mod = new CreatureBaseAttrMod();
+		item->m_useup_effect = 0;
+		item->m_equip_effect = m_creature_base_attr_mod;
+		item->m_weapon_attr = 0;
+		if (type == Item::RING)
+		{
+			item->m_weapon_attr = new WeaponAttr();
+		}
+
+		if (type == Item::ARMOR)
+		{
+			modchance[HEALTH_MOD]=0.05;
+			modchance[ARMOR_MOD]=0.6;
+			modchance[DEXTERITY_MOD]=0.05;
+			modchance[WILLPOWER_MOD]=0.05;
+			modchance[RESIST_PHYS_MOD]=0.03;
+			modchance[RESIST_FIRE_MOD]=0.06;
+			modchance[RESIST_ICE_MOD]=0.06;
+			modchance[RESIST_AIR_MOD]=0.06;
+			modchance[RESIST_ALL_MOD]=0.04;
+			if (subtype =="leath_arm")
+			{
+					min_enchant = 30;
+					max_enchant= 100;
+					item->m_price = 60;
+					item->m_size = Item::BIG;
+					item->m_equip_effect->m_darmor = 20;
+			}
+			else if (subtype =="tiled_arm")
+			{
+					min_enchant = 50;
+					max_enchant= 300;
+					item->m_price = 100;
+					item->m_size = Item::BIG;
+					item->m_equip_effect->m_darmor = 40;
+			}
+			else if (subtype =="heavy_arm")
+			{
+					min_enchant = 100;
+					max_enchant= 600;
+					item->m_price = 300;
+					item->m_size = Item::BIG;
+					item->m_equip_effect->m_darmor = 100;
+			}
+		}
+
+		else if (type == Item::HELMET)
+		{
+			modchance[HEALTH_MOD]=0.1;
+			modchance[ARMOR_MOD]=0.5;
+			modchance[MAGIC_POWER_MOD]=0.1;
+			modchance[WILLPOWER_MOD]=0.1;
+			modchance[RESIST_PHYS_MOD]=0.02;
+			modchance[RESIST_FIRE_MOD]=0.05;
+			modchance[RESIST_ICE_MOD]=0.05;
+			modchance[RESIST_AIR_MOD]=0.05;
+			modchance[RESIST_ALL_MOD]=0.04;
+			if (subtype =="steel_hlm")
+			{
+				min_enchant = 50;
+					max_enchant= 150;
+					item->m_price = 60;
+					item->m_size = Item::MEDIUM;
+					item->m_equip_effect->m_darmor = 10;
+			}
+			else if (subtype =="divine_hlm")
+			{
+					min_enchant = 100;
+					max_enchant= 400;
+					item->m_price = 400;
+					item->m_size = Item::MEDIUM;
+					item->m_equip_effect->m_darmor = 30;
+					item->m_equip_effect->m_dwillpower = 20;
+			}
+		}
+		else if (type == Item::GLOVES)
+		{
+			modchance[ARMOR_MOD]=0.1;
+			modchance[DEXTERITY_MOD]=0.2;
+			modchance[MAGIC_POWER_MOD]=0.2;
+			modchance[STRENGTH_MOD]=0.2;
+			modchance[RESIST_FIRE_MOD]=0.034;
+			modchance[RESIST_ICE_MOD]=0.033;
+			modchance[RESIST_AIR_MOD]=0.033;
+			modchance[ATTACK_SPEED_MOD]=0.2;
+					
+			if (subtype =="leath_gl")
+			{
+				min_enchant = 20;
+				max_enchant= 80;
+				item->m_price = 60;
+				item->m_size = Item::MEDIUM;
+				item->m_equip_effect->m_darmor = 2;
+			}
+
+		}
+
+		else if (type == Item::SHIELD)
+		{
+			modchance[BLOCK_MOD]=0.6;
+			modchance[RESIST_PHYS_MOD]=0.05;
+			modchance[RESIST_FIRE_MOD]=0.1;
+			modchance[RESIST_ICE_MOD]=0.1;
+			modchance[RESIST_AIR_MOD]=0.1;
+			modchance[RESIST_ALL_MOD]=0.05;
+			if (subtype =="wood_sh")
+			{
+				min_enchant = 40;
+					max_enchant= 150;
+					item->m_price = 15;
+					item->m_size = Item::MEDIUM;
+					item->m_equip_effect->m_dblock = 10;
+			}
+			else if (subtype =="iron_sh")
+			{
+				 min_enchant = 60;
+					max_enchant= 300;
+					item->m_price = 45;
+					item->m_size = Item::BIG;
+					item->m_equip_effect->m_dblock = 20;
+			
+			}
+			else if (type == Item::RING)
+			{
+				modchance[WILLPOWER_MOD]=0.2;
+				modchance[MAGIC_POWER_MOD]=0.25;
+				modchance[RESIST_FIRE_MOD]=0.10;
+				modchance[RESIST_ICE_MOD]=0.10;
+				modchance[RESIST_AIR_MOD]=0.10;
+				modchance[RESIST_ALL_MOD]=0.10;
+				modchance[DAMAGE_MULT_FIRE_MOD]=0.05;
+				modchance[DAMAGE_MULT_ICE_MOD]=0.05;
+				modchance[DAMAGE_MULT_AIR_MOD]=0.05;
+			}
+			else if (subtype =="ring")
+			{
+				min_enchant = min(200.0,magic_power*0.2);
+					max_enchant= min(850.0,magic_power*1.5);
+					item->m_price = 350;
+					item->m_size = Item::SMALL;
+					
+			}
+		}
+		else if (type == Item::AMULET)
+		{
+			modchance[WILLPOWER_MOD]=0.2;
+			modchance[MAGIC_POWER_MOD]=0.20;
+			modchance[RESIST_FIRE_MOD]=0.10;
+			modchance[RESIST_ICE_MOD]=0.10;
+			modchance[RESIST_AIR_MOD]=0.10;
+			modchance[RESIST_ALL_MOD]=0.30;
+			if (subtype =="amulet")
+			{
+				min_enchant = min(200.0,magic_power*0.2);
+					max_enchant= min(850.0,magic_power*1.5);
+					item->m_size = Item::SMALL;
+			}
+		}
+	}
+	else if (type == Item::WEAPON)
+	{
+		modchance[DEXTERITY_MOD]=0.1;
+		modchance[MAGIC_POWER_MOD]=0.05;
+		modchance[STRENGTH_MOD]=0.1;
+		modchance[DAMAGE_PHYS_MOD]=0.15;
+		modchance[DAMAGE_FIRE_MOD]=0.10;
+		modchance[DAMAGE_ICE_MOD]=0.10;
+		modchance[DAMAGE_AIR_MOD]=0.10;
+		modchance[ATTACK_MOD]= 0.1;
+		modchance[POWER_MOD] = 0.1;
+		modchance[DAMAGE_MULT_PHYS_MOD]=0.1;
+
+
+		m_creature_base_attr_mod = new CreatureBaseAttrMod();
+		m_weaponattr = new WeaponAttr();
+		item->m_useup_effect = 0;
+		item->m_equip_effect = m_creature_base_attr_mod;
+		item->m_weapon_attr = m_weaponattr;
+
+		if (subtype =="short_sw")
+		{
+			min_enchant = 30;
+				max_enchant= 120;
+				item->m_price = 150;
+				item->m_size = Item::MEDIUM;
+				item->m_weapon_attr->m_damage.m_min_damage[Damage::PHYSICAL] = 5;
+				item->m_weapon_attr->m_damage.m_max_damage[Damage::PHYSICAL] = 10;
+				item->m_weapon_attr->m_damage.m_attack = 20;
+				item->m_weapon_attr->m_damage.m_power = 30;
+				item->m_weapon_attr->m_attack_range = 1.0;
+				item->m_weapon_attr->m_two_handed = false;
+				item->m_weapon_attr->m_dattack_speed = 500;
+		}
+		else if (subtype =="long_sw")
+		{
+			min_enchant = 60;
+				max_enchant= 250;
+				item->m_price = 200;
+				item->m_size = Item::MEDIUM;
+				item->m_weapon_attr->m_damage.m_min_damage[Damage::PHYSICAL] = 5;
+				item->m_weapon_attr->m_damage.m_max_damage[Damage::PHYSICAL] = 20;
+				item->m_weapon_attr->m_damage.m_attack = 30;
+				item->m_weapon_attr->m_damage.m_power = 40;
+				item->m_weapon_attr->m_attack_range = 2.0;
+				item->m_weapon_attr->m_two_handed = false;
+				item->m_weapon_attr->m_dattack_speed = 0;
+		}
+		else if (subtype =="wood_bow")
+		{
+				
+				min_enchant = 50;
+				max_enchant= 200;
+				item->m_price = 100;
+				item->m_size = Item::MEDIUM;
+				item->m_weapon_attr->m_damage.m_min_damage[Damage::PHYSICAL] = 5;
+				item->m_weapon_attr->m_damage.m_max_damage[Damage::PHYSICAL] = 15;
+				item->m_weapon_attr->m_damage.m_attack = 20;
+				item->m_weapon_attr->m_damage.m_power = 40;
+				item->m_weapon_attr->m_attack_range = 40.0;
+				item->m_weapon_attr->m_two_handed = true;
+				item->m_weapon_attr->m_dattack_speed = 1000;
+		}
+		else if (subtype =="long_bow")
+		{
+			min_enchant = 80;
+				max_enchant= 300;
+				item->m_price = 350;
+				item->m_size = Item::BIG;
+				item->m_weapon_attr->m_damage.m_min_damage[Damage::PHYSICAL] = 5;
+				item->m_weapon_attr->m_damage.m_max_damage[Damage::PHYSICAL] = 30;
+				item->m_weapon_attr->m_damage.m_attack = 30;
+				item->m_weapon_attr->m_damage.m_power = 60;
+				item->m_weapon_attr->m_attack_range = 70.0;
+				item->m_weapon_attr->m_two_handed = true;
+				item->m_weapon_attr->m_dattack_speed = 1000;
+		}
+		else if (subtype =="fire_bow")
+		{
+			min_enchant = 150;
+				max_enchant= 600;
+				item->m_price = 800;
+				item->m_size = Item::BIG;
+				item->m_weapon_attr->m_damage.m_min_damage[Damage::PHYSICAL] = 10;
+				item->m_weapon_attr->m_damage.m_max_damage[Damage::PHYSICAL] = 30;
+				item->m_weapon_attr->m_damage.m_min_damage[Damage::FIRE] = 20;
+				item->m_weapon_attr->m_damage.m_max_damage[Damage::FIRE] = 45;
+				item->m_weapon_attr->m_damage.m_attack = 30;
+				item->m_weapon_attr->m_damage.m_power = 50;
+				item->m_weapon_attr->m_attack_range = 60.0;
+				item->m_weapon_attr->m_two_handed = true;
+				item->m_weapon_attr->m_dattack_speed = 500;
+		}
+		else if (subtype =="battle_axe")
+		{
+			min_enchant = 100;
+				max_enchant= 400;
+				item->m_price = 500;
+				item->m_size = Item::BIG;
+				item->m_weapon_attr->m_damage.m_min_damage[Damage::PHYSICAL] = 20;
+				item->m_weapon_attr->m_damage.m_max_damage[Damage::PHYSICAL] = 40;
+				item->m_weapon_attr->m_damage.m_attack = 50;
+				item->m_weapon_attr->m_damage.m_power = 60;
+				item->m_weapon_attr->m_attack_range = 1.5;
+				item->m_weapon_attr->m_two_handed = true;
+				item->m_weapon_attr->m_dattack_speed = -500;
+		}
+		else if (subtype =="ice_wand")
+		{
+			item->m_price = 700;
+				item->m_size = Item::MEDIUM;
+				item->m_equip_effect->m_dmagic_power = 70;
+				item->m_weapon_attr->m_damage.m_min_damage[Damage::ICE] = 10;
+				item->m_weapon_attr->m_damage.m_max_damage[Damage::ICE] = 30;
+				item->m_weapon_attr->m_damage.m_attack = 30;
+				item->m_weapon_attr->m_damage.m_power = 70;
+				item->m_weapon_attr->m_damage.m_special_flags = Damage::EXTRA_UNDEAD_DMG;
+				item->m_weapon_attr->m_damage.m_special_flags = Damage::EXTRA_DEMON_DMG;
+				item->m_weapon_attr->m_attack_range = 4.0;
+				item->m_weapon_attr->m_two_handed = false;
+				item->m_weapon_attr->m_dattack_speed = 0;
+		}
+		else if (subtype =="holy_flail")
+		{
+			item->m_price = 500;
+				item->m_size = Item::MEDIUM;
+				item->m_equip_effect->m_dwillpower = 35;
+				item->m_weapon_attr->m_damage.m_min_damage[Damage::PHYSICAL] = 5;
+				item->m_weapon_attr->m_damage.m_max_damage[Damage::PHYSICAL] = 50;
+				item->m_weapon_attr->m_damage.m_attack = 20;
+				item->m_weapon_attr->m_damage.m_power = 50;
+				item->m_weapon_attr->m_damage.m_special_flags = Damage::EXTRA_UNDEAD_DMG;
+				item->m_weapon_attr->m_attack_range = 1.5;
+				item->m_weapon_attr->m_two_handed = false;
+				item->m_weapon_attr->m_dattack_speed = -500;
+		}
+	}
+	else if (type == Item::POTION)
+	{
+		magic_power =0;
+
+		m_creature_dyn_attr_mod = new CreatureDynAttrMod();
+		m_weaponattr = new WeaponAttr();
+		item->m_useup_effect = m_creature_dyn_attr_mod;
+		item->m_equip_effect = 0;
+		item->m_weapon_attr = 0;
+
+		 if (subtype =="heal_1")
+		{
+
+				item->m_price = 20;
+				item->m_size = Item::SMALL;
+				item->m_useup_effect->m_dhealth = 50;
+		}
+		else if (subtype =="heal_2")
+		{
+			item->m_price = 80;
+				item->m_size = Item::SMALL;
+				item->m_useup_effect->m_dhealth = 200;
+		}
+		else if (subtype =="heal_bl")
+		{
+			item->m_price = 100;
+				item->m_size = Item::SMALL;
+				item->m_useup_effect->m_dstatus_mod_immune_time[Damage::BLIND] = 8000;
+		}
+		else if (subtype =="heal_fr")
+		{
+			item->m_price = 50;
+				item->m_size = Item::SMALL;
+				item->m_useup_effect->m_dstatus_mod_immune_time[Damage::FROZEN] = 1;
+		}
+	}
+
+	// Verzauberungen bestimmen
+	item->m_magic_power= magic_power;
+
+	if (magic_power>min_enchant)
+	{
+
+		createMagicMods(item,modchance,magic_power, min_enchant, max_enchant);
+	}
+
+	// Preis ausrechnen
+	item->calcPrice();
+
+	return item;
+
+}
+
+
+void ItemFactory::createMagicMods(ServerItem* item, float* modchance, float magic_power, float min_enchant, float max_enchant)
+{
+	// Modifikationen des Items auswuerfeln
+	DEBUG4("mods auswuerfeln");
+
+		// bisher zugeteilte Staerke der Modifikation
+	float mod_power[31];
+	memset(mod_power,0,31*sizeof(float));
+
+	float sum =0;
+	int i;
+	for (i=0;i<31;i++)
+	{
+		sum += modchance[i];
+	}
+
+		// Staerke der aktuellen Verzauberung
+	float mp;
+	float sqrtmp;
+	float logmp;
+
+	float dmgdiff,dmgavg;
+
+		// durch Verzauberungen benoetigtes Level
+	int levelreq =0;
+
+		// aktuelle Verzauberung
+	int mod;
+
+		// Anzahl verschiedene Verzauberungen
+	int num_mods=0;
+	while (magic_power>min_enchant && num_mods<4)
+	{
+			// Staerke auswuerfeln
+		mp = Random::randrangef(min_enchant,max_enchant);
+		mp = std::min(mp, magic_power);
+		sqrtmp = sqrt(mp);
+		logmp = log(mp);
+		magic_power -= mp;
+		DEBUG4("ausgewuerfelt: Starke der Verzauberung: %f",mp);
+
+			// Modifikation auswuerfeln
+		mod = Random::randDiscrete(modchance,31,sum);
+		DEBUG4("Art der Verzauberung: %i",mod);
+
+		num_mods++;
+
+		levelreq = max(levelreq,(int) (mp*0.06-1));
+		levelreq = min(80,levelreq);
+
+		dmgavg = mp*0.06;
+
+			// Wirkung der Modifikation
+		switch (mod)
+		{
+			case HEALTH_MOD:
+				item->m_equip_effect->m_dmax_health += ceil(mp*0.15);
+				break;
+
+			case ARMOR_MOD:
+				item->m_equip_effect->m_darmor += (short) ceil(mp*0.08);
+				break;
+
+			case BLOCK_MOD:
+				item->m_equip_effect->m_dblock += (short) ceil(mp*0.08);
+				break;
+
+			case STRENGTH_MOD:
+				item->m_equip_effect->m_dstrength += (short) ceil(mp*0.03);
+				break;
+
+			case DEXTERITY_MOD:
+				item->m_equip_effect->m_ddexterity += (short) ceil(mp*0.03);
+				break;
+
+			case WILLPOWER_MOD:
+				item->m_equip_effect->m_dwillpower += (short) ceil(mp*0.03);
+				break;
+
+			case MAGIC_POWER_MOD:
+				item->m_equip_effect->m_dmagic_power += (short) ceil(mp*0.03);
+				break;
+
+			case RESIST_PHYS_MOD:
+				item->m_equip_effect->m_dresistances[Damage::PHYSICAL] += (short) ceil(sqrtmp*0.5);
+				break;
+
+			case RESIST_FIRE_MOD:
+				item->m_equip_effect->m_dresistances[Damage::FIRE] += (short) ceil(sqrtmp*1.0);
+				break;
+
+			case RESIST_ICE_MOD:
+				item->m_equip_effect->m_dresistances[Damage::FIRE] += (short) ceil(sqrtmp*1.0);
+				break;
+
+			case RESIST_AIR_MOD:
+				item->m_equip_effect->m_dresistances[Damage::AIR] += (short) ceil(sqrtmp*1.0);
+				break;
+
+			case RESIST_ALL_MOD:
+				item->m_equip_effect->m_dresistances[Damage::FIRE] += (short) ceil(sqrtmp*0.5);
+				item->m_equip_effect->m_dresistances[Damage::ICE] += (short) ceil(sqrtmp*0.5);
+				item->m_equip_effect->m_dresistances[Damage::AIR] += (short) ceil(sqrtmp*0.5);
+				break;
+
+			case DAMAGE_PHYS_MOD:
+				dmgavg *=0.6;
+				dmgdiff = Random::randrangef(dmgavg*0.2,dmgavg*0.6);
+				item->m_weapon_attr->m_damage.m_min_damage[Damage::PHYSICAL] += ceil(dmgavg-dmgdiff);
+				item->m_weapon_attr->m_damage.m_max_damage[Damage::PHYSICAL] += ceil(dmgavg+dmgdiff);
+				break;
+
+			case DAMAGE_FIRE_MOD:
+				dmgdiff = Random::randrangef(dmgavg*0.2,dmgavg*0.5);
+				item->m_weapon_attr->m_damage.m_min_damage[Damage::FIRE] += ceil(dmgavg-dmgdiff);
+				item->m_weapon_attr->m_damage.m_max_damage[Damage::FIRE] += ceil(dmgavg+dmgdiff);
+				break;
+
+			case DAMAGE_ICE_MOD:
+				dmgdiff = Random::randrangef(dmgavg*0.1,dmgavg*0.3);
+				item->m_weapon_attr->m_damage.m_min_damage[Damage::ICE] += ceil(dmgavg-dmgdiff);
+				item->m_weapon_attr->m_damage.m_max_damage[Damage::ICE] += ceil(dmgavg+dmgdiff);
+				break;
+
+			case DAMAGE_AIR_MOD:
+				dmgdiff = Random::randrangef(dmgavg*0.4,dmgavg*0.8);
+				item->m_weapon_attr->m_damage.m_min_damage[Damage::AIR] += ceil(dmgavg-dmgdiff);
+				item->m_weapon_attr->m_damage.m_max_damage[Damage::AIR] += ceil(dmgavg+dmgdiff);
+				break;
+
+			case DAMAGE_MULT_PHYS_MOD:
+				item->m_weapon_attr->m_damage.m_multiplier[Damage::PHYSICAL] *= (1+sqrtmp*0.01);
+				break;
+
+			case DAMAGE_MULT_FIRE_MOD:
+				item->m_weapon_attr->m_damage.m_multiplier[Damage::FIRE] *= (1+sqrtmp*0.006);
+				break;
+
+			case DAMAGE_MULT_ICE_MOD:
+				item->m_weapon_attr->m_damage.m_multiplier[Damage::ICE] *= (1+sqrtmp*0.006);
+				break;
+
+			case DAMAGE_MULT_AIR_MOD:
+				item->m_weapon_attr->m_damage.m_multiplier[Damage::AIR] *= (1+sqrtmp*0.006);
+				break;
+
+			case ATTACK_SPEED_MOD:
+				item->m_equip_effect->m_dattack_speed += (short)  (sqrtmp*15);
+				break;
+
+			case ATTACK_MOD:
+				item->m_weapon_attr->m_damage.m_attack += ceil(mp*0.05);
+				break;
+
+			case POWER_MOD:
+				item->m_weapon_attr->m_damage.m_power += ceil(mp*0.05);
+				break;
+
+		}
+
+			// jede Modifikation darf nur einmal vorkommen, entfernen
+
+		sum -= modchance[mod];
+		modchance[mod]=0;
+	}
+
+	item->m_level_req = std::max(item->m_level_req,(char) levelreq);
+	DEBUG5("level req %i",item->m_level_req);
+}
+
+void ItemFactory::registerItemDrop(Item::Type type,Item::Subtype subtype, DropChance chance)
+{
+	m_item_probabilities.insert(make_pair(subtype, chance));
+	m_item_types.insert(make_pair(subtype,type));
+}
+
+void ItemFactory::registerItem(Item::Type type,Item::Subtype subtype, ItemBasicData* data)
+{
+	m_item_data.insert(make_pair(subtype, data));
+	m_item_types.insert(make_pair(subtype,type));
+}
+
+
+
+void ItemFactory::init()
+{
+#ifdef USE_ITEMLOADER
+	// Items aus XML Laden
+	ItemLoader* itemloader = 0;
+	itemloader = new ItemLoader;
+	
+	list<ItemBasicData*>* item_list;
+	item_list = itemloader->loadItemBasicData("../../data/items.xml");
+	
+	if (item_list != 0)
+	{
+		list<ItemBasicData*>::iterator iter = item_list->begin();
+		while (iter != item_list->end())
+		{
+			cout << "m_useup_effect" << " = " << (*iter)->m_useup_effect << endl;
+			cout << "m_equip_effect" << " = " << (*iter)->m_equip_effect << endl;
+			cout << "m_weapon_attr" << " = " << (*iter)->m_weapon_attr << endl;
+			
+			cout << "     m_damage.m_min_damage[Damage::PHYSICAL]" << " = " << (*iter)->m_weapon_attr->m_damage.m_min_damage[Damage::PHYSICAL] << endl;
+			cout << "     m_damage.m_max_damage[Damage::PHYSICAL]" << " = " << (*iter)->m_weapon_attr->m_damage.m_min_damage[Damage::PHYSICAL] << endl;
+			cout << "     m_damage.m_min_damage[Damage::AIR]" << " = " << (*iter)->m_weapon_attr->m_damage.m_min_damage[Damage::AIR] << endl;
+			cout << "     m_damage.m_max_damage[Damage::AIR]" << " = " << (*iter)->m_weapon_attr->m_damage.m_min_damage[Damage::AIR] << endl;
+			cout << "     m_damage.m_min_damage[Damage::ICE]" << " = " << (*iter)->m_weapon_attr->m_damage.m_min_damage[Damage::ICE] << endl;
+			cout << "     m_damage.m_max_damage[Damage::ICE]" << " = " << (*iter)->m_weapon_attr->m_damage.m_min_damage[Damage::ICE] << endl;
+			cout << "     m_damage.m_min_damage[Damage::FIRE]" << " = " << (*iter)->m_weapon_attr->m_damage.m_min_damage[Damage::FIRE] << endl;
+			cout << "     m_damage.m_max_damage[Damage::FIRE]" << " = " << (*iter)->m_weapon_attr->m_damage.m_min_damage[Damage::FIRE] << endl;
+			cout << "     m_attack_range" << " = " << (*iter)->m_weapon_attr->m_attack_range << endl;
+			cout << "     m_two_handed" << " = " << (*iter)->m_weapon_attr->m_two_handed << endl;
+			cout << "     m_dattack_speed" << " = " << (*iter)->m_weapon_attr->m_dattack_speed << endl;
+			
+			cout << "m_level_req" << " = " << static_cast<int>((*iter)->m_level_req) << endl;
+			cout << "m_char_req" << " = " << static_cast<int>((*iter)->m_char_req) << endl;
+			cout << "m_subtype" << " = " << (*iter)->m_subtype << endl;
+			cout << "m_type" << " = " << (*iter)->m_type << endl;
+			cout << "m_size" << " = " << (*iter)->m_size << endl;
+			cout << "m_price" << " = " << (*iter)->m_price << endl;
+			cout << "m_min_enchant" << " = " << (*iter)->m_min_enchant << endl;
+			cout << "m_max_enchant" << " = " << (*iter)->m_max_enchant << endl;
+			cout << "------------------------------------------------" << endl;
+			
+			registerItem((*iter)->m_type, (*iter)->m_subtype, *iter);
+			*iter++;
+		}
+	}
+	
+	
+	list<DropChanceData*>* drop_chance_list;
+	drop_chance_list = itemloader->loadDropChanceData("../../data/items.xml");
+	
+	if (drop_chance_list != 0)
+	{
+		list<DropChanceData*>::iterator iter = drop_chance_list->begin();
+		while (iter != drop_chance_list->end())
+		{
+			registerItemDrop( (*iter)->m_type, (*iter)->m_subtype, DropChance( (*iter)->m_level, (*iter)->m_probability, (*iter)->m_size) );
+			*iter++;
+		}
+	}
+	
+	delete itemloader;
+#endif
+
+#ifndef USE_ITEMLOADER
+	ItemBasicData* idata;
+
+	// Standard Modifikator verteilung fuer Waffen
+	float weapon_mod[31];
+	for (int i=0;i<31;i++)
+	{
+		weapon_mod[i] =0;
+	}
+	weapon_mod[DEXTERITY_MOD]=0.1;
+	weapon_mod[MAGIC_POWER_MOD]=0.05;
+	weapon_mod[STRENGTH_MOD]=0.1;
+	weapon_mod[DAMAGE_PHYS_MOD]=0.15;
+	weapon_mod[DAMAGE_FIRE_MOD]=0.10;
+	weapon_mod[DAMAGE_ICE_MOD]=0.10;
+	weapon_mod[DAMAGE_AIR_MOD]=0.10;
+	weapon_mod[ATTACK_MOD]= 0.1;
+	weapon_mod[POWER_MOD] = 0.1;
+	weapon_mod[DAMAGE_MULT_PHYS_MOD]=0.1;
+
+
+	// Kurzschwert
+	idata = new ItemBasicData;
+
+	idata->m_type = Item::WEAPON;
+	idata->m_subtype = "short_sw";
+	idata->m_size= Item:: MEDIUM;
+
+	idata->m_min_enchant = 30;
+	idata->m_max_enchant= 120;
+	for (int i=0;i<31;i++)
+		idata->m_modchance[i] = weapon_mod[i];
+	idata->m_weapon_attr = new WeaponAttr;
+	idata->m_weapon_attr->m_damage.m_min_damage[Damage::PHYSICAL] = 5;
+	idata->m_weapon_attr->m_damage.m_max_damage[Damage::PHYSICAL] = 10;
+	idata->m_weapon_attr->m_damage.m_attack = 20;
+	idata->m_weapon_attr->m_damage.m_power = 30;
+	idata->m_weapon_attr->m_attack_range = 1.0;
+	idata->m_weapon_attr->m_two_handed = false;
+	idata->m_weapon_attr->m_dattack_speed = 500;
+
+	idata->m_equip_effect = new CreatureBaseAttrMod;
+
+	registerItem(Item::WEAPON,"short_sw",idata);
+
+
+	registerItemDrop(Item::WEAPON,"short_sw",DropChance(0,1,Item::MEDIUM));
+#endif
+
+
+	registerItemDrop(Item::WEAPON,"long_sw",DropChance(10,1,Item::MEDIUM));
+	registerItemDrop(Item::WEAPON,"wood_bow",DropChance(3,1,Item::MEDIUM));
+	registerItemDrop(Item::WEAPON,"long_bow",DropChance(10,1,Item::BIG));
+	registerItemDrop(Item::WEAPON,"battle_axe",DropChance(20,1,Item::BIG));
+	registerItemDrop(Item::WEAPON,"holy_flail",DropChance(10,0.4,Item::BIG));
+
+	registerItemDrop(Item::ARMOR,"leath_arm",DropChance(0,1,Item::BIG));
+	registerItemDrop(Item::ARMOR,"tiled_arm",DropChance(20,1,Item::BIG));
+	registerItemDrop(Item::ARMOR,"heavy_arm",DropChance(40,1,Item::BIG));
+
+
+	registerItemDrop(Item::HELMET,"steel_hlm",DropChance(5,1,Item::MEDIUM));
+
+	registerItemDrop(Item::RING,"ring",DropChance(-1,0.1,Item::SMALL));
+
+
+	registerItemDrop(Item::AMULET,"amulet",DropChance(-1,0.1,Item::SMALL));
+
+	registerItemDrop(Item::SHIELD,"wood_sh",DropChance(0,1,Item::MEDIUM));
+	registerItemDrop(Item::SHIELD,"iron_sh",DropChance(6,1,Item::BIG));
+
+	registerItemDrop(Item::GLOVES,"leath_gl",DropChance(0,1,Item::MEDIUM));
+
+	registerItemDrop(Item::POTION,"heal_1",DropChance(0,1,Item::SMALL));
+	registerItemDrop(Item::ARMOR,"heal_2",DropChance(-10,1,Item::SMALL));
+	registerItemDrop(Item::ARMOR,"heal_bl",DropChance(-1,0.5,Item::SMALL));
+	registerItemDrop(Item::ARMOR,"heal_fr",DropChance(-1,0.5,Item::SMALL));
+
+
+}
+
+ServerItem* ItemFactory::createItem(DropSlot &slot)
+{
+	DEBUG5("get item by dropslot");
+	// wenn maximales Level unter 0 liegt kein Item ausgeben
+	if (slot.m_max_level<0)
+		return 0;
+
+	int size = Random::randDiscrete(slot.m_size_probability,5);
+
+	// kein Item ausgewurfelt
+	if (size ==4)
+		return 0;
+
+	DEBUG("item size: %i",size);
+	ServerItem* item =0;
+	if (size  == Item::GOLD)
+	{
+		return 0;
+		// Gold gedroppt
+		item = new ServerItem;
+		item->m_size = Item::GOLD;
+		item->m_price = Random::randrangei((slot.m_max_level*slot.m_max_level)*5, (slot.m_max_level*slot.m_max_level)*29);
+
+		return item;
+	}
+	else
+	{
+		// *richtiges* Item gedroppt
+
+		// Vector fuer die moeglichen Items
+		vector<Item::Subtype> types;
+
+		// Vector fuer die Wahrscheinlickeit
+		vector<float> prob;
+
+		float p;
+
+		map<Item::Subtype, DropChance>::iterator i;
+		for (i= m_item_probabilities.begin();i!=m_item_probabilities.end();++i)
+		{
+			// Testen ob die Groesse passt
+			if (i->second.m_size != size)
+				continue;
+
+			// Testen ob Level ausreicht
+			if (fabs(i->second.m_level) > slot.m_max_level || i->second.m_level <slot.m_min_level )
+				continue;
+
+			// Wahrscheinlichkeit fuer Drop berechnen
+			p = i->second.m_probability;
+
+			if (p>0)
+			{
+				DEBUG5("possible item subtype %s prob %f",i->first.c_str(),p);
+				types.push_back(i->first);
+				prob.push_back(p);
+
+			}
+
+
+		}
+
+		if (prob.empty())
+			return 0;
+
+		// Item auswuerfeln
+		int res = Random::randDiscrete(prob);
+
+		// Typ, Subtyp bestimmen
+		Item::Subtype subtype= types[res];
+		Item::Type type = m_item_types.find(subtype)->second;
+
+		DEBUG("item type %i  subtype %s",type,subtype.c_str());
+
+		// Magiestaerke berechnen
+		float magic =0;
+		if (Random::random() < slot.m_magic_probability || type == Item::RING  || type == Item::AMULET)
+		{
+			magic = Random::randrangef(slot.m_magic_power/4,slot.m_magic_power);
+			DEBUG("magic power %f",magic);
+		}
+
+		item = createItem(type,subtype,magic);
+		return item;
+	}
+	return 0;
+
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/itemfactory.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,147 @@
+#ifndef ITEMFACTORY_H
+#define ITEMFACTORY_H
+
+
+#include "serveritem.h"
+#include "random.h"
+#include <map>
+#include "dropslot.h"
+#include "itemloader.h"
+
+using namespace std;
+
+
+
+/**
+ * \class ItemFactory
+ * \brief Dieses Objekt erzeugt Objekte vom Typ ServerItem.
+ */
+class ItemFactory
+{
+public:
+
+	enum ItemMod
+	{
+		HEALTH_MOD=0,
+		ARMOR_MOD =1,
+		BLOCK_MOD =2,
+		STRENGTH_MOD =3,
+		DEXTERITY_MOD = 4,
+		MAGIC_POWER_MOD = 5,
+		WILLPOWER_MOD = 6,
+		RESIST_PHYS_MOD = 7,
+		RESIST_FIRE_MOD = 8,
+		RESIST_ICE_MOD = 9,
+		RESIST_AIR_MOD = 10,
+		RESIST_ALL_MOD= 11,
+		DAMAGE_PHYS_MOD= 12,
+		DAMAGE_FIRE_MOD= 13,
+		DAMAGE_ICE_MOD= 14,
+		DAMAGE_AIR_MOD= 15,
+		DAMAGE_MULT_PHYS_MOD = 16,
+		DAMAGE_MULT_FIRE_MOD = 17,
+		DAMAGE_MULT_ICE_MOD = 18,
+		DAMAGE_MULT_AIR_MOD = 19,
+		ATTACK_SPEED_MOD = 20,
+		ATTACK_MOD = 22,
+		POWER_MOD = 23,
+		MAGE_FIRE_SKILLS_MOD = 24,
+		MAGE_ICE_SKILLS_MOD = 25,
+		MAGE_AIR_SKILLS_MOD = 26,
+
+	};
+	/**
+	 * \fn ItemFactory()
+	 * \brief Konstruktor
+	 */
+	ItemFactory();
+
+	/**
+	 * \fn ServerItem* createItem(Item::Type type, Item::Subtype subtype)
+	 * \brief Erzeugt Objekt anhand zweier Parameter
+	 * \param type Typ des Items
+	 * \param subtype Untertyp des Items
+	 * \return Neues ServerItem
+	 */
+	static ServerItem* createItem(Item::Type type, Item::Subtype subtype, float magic_power =0);
+
+	/**
+	 * \fn static void createMagicMods(ServerItem* item, float* modchance, float magic_power, float min_enchant, float max_enchant)
+	 * \brief Belegt einen Gegenstanden mit magischen Attributen
+	 * \param item Gegenstand der die magischen Eigenschaften erhaelt
+	 * \param modchance Array mit Wahrscheinlichkeiten fuer das Auftreten der einzelnen Modifikationen
+	 * \param magic_power Staerke der Verzauberung
+	 * \param min_enchant minimale Starke einer einzelnen Verzauberung
+	 * \param max_enchant maximale Starke einer einzelnen Verzauberung
+	 */
+	static void createMagicMods(ServerItem* item, float* modchance, float magic_power, float min_enchant, float max_enchant);
+
+	/**
+	 * \fn static void registerItem(Item::Subtype subtype, ItemBasicData* data)
+	 * \brief Registriert ein Item
+	 * \param type Typ des Items
+	 * \param subtype Subtype des items
+	 * \param data Daten die zum Erzeugen des Items noetig sind
+	 */
+	static void registerItem(Item::Type type, Item::Subtype subtype, ItemBasicData* data);
+	
+	/**
+	 * \fn static registerItemDrop(Item::Subtype subtype, DropChance chance)
+	 * \brief Registriert ein Item, das gedroppt werden kann
+	 * \param type Typ des Items
+	 * \param subtype Subtyp des Items
+	 * \param chance Chance, das das Item gedroppt wird
+	 */
+	static void registerItemDrop(Item::Type type, Item::Subtype subtype, DropChance chance);
+
+	/**
+	 * \fn static ServerItem* createItem(DropSlot &slot)
+	 * \brief Erzeugt einen Gegenstand anhand eines Dropslots. Wenn kein Item entsteht wird NULL ausgegeben
+	 */
+	static ServerItem* createItem(DropSlot &slot);
+
+	/**
+	 * \fn static void init()
+	 * \brief Registriert die Items
+	 */
+	static void init();
+
+	/*
+	static Item::Type subtypeToType(Item::Subtype subtype)
+	{
+		if (subtype >=1000)
+		{
+			return (Item::Type) (subtype/1000);
+		}
+		else
+		{
+			return Item::WEAPON;
+		}
+	}
+*/
+
+	private:
+		/**
+		* \var static map<Item::Subtype, DropChance> m_item_probabilities
+		 * \brief Gibt fuer jeden Gegenstand die relative Dropchance an
+		 */
+		static map<Item::Subtype, DropChance> m_item_probabilities;
+		
+		/**
+		 * \var static map<Item::Subtype, Item::Type> m_item_types
+		 * \brief Mappt bekannt Subtypen auf den zugehoerigen Typ
+		 */
+		static map<Item::Subtype, Item::Type> m_item_types;
+
+        /**
+         * \var static map<Item::Subtype,ItemBasicData*> m_item_data
+         * \brief enthaelt Basisdaten zu allen Items
+         */
+		static map<Item::Subtype,ItemBasicData*> m_item_data;
+
+
+};
+
+
+#endif //ITEMFACTORY_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/itemlist.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,640 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf
+
+	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.
+*/
+
+#include "itemlist.h"
+
+//Constructors/Destructors
+
+ItemList::ItemList(short max_small, short max_medium, short max_big)
+{
+	m_max_small = max_small;
+	m_max_medium = max_medium;
+	m_max_big = max_big;
+	
+	m_small_items = new Item*[max_small];
+	m_medium_items = new Item*[max_medium];
+	m_big_items = new Item*[max_big];
+	
+	 int i;
+	 for (i=0; i<max_small;i++)
+	 {
+		 m_small_items[i]=0;
+	 }
+	 
+	 for (i=0; i<max_medium;i++)
+	 {
+		 m_medium_items[i]=0;
+	 }
+	 
+	 for (i=0; i<max_big;i++)
+	 {
+		 m_big_items[i]=0;
+	 }
+	 m_gold =0;
+}
+
+ItemList::ItemList(ItemList* itemlist)
+{
+	m_max_small = itemlist->m_max_small;
+	m_max_medium = itemlist->m_max_medium;
+	m_max_big = itemlist->m_max_big;
+	
+	m_small_items = new Item*[m_max_small];
+	
+	m_medium_items = new Item*[m_max_medium];
+	
+	m_big_items = new Item*[m_max_big];
+	
+	int i;
+	for (i=0; i<m_max_small;i++)
+	{
+		m_small_items[i]=itemlist->m_small_items[i];
+	}
+	 
+	for (i=0; i<m_max_medium;i++)
+	{
+		m_medium_items[i]=itemlist->m_medium_items[i];
+	}
+	 
+	for (i=0; i<m_max_big;i++)
+	{
+		m_big_items[i]=itemlist->m_big_items[i];
+	}
+	m_gold =itemlist->m_gold;
+}
+
+
+ItemList::~ItemList()
+{
+	delete[] m_small_items;
+	delete[] m_medium_items;
+	delete[] m_big_items;
+}
+
+void ItemList::clear()
+{
+	int i;
+	for (i=0; i<m_max_small;i++)
+	{
+		if (m_small_items[i]!=0)
+			delete m_small_items[i];
+		m_small_items[i]=0;
+	}
+	 
+	for (i=0; i<m_max_medium;i++)
+	{
+		if (m_medium_items[i])
+		{
+			delete m_medium_items[i];
+		}
+		m_medium_items[i]=0;
+	}
+	 
+	for (i=0; i<m_max_big;i++)
+	{
+		if (m_big_items[i])
+			delete m_big_items[i];
+		m_big_items[i]=0;
+	}
+	m_gold =0;
+}
+
+
+Item* ItemList::getItem(Item::Size m_size, int index)
+{
+	if (m_size == Item::SMALL && index < m_max_small)
+		return m_small_items[index];
+	
+	if (m_size == Item::MEDIUM && index < m_max_medium)
+		return m_medium_items[index];
+	
+	if (m_size == Item::BIG && index < m_max_big)
+		return m_big_items[index];
+	
+	return 0;
+}
+
+int ItemList::getFreePlace(Item::Size m_size)
+{
+	Item** arr = m_small_items;
+	short k = m_max_small;
+	
+	if (m_size == Item::MEDIUM)
+	{
+		arr = m_medium_items;
+		k = m_max_medium;
+	}
+	
+	if (m_size == Item::BIG)
+	{
+		arr = m_big_items;
+		k = m_max_big;
+	}
+	
+	int i;
+	for (i=0;i<k;i++)
+	{
+		if (arr[i]==0)
+			return i;
+	}
+	return -1;
+}
+
+void ItemList::swapItem(Item* &item,Item::Size size, int index)
+{
+	DEBUG5("swapping %p of size %i at %i",item,size,index);
+	Item** arr = m_small_items;
+	short k = m_max_small;
+	
+	if (size == Item::MEDIUM)
+	{
+		arr = m_medium_items;
+		short k = m_max_medium;
+	}
+	
+	if (size == Item::BIG)
+	{
+		arr = m_big_items;
+		short k = m_max_big;
+	}
+	
+	if (index >=k)
+		return;
+	
+	Item* t;
+	t=arr[index];
+	arr[index]=item;
+	item = t;
+}
+
+
+Equipement::Equipement(short max_small, short max_medium, short max_big)
+	: m_inventory(max_big,max_medium,max_small)
+{
+	m_helmet =0;
+	m_armor =0;
+	m_gloves =0;
+	m_weapon=0;
+	m_weapon2=0;
+	m_shield=0;
+	m_shield2=0;
+	m_ring_left=0;
+	m_ring_right=0;
+	m_amulet=0;
+	m_cursor_item=0;
+};
+
+Equipement::~Equipement()
+{
+	clear();
+}
+
+void Equipement::clear()
+{
+	if (m_helmet !=0) 
+	{
+		delete m_helmet;
+		m_helmet=0;
+	}
+	if (m_armor !=0)
+	{
+		delete m_armor;
+		m_armor=0;
+	}
+	if (m_gloves !=0)
+	{
+		delete m_gloves;
+		m_gloves=0;
+	}
+	
+	if (m_weapon!=0)
+	{
+		delete m_weapon;
+		m_weapon=0;
+	}
+	
+	if (m_weapon2!=0)
+	{
+		delete m_weapon2;
+		m_weapon=0;
+	}
+	
+	
+	if (m_shield!=0)
+	{
+		delete m_shield;
+		m_shield=0;
+	}
+	
+	if (m_shield2!=0)
+	{
+		delete m_shield2;
+		m_shield=0;
+	}
+
+	
+	if (m_ring_left!=0)
+	{
+		delete m_ring_left;
+		m_ring_left =0;
+	}
+	if (m_ring_right!=0)
+	{
+		delete m_ring_right;
+		m_ring_right =0;
+	}
+	if (m_amulet!=0)
+	{
+		delete m_amulet;
+		m_amulet =0;
+	}
+	if (m_cursor_item!=0)
+	{
+		delete m_cursor_item;
+		m_cursor_item=0;
+	}
+	DEBUG5("clearing equipement");
+	m_inventory.clear();
+	DEBUG5("done");
+}
+
+Item* Equipement::getItem(int pos)
+{
+	switch (pos)
+	{
+		case ARMOR:
+			return m_armor;
+			
+		case WEAPON:
+			return m_weapon;
+			
+		case WEAPON2:
+			return m_weapon2;
+			
+		case SHIELD:
+			return m_shield;
+			
+		case SHIELD2:
+			return m_shield2;
+			
+		case HELMET:
+			return m_helmet;
+			
+		case GLOVES:
+			return m_gloves;
+			
+		case RING_LEFT:
+			return m_ring_left;
+			
+		case RING_RIGHT:
+			return m_ring_right;
+			
+		case AMULET:
+			return m_amulet;
+			
+		case CURSOR_ITEM:
+			return m_cursor_item;
+	}	
+	
+	if (pos>=BIG_ITEMS && pos < MEDIUM_ITEMS)
+	{
+		return m_inventory.getItem(Item::BIG,pos-BIG_ITEMS);
+	}
+	
+	if (pos>=MEDIUM_ITEMS && pos < SMALL_ITEMS)
+	{
+		return m_inventory.getItem(Item::MEDIUM,pos-MEDIUM_ITEMS);
+	}
+	
+	if (pos>=SMALL_ITEMS)
+	{
+		return m_inventory.getItem(Item::SMALL,pos-SMALL_ITEMS);
+	}
+	
+	return 0;
+	
+}
+
+
+Item* &  Equipement::getItemRef(int pos)
+{
+	switch (pos)
+	{
+		case ARMOR:
+			return m_armor;
+			
+		case WEAPON:
+			return m_weapon;
+			
+		case WEAPON2:
+			return m_weapon2;
+			
+		case SHIELD:
+			return m_shield;
+			
+		case SHIELD2:
+			return m_shield2;
+
+			
+		case HELMET:
+			return m_helmet;
+			
+		case GLOVES:
+			return m_gloves;
+			
+		case RING_LEFT:
+			return m_ring_left;
+			
+		case RING_RIGHT:
+			return m_ring_right;
+			
+		case AMULET:
+			return m_amulet;
+	}	
+	
+	return m_cursor_item;
+}
+
+bool Equipement::swapItem(Item* &item,int pos)
+{
+	DEBUG5("swapping %p at %i",item,pos);
+	if (pos>= ARMOR && pos<=CURSOR_ITEM )
+	{
+		// Tausch mit einem Ausruestungsgegenstand
+		std::swap(item, getItemRef(pos));	
+		return true;
+	}
+	else
+	{
+		// Index berechnen bei dem getauscht werden soll
+		int idx = pos-BIG_ITEMS;
+		Item::Size size= Item::BIG;
+		
+		if (pos>= MEDIUM_ITEMS)
+		{
+			idx = pos - MEDIUM_ITEMS;
+			size = Item::MEDIUM;
+		}
+		if (pos>=SMALL_ITEMS)
+		{	
+			idx = pos - SMALL_ITEMS;
+			size = Item::SMALL;
+		}
+		
+		// Tausch mit Gegenstand im Inventar
+		m_inventory.swapItem(item,size,idx);
+		return true;
+	}		
+}
+
+bool Equipement::swapCursorItem(int pos)
+{
+	return swapItem(m_cursor_item,pos);
+}
+	
+bool  Equipement::insertItem(Item* item)
+{
+	if (item ==0)
+		return true;
+	
+	Item* itm = item;
+	int pos;
+	pos = m_inventory.getFreePlace(item->m_size);
+	DEBUG5("free pos: %i",pos);
+	
+	
+	if (pos ==-1)
+	{
+		return false;
+	}
+	
+	if (item->m_size == Item::SMALL)
+	{
+		swapItem(itm,pos+SMALL_ITEMS);
+	}
+	if (item->m_size == Item::MEDIUM)
+	{
+		swapItem(itm,pos+MEDIUM_ITEMS);
+	}
+	if (item->m_size == Item::BIG)
+	{
+		swapItem(itm,pos+BIG_ITEMS);
+	}
+	
+	return true;
+}
+	
+int Equipement::getNumberItems(bool secondary_equip)
+{
+	int nr =0;
+	if (!secondary_equip)
+	{
+		if (m_weapon)
+			nr++;
+		if (m_shield)
+			nr++;
+	}
+	else
+	{
+		if (m_weapon2)
+			nr++;
+		if (m_shield2)
+			nr++;
+	}
+	if (m_helmet)
+		nr++;
+	if (m_armor)
+		nr++;
+	if (m_amulet)
+		nr++;
+	if (m_ring_left)
+		nr++;
+	if (m_ring_right)
+		nr++;
+	if (m_gloves)
+		nr++;
+	if (m_cursor_item)
+		nr++;
+	
+	int i;
+	for (i=0;i<m_inventory.getMaxBig();i++)
+	{
+		if (m_inventory.getItem(Item::BIG,i))
+			nr++;
+	}
+	
+	for (i=0;i<m_inventory.getMaxMedium();i++)
+	{
+		if (m_inventory.getItem(Item::MEDIUM,i))
+			nr++;
+	}
+	
+	for (i=0;i<m_inventory.getMaxSmall();i++)
+	{
+		if (m_inventory.getItem(Item::SMALL,i))
+			nr++;
+	}
+	
+	
+	
+	return nr;
+}
+	
+void Equipement::toString(CharConv* cv, int & nr, bool secondary_equip)
+{
+
+	nr=0;
+	// Ausruestungsgegenstaende
+	if (m_armor)
+	{
+		m_armor->toString(cv,ARMOR);
+		nr++;
+	}
+	
+	Item* weapon = m_weapon;
+	if (secondary_equip)
+	{
+		weapon = m_weapon2;
+	}
+	if (weapon)
+	{
+		weapon->toString(cv,WEAPON);
+		nr++;
+	}
+	
+	if (m_helmet)
+	{
+		 m_helmet->toString(cv,HELMET);
+		nr++;
+	}
+	
+	Item* shield = m_shield;
+	if (secondary_equip)
+	{
+		shield = m_shield2;
+	}
+	if (shield)
+	{
+		shield->toString(cv,SHIELD);
+		nr++;
+	}
+	
+	if (m_gloves)
+	{
+		m_gloves->toString(cv,GLOVES);
+		nr++;
+	}
+	
+	if (m_ring_left)
+	{
+		m_ring_left->toString(cv,RING_LEFT);
+		nr++;
+	}
+	
+	if (m_ring_right)
+	{
+		 m_ring_right->toString(cv,RING_RIGHT);
+		nr++;
+	}
+	
+	if (m_amulet)
+	{
+		 m_amulet->toString(cv,AMULET);
+		nr++;
+	}
+	
+	if (m_cursor_item)
+	{
+		m_cursor_item->toString(cv,CURSOR_ITEM);
+		nr++;
+	}
+	
+	
+	int i;
+	
+	// grosse Items
+	Item* it;
+	for (i=0;i<m_inventory.getMaxBig();i++)
+	{
+		it = m_inventory.getItem(Item::BIG,i);
+		if (it!=0)
+		{
+			it->toString(cv,BIG_ITEMS+i);
+			nr++;
+		}
+	}
+	
+	// mittlere Items
+	for (i=0;i<m_inventory.getMaxMedium();i++)
+	{
+		it = m_inventory.getItem(Item::MEDIUM,i);
+		if (it!=0)
+		{
+			it->toString(cv,MEDIUM_ITEMS+i);
+			nr++;
+		}
+	}
+	
+	// grosse Items
+	for (i=0;i<m_inventory.getMaxSmall();i++)
+	{
+		it = m_inventory.getItem(Item::SMALL,i);
+		if (it!=0)
+		{
+			it->toString(cv,SMALL_ITEMS+i);
+			nr++;
+		}
+	}
+	
+	
+
+}
+
+void Equipement::fromString(CharConv* cv, int nr)
+{	
+
+	
+	int i;
+	short pos;
+	Item* it;
+	for (i=0;i<nr;i++)
+	{
+		it = new Item;
+		// Datenfelder des Items belegen
+		it->fromString(cv,pos);
+		
+		DEBUG5("creating item %p",it);
+		
+		// Item ins Inventar tauschen
+		swapItem(it,pos);
+	}
+	
+	
+
+}
+
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/itemlist.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,396 @@
+/*
+	Summoning Wars
+	Copyright (C) 2007 Hans Wulf
+
+	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.
+*/
+/**
+ * \file itemlist.h
+ * \defgroup itemlist \ Gegenstandsliste
+ * \brief Verwaltet listenartig Gegenst&auml;nde
+ * \author Hans Wulf
+ * \version 1.0
+ * \date 2007/05/28
+ * \note Beinhaltet die Klasse ItemList
+ */
+
+#ifndef ITEMLIST_H
+#define ITEMLIST_H
+
+#include <string>
+#include <cstdlib>
+#include <algorithm>
+#include "debug.h"
+
+#include "item.h"
+
+using namespace std;
+
+/**
+ * \class ItemList
+ *
+ * \brief Klasse fuer eine Liste von Gegenstaenden
+ */
+class ItemList {
+//Public stuff
+public:
+	//Fields
+	//Constructors
+   /**
+	 * \fn ItemList()
+	 * \brief Konstruktor
+	 *
+	 * Legt ein neues ItemList Objekt an
+	 * \param max_small maximale Anzahl kleiner Objekte in der Liste
+	 * \param max_medium maximale Anzahl mittelgroßer Objekte in der Liste
+	 * \param max_big maximale Anzahl großer Objekte in der Liste
+	 */
+	ItemList(short max_small, short max_medium, short max_big);
+
+	/**
+	 * \fn ItemList(Itemlist* itemlist)
+	 * \brief Kopierkonstruktor, legt eine flache Kopie an, die referenzierten Items sind also die gleichen!
+	 * \param itemlist Kopiervorlage
+	 */
+	ItemList(ItemList* itemlist);
+
+   /**
+	 * \fn ~ItemList()
+	 * \brief Destruktor
+	 *
+	 * Löscht das ItemList Objekt
+	 */
+	~ItemList();
+
+	/**
+	 * \fn void clear()
+	 * \brief Loescht alle enthaltenen Items
+	 */
+	void clear();
+
+
+	/**
+	 * \fn Item* getItem(char m_size, int index)
+	 * \brief Gibt einen Zeiger auf das Item der Groesse m_size an der Position index zurueck. Gibt NULL zurueck, wenn der Index die Listengroesse ueberschreitet.
+	 * \param m_size Groesse des Items
+	 * \param indes Index
+	 */
+	Item* getItem(Item::Size m_size, int index);
+
+	/**
+	 * \fn int getFreePlace(char m_size)
+	 * \brief Gibt den Indes  des ersten freien Platzes fuer ein Item der angegebenen Groesse aus.
+	 * \param m_size Groesse des Items
+	 * \return Index fuer einen freien Platz
+	 */
+	int getFreePlace(Item::Size m_size);
+
+	/**
+	 * \fn void swapItem(Item* item, int index)
+	 * \brief vertauscht den angegebene Gegenstand mit dem gleichgrossen an Position index. Ein Gegenstand wird aus der Liste entfernt, indem man ihn mit einem leeren Gegenstand austauscht. Ein Gegenstand wird in die Liste eingefuegt, indem man einen leeren Platz der richtigen Groesse sucht und damit austauscht.
+	 * \param item Zeiger auf den zu tauschenden Gegenstand
+	 * \param index Position des Gegenstandes in der Liste, mit dem getauscht werden soll
+	 */
+	void swapItem(Item* &item,Item::Size size, int index);
+
+	/**
+	 * \fn short getMaxSmall()
+	 * \brief Gibt maximale Anzahl kleiner Gegenstaende aus
+	 */
+	short getMaxSmall()
+	{
+		return m_max_small;
+	}
+
+	/**
+	 * \fn short getMaxMedium()
+	 * \brief Gibt maximale Anzahl mittlere Gegenstaende aus
+	 */
+	short getMaxMedium()
+	{
+		return m_max_medium;
+	}
+
+	/**
+	 * \fn short getMaxBig()
+	 * \brief Gibt maximale Anzahl grosser Gegenstaende aus
+	 */
+	short getMaxBig()
+	{
+		return m_max_big;
+	}
+
+	/**
+	 * \fn int getGold()
+	 * \brief Gibt die Menge Gold aus
+	 * \return Gold
+	 */
+	int getGold()
+	{
+		return m_gold;
+	}
+
+	/**
+	 * \fn void setGold(int gold)
+	 * \brief Setzt die Menge Gold
+	 * \param gold Gold
+	 */
+	void setGold(int gold)
+	{
+		m_gold = gold;
+	}
+
+
+//Private stuff
+private:
+	//Fields
+
+	/**
+	 * \var m_max_small
+	 * \brief Gibt die maximale Anzahl kleiner Gegenstaende in der Liste an
+	 */
+	short m_max_small;
+
+	/**
+	 * \var m_max_medium
+	 * \brief Gibt die maximale Anzahl mittelgrosser Gegenstaende in der Liste an
+	 */
+	short m_max_medium;
+
+	/**
+	 * \var m_max_big
+	 * \brief Gibt die maximale Anzahl grosser Gegenstaende in der Liste an
+	 */
+	short m_max_big;
+
+
+	/**
+	 * \var m_small_items;
+	 * \brief Liste der kleinen Gegenst&auml;nde
+	 */
+	Item**  m_small_items;
+
+	/**
+	 * \var m_medium_items;
+	 * \brief Liste der mittelgrossen Gegenst&auml;nde
+	 */
+	Item**  m_medium_items;
+
+	/**
+	 * \var m_big_items;
+	 * \brief Liste der kleinen Gegenst&auml;nde
+	 */
+	Item**  m_big_items;
+
+	/**
+	 * \var m_gold
+	 * \brief Menge des Goldes
+	 */
+	int m_gold;
+
+
+};
+
+
+/**
+ * \class Equipement
+ * \brief Klasse fuer die Ausruestung eines Spielers
+ */
+class Equipement
+{
+	public:
+
+	/**
+	 * \enum Position
+	 * \brief Zaehlt Positionen auf, an denen sich ein Gegenstand im Inventar eines Spielers befinden kann
+	 */
+	enum Position
+	{
+		NONE = 0,
+		ARMOR  =1,
+		HELMET =2,
+		GLOVES =3,
+		WEAPON =4,
+		SHIELD =5,
+		RING_LEFT=6,
+		RING_RIGHT =7,
+		AMULET= 8,
+		WEAPON2=9,
+		SHIELD2=10,
+		CURSOR_ITEM=11,
+		BIG_ITEMS=20,
+		MEDIUM_ITEMS=30,
+		SMALL_ITEMS = 60
+	};
+
+	/**
+	 * \fn Equipement()
+	 * \brief Konstruktor
+	 */
+	Equipement(short max_small, short max_medium, short max_big);
+
+	/**
+	 * \fn ~Equipement()
+	 * Destruktor
+	 */
+	virtual ~Equipement();
+
+	/**
+	 * \fn Item* getItem(int pos)
+	 * \param pos Position des Items
+	 * \brief Gibt Item an der angegebenen Position aus
+	 */
+	Item* getItem(int pos);
+
+	/**
+	 * \fn bool insertItem(Item* item)
+	 * \brief Fuegt Gegenstand ins Inventar ein
+	 * \param item Zeiger auf den Gegenstand
+	 * \return Gibt an ob das Item aufgenommen werden konnte
+	 */
+	bool insertItem(Item* item);
+	
+	/**
+	 * \fn bool swapCursorItem(int pos)
+	 * \param pos Position des Items
+	 * \brief Tauscht das aktuelle Cursoritem mit dem an der angegebenen Position
+	 */
+	bool swapCursorItem(int pos);
+
+	/**
+	 * \fn bool swapItem(Item* &item, int pos)
+	 * \param pos Position des Items
+	 * \param Item Zeiger auf das Item das getauscht wird. Nach beenden der Funktion Zeiger auf das Item das aus dem Inventar herrausgetauscht wurde
+	 * \brief Tauscht das angegebene Item mit dem an der angegebenen Position
+	 */
+	bool swapItem(Item* &item, int pos);
+
+	
+	/**
+	 * \fn int getNumberItems(bool secondary_equip)
+	 * \brief Gibt aus die Anzahl der Gegenstaende in der Ausruestung zurueck
+	 */
+	int getNumberItems(bool secondary_equip);
+	
+	/**
+	 * \fn virtual void toString(CharConv* cv,int& nr, bool secondary_equip)
+	 * \brief Konvertiert das Objekt in einen String und schreibt ihn in der Puffer
+	 * \param buf Ausgabepuffer
+	 * \param nr Anzahl der Items
+	 * \param secondary_equip Wenn true, wird die zweite Ausruestung geschrieben
+	 * \return Zeiger hinter den beschriebenen Datenbereich
+	 */
+	virtual void toString(CharConv* cv,int& nr, bool secondary_equip);
+
+
+	/**
+	 * \fn virtual void fromString(CharConv* cv,int nr)
+	 * \brief Erzeugt das Objekt aus einem String
+	 * \param buf Objekt als String
+	 * \param nr Anzahl der Items
+	 * \return Zeiger hinter den gelesenen Datenbereich
+	 */
+	virtual void fromString(CharConv* cv,int nr);
+
+	/**
+	 * \fn void clear()
+	 * \brief Loescht alle enthaltenen Item
+	 */
+	void clear();
+
+	private:
+
+	/**
+	 * \var Item* m_helmet
+	 * \brief Helm
+	 */
+	Item* m_helmet;
+
+	/**
+	 * \var Item* m_armor
+	 * \brief Verwendete Ruestung
+	 */
+	Item* m_armor;
+
+	/**
+	 * \var Item* m_weapon
+	 * \brief Verwendete Waffe
+	 */
+	Item* m_weapon;
+
+	/**
+	 * \var Item* m_weapon2
+	 * \brief sekundaere Waffe
+	 */
+	Item* m_weapon2;
+
+	/**
+	 * \var Item* m_shield
+	 * \brief Verwendeter Schild
+	 */
+	Item* m_shield;
+
+	/**
+	 * \var Item* m_shield2
+	 * \brief Sekundaerer Schild
+	 */
+	Item* m_shield2;
+
+	/**
+	 * \var Item* m_gloves
+	 * \brief Verwendete Handschuhe
+	 */
+	Item* m_gloves;
+
+	/**
+	 * \var Item* m_ring_left
+	 * \brief Ring linke Hand
+	 */
+	Item* m_ring_left;
+
+	/**
+	 * \var Item* m_ring_right
+	 * \brief Ring rechte Hand
+	 */
+	Item* m_ring_right;
+
+	/**
+	 * \var Item* m_amulet
+	 * \brief verwendetes Amulett
+	 */
+	Item* m_amulet;
+
+	/**
+	 * \var  Item* m_cursor_item
+	 * \brief Item, das aktuell mit dem Cursor gehalten wird
+	 */
+	Item* m_cursor_item;
+
+	/**
+	 * \var ItemList m_inventory
+	 * \brief das Inventar
+	 */
+	ItemList m_inventory;
+
+
+	/**
+	 * \fn Item* getItemRef(int pos)
+	 * \param pos Position des Items
+	 * \brief Gibt Item an der angegebenen Position aus
+	 */
+		Item* & getItemRef(int pos);
+};
+
+#endif //ITEMLIST_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/itemloader.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,412 @@
+#include "itemloader.h"
+
+int ItemLoader::generateItemBasicData(TiXmlElement* pElement, string element)
+{
+	if ( !pElement ) return 0;
+	
+	TiXmlAttribute* pAttrib=pElement->FirstAttribute();
+	int i=0;
+	int ival;
+	double dval;
+	
+	if (element == "Item" && pAttrib)
+	{
+		if (m_item_data == 0)
+		{
+			m_item_data = new ItemBasicData;
+			//Folgendes wird schon im Konstruktor von ItemBasicData gesetzt
+			//m_item_data->m_useup_effect = 0;
+			//m_item_data->m_equip_effect = 0;
+			//m_item_data->m_weapon_attr = 0;
+			for (int i=0; i<31; i++)
+				m_item_data->m_modchance[i] = m_weapon_mod[i];
+		}
+		
+		while (element == "Item" && pAttrib)
+		{
+			if (!strcmp(pAttrib->Name(), "type"))
+			{
+				if (!strcmp(pAttrib->Value(), "armor"))
+					m_item_data->m_type = Item::ARMOR;
+				else if (!strcmp(pAttrib->Value(), "helmet"))
+					m_item_data->m_type = Item::HELMET;
+				else if (!strcmp(pAttrib->Value(), "gloves"))
+					m_item_data->m_type = Item::GLOVES;
+				else if (!strcmp(pAttrib->Value(), "weapon"))
+					m_item_data->m_type = Item::WEAPON;
+				else if (!strcmp(pAttrib->Value(), "shield"))
+					m_item_data->m_type = Item::SHIELD;
+				else if (!strcmp(pAttrib->Value(), "potion"))
+					m_item_data->m_type = Item::POTION;
+				else if (!strcmp(pAttrib->Value(), "ring"))
+					m_item_data->m_type = Item::RING;
+				else if (!strcmp(pAttrib->Value(), "amulet"))
+					m_item_data->m_type = Item::AMULET;
+				else if (!strcmp(pAttrib->Value(), "gold_type"))
+					m_item_data->m_type = Item::GOLD_TYPE;
+			}
+			else if (!strcmp(pAttrib->Name(), "subtype"))
+			{
+				m_item_data->m_subtype = pAttrib->Value();
+			}
+			else if (!strcmp(pAttrib->Name(), "size"))
+			{
+				if (!strcmp(pAttrib->Value(), "gold"))
+					m_item_data->m_size = Item::GOLD;
+				else if (!strcmp(pAttrib->Value(), "small"))
+					m_item_data->m_size = Item::SMALL;
+				else if (!strcmp(pAttrib->Value(), "medium"))
+					m_item_data->m_size = Item::MEDIUM;
+				else if (!strcmp(pAttrib->Value(), "big"))
+					m_item_data->m_size = Item::BIG;
+			}
+			
+			i++;
+			pAttrib=pAttrib->Next();
+		}
+	}
+	
+	if (element == "UseupEffect" && pAttrib)
+	{
+		if (m_item_data->m_useup_effect == 0)
+			m_item_data->m_useup_effect = new CreatureDynAttrMod;
+		
+		while (element == "UseupEffect" && pAttrib)
+		{
+			i++;
+			pAttrib=pAttrib->Next();
+		}
+	}
+	
+	if (element == "EquipEffect" /*&& pAttrib*/)
+	{
+		if (m_item_data->m_equip_effect == 0)
+			m_item_data->m_equip_effect = new CreatureBaseAttrMod;
+		
+		while (element == "EquipEffect" && pAttrib)
+		{
+			i++;
+			pAttrib=pAttrib->Next();
+		}
+	}
+	
+	if (element == "WeaponAttribute" && pAttrib)
+	{
+		if (m_item_data->m_weapon_attr == 0)
+			m_item_data->m_weapon_attr = new WeaponAttr;
+		
+		while (element == "WeaponAttribute" && pAttrib)
+		{
+			if (!strcmp(pAttrib->Name(), "damage_min_physical") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+				m_item_data->m_weapon_attr->m_damage.m_min_damage[Damage::PHYSICAL] = static_cast<float>(dval);
+			else if (!strcmp(pAttrib->Name(), "damage_max_physical") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+				m_item_data->m_weapon_attr->m_damage.m_max_damage[Damage::PHYSICAL] = static_cast<float>(dval);
+			else if (!strcmp(pAttrib->Name(), "damage_min_air") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+				m_item_data->m_weapon_attr->m_damage.m_min_damage[Damage::AIR] = static_cast<float>(dval);
+			else if (!strcmp(pAttrib->Name(), "damage_max_air") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+				m_item_data->m_weapon_attr->m_damage.m_max_damage[Damage::AIR] = static_cast<float>(dval);
+			else if (!strcmp(pAttrib->Name(), "damage_min_ice") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+				m_item_data->m_weapon_attr->m_damage.m_min_damage[Damage::ICE] = static_cast<float>(dval);
+			else if (!strcmp(pAttrib->Name(), "damage_max_ice") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+				m_item_data->m_weapon_attr->m_damage.m_max_damage[Damage::ICE] = static_cast<float>(dval);
+			else if (!strcmp(pAttrib->Name(), "damage_min_fire") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+				m_item_data->m_weapon_attr->m_damage.m_min_damage[Damage::FIRE] = static_cast<float>(dval);
+			else if (!strcmp(pAttrib->Name(), "damage_max_fire") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+				m_item_data->m_weapon_attr->m_damage.m_max_damage[Damage::FIRE] = static_cast<float>(dval);
+			else if (!strcmp(pAttrib->Name(), "damage_attack") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+				m_item_data->m_weapon_attr->m_damage.m_attack = static_cast<float>(dval);
+			else if (!strcmp(pAttrib->Name(), "damage_power") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+				m_item_data->m_weapon_attr->m_damage.m_power = static_cast<float>(dval);
+			else if (!strcmp(pAttrib->Name(), "attack_range") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+				m_item_data->m_weapon_attr->m_attack_range = static_cast<float>(dval);
+			else if (!strcmp(pAttrib->Name(), "two_handed"))
+			{
+				if (!strcmp(pAttrib->Value(), "yes"))
+					m_item_data->m_weapon_attr->m_two_handed = true;
+				else
+					m_item_data->m_weapon_attr->m_two_handed = false;
+			}
+			else if (!strcmp(pAttrib->Name(), "dattack_speed") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_item_data->m_weapon_attr->m_dattack_speed = static_cast<short>(ival);
+			
+			i++;
+			pAttrib=pAttrib->Next();
+		}
+	}
+	
+	if (element == "Attribute" && pAttrib)
+	{
+	
+		while (element == "Attribute" && pAttrib)
+		{
+			if (!strcmp(pAttrib->Name(), "level_requirement") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_item_data->m_level_req = static_cast<char>(ival);
+			else if (!strcmp(pAttrib->Name(), "character_requirement") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_item_data->m_char_req = static_cast<char>(ival);
+			else if (!strcmp(pAttrib->Name(), "price") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_item_data->m_price = ival;
+			else if (!strcmp(pAttrib->Name(), "min_enchant") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+			{
+				m_item_data->m_min_enchant = static_cast<float>(dval);
+			}
+			else if (!strcmp(pAttrib->Name(), "max_enchant") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+			{
+				m_item_data->m_max_enchant = static_cast<float>(dval);
+			}
+			
+			i++;
+			pAttrib=pAttrib->Next();
+		}
+	}
+	
+	return i;
+}
+
+
+void ItemLoader::searchItemBasicData(TiXmlNode* pParent)
+{
+	if ( !pParent ) return;
+	
+	TiXmlNode* pChild;
+	TiXmlText* pText;
+	
+	int t = pParent->Type();
+	int num;
+	
+	switch ( t )
+	{
+	case TiXmlNode::ELEMENT:
+		//printf( "Element [%s]", pParent->Value() );
+		num = generateItemBasicData(pParent->ToElement(), pParent->Value());
+		/*switch(num)
+		{
+			case 0:  printf( " (No attributes)"); break;
+			case 1:  printf( "%s1 attribute", getIndentAlt(indent)); break;
+			default: printf( "%s%d attributes", getIndentAlt(indent), num); break;
+		}*/
+		break;
+	/*
+	case TiXmlNode::TEXT:
+		pText = pParent->ToText();
+		printf( "Text: [%s]", pText->Value() );
+		break;
+	*/
+	default:
+		break;
+	}
+	
+	for ( pChild = pParent->FirstChild(); pChild != 0; pChild = pChild->NextSibling())
+	{
+		searchItemBasicData(pChild);
+		
+		if ( !strcmp(pChild->Value(), "Item") && pChild->Type() == TiXmlNode::ELEMENT)
+		{
+			m_item_list->push_back(m_item_data);
+			m_item_data = 0;
+			DEBUG("Item loaded");
+		}
+	}
+}
+
+
+list<ItemBasicData*>* ItemLoader::loadItemBasicData(const char* pFilename)
+{
+	// Standard Modifikator Verteilung fuer Waffen
+	for (int i=0; i<31; i++)
+	{
+		m_weapon_mod[i] = 0;
+	}
+	m_weapon_mod[ItemFactory::DEXTERITY_MOD] = 0.1;
+	m_weapon_mod[ItemFactory::MAGIC_POWER_MOD] = 0.05;
+	m_weapon_mod[ItemFactory::STRENGTH_MOD] = 0.1;
+	m_weapon_mod[ItemFactory::DAMAGE_PHYS_MOD] = 0.15;
+	m_weapon_mod[ItemFactory::DAMAGE_FIRE_MOD] = 0.10;
+	m_weapon_mod[ItemFactory::DAMAGE_ICE_MOD] = 0.10;
+	m_weapon_mod[ItemFactory::DAMAGE_AIR_MOD] = 0.10;
+	m_weapon_mod[ItemFactory::ATTACK_MOD] = 0.1;
+	m_weapon_mod[ItemFactory::POWER_MOD] = 0.1;
+	m_weapon_mod[ItemFactory::DAMAGE_MULT_PHYS_MOD] = 0.1;
+	
+	m_item_data = 0;
+	m_item_list = new list<ItemBasicData*>;
+	
+	TiXmlDocument doc(pFilename);
+	bool loadOkay = doc.LoadFile();
+	
+	if (loadOkay)
+	{
+		DEBUG("Loading %s", pFilename);
+		searchItemBasicData(&doc);
+		DEBUG("Loading %s finished", pFilename);
+		return m_item_list;
+	}
+	else
+	{
+		DEBUG("Failed to load file %s", pFilename);
+		return 0;
+	}
+}
+
+//##############################################################################
+
+int ItemLoader::generateDropChanceData(TiXmlElement* pElement, string element)
+{
+	if ( !pElement ) return 0;
+	
+	TiXmlAttribute* pAttrib=pElement->FirstAttribute();
+	int i=0;
+	int ival;
+	double dval;
+	
+	if (element == "Item" && pAttrib)
+	{
+		if (m_item_data == 0)
+		{
+			m_drop_chance_data = new DropChanceData;
+		}
+		
+		while (element == "Item" && pAttrib)
+		{
+			if (!strcmp(pAttrib->Name(), "type"))
+			{
+				if (!strcmp(pAttrib->Value(), "armor"))
+					m_drop_chance_data->m_type = Item::ARMOR;
+				else if (!strcmp(pAttrib->Value(), "helmet"))
+					m_drop_chance_data->m_type = Item::HELMET;
+				else if (!strcmp(pAttrib->Value(), "gloves"))
+					m_drop_chance_data->m_type = Item::GLOVES;
+				else if (!strcmp(pAttrib->Value(), "weapon"))
+					m_drop_chance_data->m_type = Item::WEAPON;
+				else if (!strcmp(pAttrib->Value(), "shield"))
+					m_drop_chance_data->m_type = Item::SHIELD;
+				else if (!strcmp(pAttrib->Value(), "potion"))
+					m_drop_chance_data->m_type = Item::POTION;
+				else if (!strcmp(pAttrib->Value(), "ring"))
+					m_drop_chance_data->m_type = Item::RING;
+				else if (!strcmp(pAttrib->Value(), "amulet"))
+					m_drop_chance_data->m_type = Item::AMULET;
+				else if (!strcmp(pAttrib->Value(), "gold_type"))
+					m_drop_chance_data->m_type = Item::GOLD_TYPE;
+			}
+			else if (!strcmp(pAttrib->Name(), "subtype"))
+			{
+				m_drop_chance_data->m_subtype = pAttrib->Value();
+			}
+			else if (!strcmp(pAttrib->Name(), "size"))
+			{
+				if (!strcmp(pAttrib->Value(), "gold"))
+					m_drop_chance_data->m_size = Item::GOLD;
+				else if (!strcmp(pAttrib->Value(), "small"))
+					m_drop_chance_data->m_size = Item::SMALL;
+				else if (!strcmp(pAttrib->Value(), "medium"))
+					m_drop_chance_data->m_size = Item::MEDIUM;
+				else if (!strcmp(pAttrib->Value(), "big"))
+					m_drop_chance_data->m_size = Item::BIG;
+			}
+			
+			i++;
+			pAttrib=pAttrib->Next();
+		}
+	}
+	
+	if (element == "DropChance" && pAttrib)
+	{
+		while (element == "DropChance" && pAttrib)
+		{
+			if (!strcmp(pAttrib->Name(), "level") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_drop_chance_data->m_level = ival;
+			else if (!strcmp(pAttrib->Name(), "probability") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+				m_drop_chance_data->m_probability = static_cast<float>(dval);
+			
+			i++;
+			pAttrib=pAttrib->Next();
+		}
+	}
+	
+	return i;
+}
+
+
+void ItemLoader::searchDropChanceData(TiXmlNode* pParent)
+{
+	if ( !pParent ) return;
+	
+	TiXmlNode* pChild;
+	TiXmlText* pText;
+	
+	int t = pParent->Type();
+	int num;
+	
+	switch ( t )
+	{
+	case TiXmlNode::ELEMENT:
+		//printf( "Element [%s]", pParent->Value() );
+		num = generateDropChanceData(pParent->ToElement(), pParent->Value());
+		/*switch(num)
+		{
+			case 0:  printf( " (No attributes)"); break;
+			case 1:  printf( "%s1 attribute", getIndentAlt(indent)); break;
+			default: printf( "%s%d attributes", getIndentAlt(indent), num); break;
+		}*/
+		break;
+	/*
+	case TiXmlNode::TEXT:
+		pText = pParent->ToText();
+		printf( "Text: [%s]", pText->Value() );
+		break;
+	*/
+	default:
+		break;
+	}
+	
+	for ( pChild = pParent->FirstChild(); pChild != 0; pChild = pChild->NextSibling())
+	{
+		searchDropChanceData(pChild);
+		
+		if ( !strcmp(pChild->Value(), "Item") && pChild->Type() == TiXmlNode::ELEMENT)
+		{
+			m_drop_chance_data_list->push_back(m_drop_chance_data);
+			m_drop_chance_data = 0;
+			DEBUG("DropChance loaded");
+		}
+	}
+}
+
+
+list<DropChanceData*>* ItemLoader::loadDropChanceData(const char* pFilename)
+{
+	m_drop_chance_data = 0;
+	m_drop_chance_data_list = new list<DropChanceData*>;
+	
+	TiXmlDocument doc(pFilename);
+	bool loadOkay = doc.LoadFile();
+	
+	if (loadOkay)
+	{
+		DEBUG("Loading %s", pFilename);
+		searchDropChanceData(&doc);
+		DEBUG("Loading %s finished", pFilename);
+		return m_drop_chance_data_list;
+	}
+	else
+	{
+		DEBUG("Failed to load file %s", pFilename);
+		return 0;
+	}
+}
+
+
+
+
+
+
+ItemLoader::~ItemLoader()
+{
+	for (list<DropChanceData*>::iterator iter = m_drop_chance_data_list->begin(); iter != m_drop_chance_data_list->end(); iter++)
+	{
+		delete (*iter);
+	}
+	delete m_drop_chance_data_list;
+	m_drop_chance_data_list = 0;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/itemloader.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,134 @@
+#ifndef ITEMLOADER_H
+#define ITEMLOADER_H
+
+#include "serveritem.h"
+#include "itemfactory.h"
+#include <map>
+#include "dropslot.h"
+#include <list>
+
+#include "../tinyxml/tinyxml.h"
+#include <string>
+#include <cstring>
+using namespace std;
+
+/**
+ * \struct ItemMeshData
+ * \brief Enthaelt die Daten, die zum Laden des Meshs fuer einen Gegenstand notwendig sind
+ */
+struct ItemMeshData
+{
+	/**
+	 * \var string m_subtype
+	 * \brief Subtyp des Gegenstandes
+	 */
+	string m_subtype;
+	
+	/**
+	 * \var string m_mesh
+	 * \brief Name des Meshes
+	 */
+	string m_mesh;
+};
+
+/**
+ * \struct DropChanceData
+ * \brief Enthaelt die Daten fuer die Einstellung der DropChance
+ */
+struct DropChanceData
+{
+	int m_level;
+	float m_probability;
+	Item::Size m_size;
+	string m_subtype;
+	Item::Type m_type;
+};
+
+
+/**
+ * \class ItemLoader
+ * \brief Laedt Items aus einer XML-Datei
+ */
+class ItemLoader
+{
+	public:
+	
+	/**
+	 * \fn ~ItemLoader()
+	 * \brief Destruktor
+	 */
+	~ItemLoader();
+	
+	/**
+	 * \fn void loadItemBasicData(const char* pFilename)
+	 * \brief Sorgt fuer das Anlegen von Items, die in einer XML-Datei gespeichert sind
+	 * \param pFilename Pfad zu einer XML-Datei, die Items enthaelt
+	 * \return Liste der geladenen Items
+	 */
+	list<ItemBasicData*>* loadItemBasicData(const char* pFilename);
+	
+	list<DropChanceData*>* loadDropChanceData(const char* pFilename);
+	
+	/**
+	 * \fn void loadItemMeshData(const char* pFilename)
+	 * \brief Sorgt fuer das Anlegen von ItemMeshData, die in einer XML-Datei gespeichert sind
+	 * \param pFilename Pfad zu einer XML-Datei, die Items enthaelt
+	 * \return Liste der geladenen Items
+	 */
+	list<ItemMeshData*>* loadItemMeshData(const char* pFilename);
+	
+	
+	private:
+	
+	/**
+	 * \fn int generateItemBasicData(TiXmlElement* pElement, string element)
+	 * \brief Legt Items im Speicher anhand von Daten an, die als Parameter uebergeben wurden. Diese Daten stammen aus einer XML-Datei.
+	 * \param pElement Zeiger auf ein Element der XML-Datei
+	 * \param element Name des Elements
+	 * \return Anzahl der Attribute des bearbeiteten Elements
+	 */
+	int generateItemBasicData(TiXmlElement* pElement, string element);
+	
+	int generateDropChanceData(TiXmlElement* pElement, string element);
+	
+	/**
+	 * \fn int generateItemMeshData(TiXmlElement* pElement, string element)
+	 * \brief Legt ItemMeshData im Speicher anhand von Daten an, die als Parameter uebergeben wurden. Diese Daten stammen aus einer XML-Datei.
+	 * \param pElement Zeiger auf ein Element der XML-Datei
+	 * \param element Name des Elements
+	 * \return Anzahl der Attribute des bearbeiteten Elements
+	 */
+	int generateItemMeshData(TiXmlElement* pElement, string element);
+	
+	/**
+	 * \fn void searchItemBasicData( TiXmlNode* pParent )
+	 * \brief Durchmustert eine XML-Datei und sucht nach Elementen.
+	 * \param pParent Zeiger auf eine XML-Datei
+	 */
+	void searchItemBasicData(TiXmlNode* pParent);
+	
+	void searchDropChanceData(TiXmlNode* pParent);
+	
+	/**
+	 * \fn void searchItemMeshData( TiXmlNode* pParent )
+	 * \brief Durchmustert eine XML-Datei und sucht nach Elementen.
+	 * \param pParent Zeiger auf eine XML-Datei
+	 */
+	void searchItemMeshData(TiXmlNode* pParent);
+	
+	
+	ItemBasicData* m_item_data;
+	list<ItemBasicData*>* m_item_list;
+	
+	DropChanceData* m_drop_chance_data;
+	list<DropChanceData*>* m_drop_chance_data_list;
+	
+	//ItemMeshData* m_item_data;
+	//list<ItemMeshData*>* m_item_list;
+	
+	float m_weapon_mod[31];
+};
+
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/mage.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,109 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf
+
+	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.
+*/
+
+#include <string>
+#include "mage.h"
+
+Mage::Mage(World* world, int id) : Player(world, id)
+{
+	bool tmp = init();
+}
+	
+
+
+Mage::~Mage()
+{
+}
+
+bool Mage::init ()
+{
+	// Attribute auf Basiswerte setzen
+	getTypeInfo()->m_subtype = "mage";
+
+	CreatureBaseAttr* bas = getBaseAttr();
+	CreatureDynAttr* dyn = getDynAttr();
+	
+	
+	dyn->m_experience=0;
+	dyn->m_health = 100;
+	
+	bas->m_max_experience = 100;
+	bas->m_level =60;
+	bas->m_max_health = 100;
+	bas->m_armor = 15;
+	bas->m_block=0;
+	bas->m_attack = 10;
+	bas->m_strength = 15;
+	bas->m_dexterity = 15;
+	bas->m_magic_power = 45;
+	bas->m_willpower = 25;
+	bas->m_resistances[0] =0;
+	bas->m_resistances[1] =0;
+	bas->m_resistances[2] =0;
+	bas->m_resistances[3] =0;
+	bas->m_resistances_cap[0] =50;
+	bas->m_resistances_cap[1] =50;
+	bas->m_resistances_cap[2] =50;
+	bas->m_resistances_cap[3] =50;
+	bas->m_walk_speed = 3000;
+	bas->m_attack_speed=1500;
+	m_base_action = Action::MAGIC_ATTACK;
+
+	// Alle Faehigkeiten deaktivieren
+	int i;
+	for (i=1;i<6;i++)
+		bas->m_abilities[i]=0;
+	
+	// Debugging
+	bas->m_abilities[3] = 0xffffff;
+	// entzuenden
+	//bas->m_abilities[3] = 0x7f7fff;
+	// klirrende Kaelte
+	//bas->m_abilities[3] = 0x7fff7f;
+	// Ionisierung
+	//bas->m_abilities[3] = 0xff7f7f;
+	
+	// Basisfaehigkeiten (normaler Angriff etc) erlauben
+	bas->m_abilities[0] = 0x3f4f;
+	bas->m_attack_range =20;
+	
+	m_base_action = Action::MAGIC_ATTACK;
+	m_left_action = Action::MAGIC_ATTACK;
+	m_right_action = Action::MAGIC_ATTACK;
+	
+	
+	bas->m_special_flags=0;
+
+	m_name.assign("Gandalf");
+	// Modifizierte Basisattribute erzeugen
+	calcBaseAttrMod();
+	
+	return true;
+}
+
+
+bool Mage::update(float time)
+{
+	// Magespezifische update Routine
+	
+	// update von User aufrufen
+	Player::update(time);
+	return true;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/mage.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,91 @@
+#ifndef MAGE_H
+#define MAGE_H
+
+#include "player.h"
+
+/**
+ * \class Mage
+ * \brief Spieler der Klasse Magier
+ */
+class Mage : public Player {
+//Public stuff
+	public:
+	//Fields
+	//Constructors
+	/**
+	 * \fn Mage(World* world, unsigned int id)
+	 * \brief Konstruktor
+	 * \param world Welt
+	 * \param id Objekt-ID
+	 *
+	 * Legt ein neues Mage Objekt an.
+	 */
+		Mage(World* world, int id);
+	
+	
+	/**
+		 * \fn ~Mage()
+		 * \brief Destruktor
+		 *
+		 * Gibt den Allokierten Speicher wieder frei
+	 */
+		~Mage();
+	//Accessor Methods
+	//Operations
+	/**
+		 * \fn virtual bool init ()
+		 * \brief Initialisiert den Magier 
+		 * \return bool, der angibt ob die initialisierung erfolgreich war
+	 */
+		virtual bool init ();
+	
+	
+		/**
+		 * \fn virtual bool destroy ()
+		 * \brief Zerstoert das Objekt. Die Funktion ist virtuell und wird durch die abgeleiteten Klassen &uuml;berschrieben.
+		 * \return bool, der angibt ob die Zerstoerung erfolgreich war
+		 */
+		virtual bool destroy()
+		{
+			Player::destroy();
+		}
+		
+		/**
+		 * \fn virtual void calcDamage(ActionType type,Damage& dmg)
+		 * \brief Berechnet den Basisschaden einer Aktion
+		 */
+		virtual void calcBaseDamage(Action::ActionType act,Damage& dmg)
+		{
+			Player::calcBaseDamage(act,dmg);
+		}
+		
+		/**
+		 * \fn virtual void calcBaseAttrMod()
+		 * \brief Die modifizierten Basisattribute werden neu berechnet. Verwendet die Basisattribute, verwendete Items, sowie temporaere Modifikationen.
+		 */
+		virtual void calcBaseAttrMod()
+		{
+			Player::calcBaseAttrMod();
+		}
+		
+		/**
+		 * \fn bool update (float time)
+		 * \brief Updatefunktion des Magiers
+		 * \param time Verstrichene Zeit
+		 * \return bool, Erfolgreiches Update?
+		 *
+		 **/
+		bool update(float time);
+		
+	protected:
+	
+	/**
+	 * \fn virtual void gainLevel()
+	 * \brief Wird aufgerufen, wenn das Lebewesen ein Levelup erhält. Passt Erfahrung und alle Basisattribute an.
+	 */
+		virtual void gainLevel()
+		{
+			Player::gainLevel();
+		}
+};
+#endif //MAGE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/main.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,47 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Alexander Boehm
+
+	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.
+*/
+
+#include "server.h"
+
+
+
+int main( int argc, char** argv )
+{
+
+	Server * server = new Server();
+
+	server->init(8);
+
+	server->run();
+
+	// debugging
+	char c;
+	while (true)
+	{
+		cin >> c;
+		if (c=='x')
+		{
+			break;
+		}
+	}
+	server->stop();
+	return 0;
+
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/main_test.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,613 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf
+
+	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.
+*/
+
+#include "world.h"
+#include "serverwobject.h"
+#include "creature.h"
+#include "fixedobject.h"
+#include "warrior.h"
+#include "goblin.h"
+
+#include <iostream>
+
+#define hex(a) ((a)>=10) ? (a)-10+'a' : (a)+'0'
+
+using namespace std;
+
+const short nlayers[9] = {WorldObject::Geometry::LAYER_DEAD ,
+		WorldObject::Geometry::LAYER_FIXED & WorldObject::Geometry::LAYER_BASE,
+		WorldObject::Geometry::LAYER_FIXED & WorldObject::Geometry::LAYER_BASE & WorldObject::Geometry::LAYER_AIR,
+		WorldObject::Geometry::LAYER_CREATURE & WorldObject::Geometry::LAYER_AIR ,
+		WorldObject::Geometry::LAYER_CREATURE & WorldObject::Geometry::LAYER_BASE,
+		WorldObject::Geometry::LAYER_CREATURE & WorldObject::Geometry::LAYER_BASE & WorldObject::Geometry::LAYER_AIR,
+		WorldObject::Geometry::LAYER_PLAYER & WorldObject::Geometry::LAYER_BASE & WorldObject::Geometry::LAYER_AIR,
+		WorldObject::Geometry::LAYER_MONSTER & WorldObject::Geometry::LAYER_AIR,
+		WorldObject::Geometry::LAYER_MONSTER & WorldObject::Geometry::LAYER_AIR & WorldObject::Geometry::LAYER_BASE};
+		
+const short slayers[10] = {
+	WorldObject::Geometry::LAYER_DEAD,
+	WorldObject::Geometry::LAYER_BASE,
+ 	WorldObject::Geometry::LAYER_AIR,
+  	WorldObject::Geometry::LAYER_AIR | WorldObject::Geometry::LAYER_BASE,
+	WorldObject::Geometry::LAYER_FIXED , 
+ 	WorldObject::Geometry::LAYER_CREATURE, 
+  	WorldObject::Geometry::LAYER_FIXED & WorldObject::Geometry::LAYER_AIR, 
+	WorldObject::Geometry::LAYER_MONSTER & WorldObject::Geometry::LAYER_AIR, 
+ 	WorldObject::Geometry::LAYER_MONSTER & WorldObject::Geometry::LAYER_BASE,
+ 	(WorldObject::Geometry::LAYER_MONSTER | WorldObject::Geometry::LAYER_PLAYER) & (WorldObject::Geometry::LAYER_BASE | WorldObject::Geometry::LAYER_AIR)
+};
+	
+
+int main(int argc, char *argv[])
+{
+	char c,c2;
+	
+	World* g_world=new World();
+	float x,y, radius,x1,y1, x2, y2,x_path,y_path, pathlength;
+	Action::ActionType act = Action::ATTACK;
+	int i,j,key;
+	unsigned int id;
+	ServerWObject* wo=0,*wo2=0;
+	Creature* cr=0;
+	Player* pl =0;
+	CreatureBaseAttr* basm =0;
+	
+	WorldObject::Geometry* wob;
+	Shape sho,shs,shall;
+	sho.m_type = Shape::CIRCLE;
+	sho.m_radius =1;
+	shall.m_type = Shape::RECT;
+	shall.m_coordinate_x = 16;
+	shall.m_coordinate_y = 16;
+	shall.m_extent_x = 16;
+	shall.m_extent_y = 16;
+	
+	shs.m_coordinate_x = 5.5;
+	shs.m_coordinate_y = 5.3;
+	shs.m_type = Shape::RECT;
+	shs.m_extent_x =1.1;
+	shs.m_extent_y = 1.9;
+	
+	short layer = WorldObject::Geometry::LAYER_ALL;
+	Shape* sp;
+	Gridunit* gu;
+	
+	Region* reg = new Region(8,8);
+	short rid = g_world->insertRegion(reg);
+	
+	// Elemente die von Anfang an eingefügt werden
+	
+	////////////
+	// der Spieler
+	
+	//wo2 = wo = cr= new Warrior(g_world,1);
+	//g_world->insertSWObject(wo, 11,5,rid);
+	
+	
+	wo = new FixedObject(g_world,32);
+	wob = wo->getGeometry();
+	sp = &(wob->m_shape);
+	wob->m_layer = (WorldObject::Geometry::LAYER_FIXED & WorldObject::Geometry::LAYER_BASE & WorldObject::Geometry::LAYER_AIR);
+	sp->m_type = Shape::RECT;
+	sp->m_extent_x = 1.0;
+	sp->m_extent_y = 2;
+	g_world->insertSWObject(wo, 4,6,rid);
+	
+	 	
+	wo = new FixedObject(g_world,100);
+	wob = wo->getGeometry();
+	sp = &(wob->m_shape);
+	wob->m_layer = (WorldObject::Geometry::LAYER_FIXED & WorldObject::Geometry::LAYER_BASE & WorldObject::Geometry::LAYER_AIR);
+	sp->m_type = Shape::CIRCLE;
+	sp->m_extent_x = 1.51;
+	sp->m_extent_y = 2.51;
+	sp->m_radius = 2.8;
+	g_world->insertSWObject(wo, 9,13,rid);
+		
+	wo = new Goblin(g_world,20);
+	g_world->insertSWObject(wo, 13,8,rid);
+	
+	wo = cr=new Goblin(g_world,21);
+	basm = cr->getBaseAttrMod();
+	basm->m_max_health = 300;
+	cr->getDynAttr()->m_health = 300;
+	g_world->insertSWObject(wo, 14.2,8.2,rid);
+		
+	wo = cr=new Goblin(g_world,22);
+	basm = cr->getBaseAttrMod();
+	basm->m_strength = 200;
+	g_world->insertSWObject(wo, 14.5,6.7,rid);
+
+	wo = cr=new Goblin(g_world,23);
+	basm = cr->getBaseAttrMod();
+	basm->m_dexterity = 200;
+	g_world->insertSWObject(wo, 14.8,5.7,rid);
+
+	wo =cr= new Goblin(g_world,24);
+	basm = cr->getBaseAttrMod();
+	basm->m_magic_power = 200;
+	g_world->insertSWObject(wo, 14,10.9,rid);
+
+	wo = cr=new Goblin(g_world,25);
+	basm = cr->getBaseAttrMod();
+	basm->m_willpower = 200;
+	g_world->insertSWObject(wo, 17,8.2,rid);
+		
+	wo = cr=new Goblin(g_world,26);
+	basm = cr->getBaseAttrMod();
+		// blocken
+		//basm->m_abilities[1]=0x0100;
+		// Turm in der Schlacht
+		//basm->m_abilities[1]=0x0200;
+	basm->m_block = 44;
+	basm->m_armor = 50;
+	g_world->insertSWObject(wo, 7,5,rid);
+		
+	wo = cr=new Goblin(g_world,27);
+	basm = cr->getBaseAttrMod();
+	basm->m_block = 200;
+	g_world->insertSWObject(wo, 18.5,7,rid);
+
+	wo = cr=new Goblin(g_world,28);
+	basm = cr->getBaseAttrMod();
+	basm->m_armor = 200;
+	g_world->insertSWObject(wo, 17.2,6.6,rid);
+
+	wo = cr=new Goblin(g_world,29);
+	basm = cr->getBaseAttrMod();
+	basm->m_resistances[Damage::PHYSICAL] = 50;
+	g_world->insertSWObject(wo, 19.9,6.9,rid);
+		
+
+	wo = cr=new Goblin(g_world,30);
+	basm = cr->getBaseAttrMod();
+	basm->m_resistances[Damage::FIRE] = 50;
+	g_world->insertSWObject(wo, 16.2,3,rid);
+	
+	wo = cr=new Goblin(g_world,31);
+	basm = cr->getBaseAttrMod();
+	basm->m_resistances[Damage::AIR] = 50;
+	g_world->insertSWObject(wo, 19.2,3.1,rid);
+		
+	wo = cr=new Goblin(g_world,32);
+	basm = cr->getBaseAttrMod();
+	basm->m_resistances[Damage::ICE] = 50;
+	g_world->insertSWObject(wo, 21,5,rid);
+	
+	
+	
+	// Zeiger auf Liste von WorldObject - Anfragen welche Objekte in einem Gebiet sind werden in dieser Form ausgegeben
+	list<ServerWObject*>* res= new list<ServerWObject*>;
+	
+	// Iterator zum durchmustern einer solchen Liste
+	list<ServerWObject*>::iterator iter;
+	
+
+	bool result;
+	//wo =wo2;	
+	
+	/*
+	cr = (Creature*) wo;
+	Command* com = cr->getCommand();
+	com->m_type = Action::WALK;
+	com->m_goal_object_id=0;
+	com->m_goal_coordinate_x = 8;
+	com->m_goal_coordinate_y = 4;
+	*/
+	
+	
+	c='0';
+	while (c !='x' )
+	{
+		if (wo!=0)
+		{
+			wob = wo->getGeometry();
+			printf("\n aktuelles WorldObject:\n");
+			printf("WO: x: %f y: %f ID: %i layer: %x\n", wob->m_shape.m_coordinate_x,wob->m_shape.m_coordinate_y, wo->getId(),wob->m_layer);
+			
+		};
+		printf("\n1: WorldObject einfügen \n2: Grid anzeigen \n3: update \n4: alle Elemente anzeigen \n5: Element nach key suchen \n6: ElementInShape \n7: WorldObject bewegen\n8: ObjectShape aendern \n9: SuchShape aendern\n0: aktuelles Element löschen \na: Aktion auswaehlen \nc: Kommando erteilen\ni: intersect \nl: ElementOnLine \n \nx: beenden \n");
+		
+		cin >> c;
+		if (c=='1')
+		{
+			cout << "x\n";
+			cin >> x;
+			cout << "y\n";
+			cin >> y;
+			cout << "ID \n";
+			cin >> id;
+			wo = new ServerWObject(g_world,id);
+			wob = wo->getGeometry();
+			sp = &(wob->m_shape);
+			sp->m_type = sho.m_type;
+			sp->m_radius = sho.m_radius;
+			sp->m_extent_x = sho.m_extent_x;
+			sp->m_extent_y = sho.m_extent_y;
+			printf("0: WorldObject::Geometry::LAYER_DEAD 				\
+					\n1: WorldObject::Geometry::LAYER_FIXED & WorldObject::Geometry::LAYER_BASE	 \
+					\n2: WorldObject::Geometry::LAYER_FIXED & WorldObject::Geometry::LAYER_BASE & WorldObject::Geometry::LAYER_AIR \
+					\n3. WorldObject::Geometry::LAYER_CREATURE & WorldObject::Geometry::LAYER_AIR \
+					\n4. WorldObject::Geometry::LAYER_CREATURE & WorldObject::Geometry::LAYER_BASE \
+					\n5. WorldObject::Geometry::LAYER_CREATURE & WorldObject::Geometry::LAYER_BASE & WorldObject::Geometry::LAYER_AIR\
+					\n6. WorldObject::Geometry::LAYER_PLAYER & WorldObject::Geometry::LAYER_BASE & WorldObject::Geometry::LAYER_AIR \
+					\n7. WorldObject::Geometry::LAYER_MONSTER & WorldObject::Geometry::LAYER_AIR \
+					\n8. WorldObject::Geometry::LAYER_MONSTER &WorldObject::Geometry::LAYER_AIR &  WorldObject::Geometry::LAYER_BASE\n");
+			int l;
+			cin >> l;
+			wob->m_layer = nlayers[l];
+			g_world->insertSWObject(wo, x,y,rid);
+			
+			
+		}
+		else if (c=='2')
+		{
+			cout << "i\n";
+			cin >> i;
+			cout << "j\n";
+			cin >> j;
+			
+			gu = reg->m_data_grid->ind(i,j);
+			cout << "Objekte in WorldObject::Geometry::LAYER_DEAD: \n";
+			for (i=0;i<gu->getObjectNr(WorldObject::Geometry::LAYER_DEAD);i++)
+			{
+				wo = gu->getObjects(WorldObject::Geometry::LAYER_DEAD)[i];
+				wob = wo->getGeometry();
+				printf("WO: x: %f y: %f ID: %i layer: %x\n", wob->m_shape.m_coordinate_x,wob->m_shape.m_coordinate_y, wo->getId(),wob->m_layer);
+			}
+			printf("\n");
+			cout << "Objekte in WorldObject::Geometry::LAYER_FIXED:\n";
+			for (i=0;i<gu->getObjectNr(WorldObject::Geometry::LAYER_FIXED);i++)
+			{
+				wo = gu->getObjects(WorldObject::Geometry::LAYER_FIXED)[i];
+				wob = wo->getGeometry();
+				printf("WO: x: %f y: %f ID: %i layer: %x\n", wob->m_shape.m_coordinate_x,wob->m_shape.m_coordinate_y, wo->getId(),wob->m_layer);
+			}
+			printf("\n");
+			cout << "Objekte in WorldObject::Geometry::LAYER_CREATURE:\n";
+			for (i=0;i<gu->getObjectNr(WorldObject::Geometry::LAYER_CREATURE);i++)
+			{
+				wo = gu->getObjects(WorldObject::Geometry::LAYER_CREATURE)[i];
+				wob = wo->getGeometry();
+				printf("WO: x: %f y: %f ID: %i layer: %x\n", wob->m_shape.m_coordinate_x,wob->m_shape.m_coordinate_y, wo->getId(),wob->m_layer);
+			}
+			printf("\n");
+			
+			
+		}
+		else if (c=='3')
+		{
+			// update aufrufen
+			
+			float time;
+			int i,n;
+			 cout << "Zeitdifferenz\n";
+			 cin >> time;
+			 n=1;
+			 //cout << "Anzahl der Updates\n";
+			 //cin >> n;
+			 
+			 for(i=0;i<n;i++)
+			 {
+			 	g_world->update(time);
+			 }
+		}
+		else if (c=='4')
+		{
+			// Alle Objekte anzeigen
+			
+			// Suche nach allen Objecten wird einfach über Suche in einem Kreis mit riesigem Umkreis gemacht - brauchen wir so eine Funktion (ausserhalb der g_world, die ihre Objekte über den Binärbaum durchmustern kann)
+			
+			WorldObject* wo2;
+			// Löschen der Ergebnisliste
+			res->clear();
+			
+			// Aufruf mit x=0, y=0, Radius= riesig, selector= NULL (keine Selektierung)
+			result= g_world->getSWObjectsInShape(&shall,WorldObject::Geometry::LAYER_ALL,rid,res);
+			
+			if (result== false)
+			{
+				cout << "\n Es ist ein Fehler aufgetreten";
+			}
+			else
+			{
+				// Durchmustern der STL Liste
+				for (iter =res->begin(); iter!=res->end(); iter ++)
+				{
+					// WorldObjectpointer aus dem Iterator holen
+					// die leicht sonderbare Schreibweise entsteht durch den überladenen * Operator für den Iterator
+					wo2 = *iter;
+					wob = wo2->getGeometry();
+				
+					printf("Objekt: %f %f ID: %i layer: %x\n",wob->m_shape.m_coordinate_x,wob->m_shape.m_coordinate_y,wo2->getId()
+					, wob->m_layer);	
+					
+					if (wo2->getTypeInfo()->m_type!=WorldObject::TypeInfo::TYPE_FIXED_OBJECT)
+					{
+						Creature* cr2 = (Creature*) wo2;
+						CreatureBaseAttr* cba = cr2->getBaseAttrMod();
+						CreatureDynAttr* cda = cr2->getDynAttr();
+						/*printf("     HP: %i / %i\n", pl2->getHealth(), pl2->getMaxHealth());
+						printf("     LVL: %i\n", pl2->getLevel());
+						printf("     EXP: %i / %i\n", pl2->getExperience(), pl2->getMaxExperience());
+						printf("     ATT: %i DEF: %i ARMOR %i \n",pl2->getAttack(),pl2->getDefense(), pl2->getArmor());
+						*/
+					}
+					
+				}
+			}
+			
+		}	
+		else if (c=='5')
+		{
+			// Suchen eines WorldObjects anhand seines Keys
+			cout << "id: ";
+			cin >> key;
+			wo=g_world->getSWObject(key)	;
+			
+			// nach solchen Abfragen immer auf NULL prüfen
+			if (wo == 0)
+				cout << "\nObjekt nicht gefunden\n";
+		}	
+		else if (c=='6')
+		{
+			// Element in Shape
+			ServerWObject* wo2;
+			// Löschen der Ergebnisliste
+			res->clear();
+			
+			printf(" \
+			\n0: WorldObject::Geometry::LAYER_DEAD, \
+			\n1: WorldObject::Geometry::LAYER_BASE, \
+			\n2: WorldObject::Geometry::LAYER_AIR, \
+ 			\n3:WorldObject::Geometry::LAYER_AIR | WorldObject::Geometry::LAYER_BASE, \
+ 			\n4: WorldObject::Geometry::LAYER_FIXED ,  \
+ 			\n5: WorldObject::Geometry::LAYER_CREATURE, \
+ 			\n6: WorldObject::Geometry::LAYER_FIXED & WorldObject::Geometry::LAYER_AIR, \
+ 			\n7: WorldObject::Geometry::LAYER_MONSTER & WorldObject::Geometry::LAYER_AIR, \
+ 			\n8: WorldObject::Geometry::LAYER_MONSTER & WorldObject::Geometry::LAYER_BASE \
+ 			\n9: (WorldObject::Geometry::LAYER_MONSTER | WorldObject::Geometry::LAYER_PLAYER) & (WorldObject::Geometry::LAYER_BASE | WorldObject::Geometry::LAYER_AIR) \n");
+			
+			int l;
+			cin >> l;
+			
+			// Aufruf mit x=0, y=0, Radius= riesig, selector= NULL (keine Selektierung)
+			result= g_world->getSWObjectsInShape(&shs,slayers[l],rid,res);
+			
+			if (result== false)
+			{
+				cout << "\n Es ist ein Fehler aufgetreten";
+			}
+			else
+			{
+				// Durchmustern der STL Liste
+				for (iter =res->begin(); iter!=res->end(); iter ++)
+				{
+					// WorldObjectpointer aus dem Iterator holen
+					// die leicht sonderbare Schreibweise entsteht durch den überladenen * Operator für den Iterator
+					wo2 = *iter;
+					wob = wo2->getGeometry();
+				
+					printf("Objekt: %f %f key: %i layer: %x\n",wob->m_shape.m_coordinate_x,wob->m_shape.m_coordinate_y,wo->getId(),wob->m_layer);	
+					/*
+					if (wo2->getObjectType().getObjectType()!=OBJECTTYPE_FIXED_OBJECT)
+					{
+					Player* pl2 = (Player*) wo2;
+					printf("     HP: %i / %i\n", pl2->getHealth(), pl2->getMaxHealth());
+					printf("     LVL: %i\n", pl2->getLevel());
+					printf("     EXP: %i / %i\n", pl2->getExperience(), pl2->getMaxExperience());
+					printf("     ATT: %i DEF: %i ARMOR %i \n",pl2->getAttack(),pl2->getDefense(), pl2->getArmor());
+				}
+					*/
+				}
+			}
+		}
+		else if (c=='7')
+		{
+			// WorldObject modifizieren
+			if (wo !=0)
+			{
+				
+				// Koordinaten neu setzen, die alten vorher sichern
+				x1=wob->m_shape.m_coordinate_x;
+				y1=wob->m_shape.m_coordinate_y;
+				printf("\nx (aktuell %f): ", wob->m_shape.m_coordinate_x);
+				cin >> x;
+				printf("y (aktuell %f): ",wob->m_shape.m_coordinate_y) ;
+				cin >> y;
+				
+				wo->moveTo(x,y);
+				
+			}
+			else
+			{
+				cout << "\n kein WorldObject ausgewählt \n";
+			}
+		}
+		else if (c=='8')
+		{
+			printf("1: Kreis 2: Rechteck\n");
+			cin >> c2;
+			if (c2=='1')
+			{
+				sho.m_type = Shape::CIRCLE;
+				printf("radius:\n");
+				cin >> sho.m_radius;
+			} 
+			else
+			{
+				sho.m_type = Shape::RECT;
+				printf("Ausdehnung x:\n");
+				cin >> sho.m_extent_x;
+				printf("Ausdehnung y:\n");
+				cin >> sho.m_extent_y;
+				
+			}
+				
+			
+			
+			
+		}
+		else if (c=='9')
+		{
+			printf("\nx: ");
+			cin >> x;
+			printf("y: ") ;
+			cin >> y;
+			shs.m_coordinate_x =x;
+			shs.m_coordinate_y =y;
+			printf("1: Kreis 2: Rechteck\n");
+			cin >> c2;
+			if (c2=='1')
+			{
+				shs.m_type = Shape::CIRCLE;
+				printf("radius:\n");
+				cin >> shs.m_radius;
+			} 
+			else
+			{
+				shs.m_type = Shape::RECT;
+				printf("Ausdehnung x:\n");
+				cin >> shs.m_extent_x;
+				printf("Ausdehnung y:\n");
+				cin >> shs.m_extent_y;
+				
+			}
+			
+		}
+		else if (c=='0')
+		{
+			
+			// Testen der Element Löschen Funktion
+			
+			result= g_world->deleteSWObject(wo);
+			
+			// Testen des Resultats noch weniger vergessen als bei den obigen Fällen ;)
+			if (result==true)
+			{
+				cout << "\n Löschen erfolgreich\n";
+				wo=0;
+			}
+			else
+			{
+				cout << "\nLöschen nicht erfolgreich\n";
+			}
+			
+		}
+		
+		else if (c=='c')
+		{
+			if (wo!=0 & wo->getTypeInfo()->m_type == WorldObject::TypeInfo::TYPE_PLAYER)
+			{
+				pl = (Player*) wo;
+				cout << "x\n";
+				cin >> x;
+				cout << "y\n";
+				cin >> y;
+				wo2 = g_world->getSWObjectAt(x, y, WorldObject::Geometry::LAYER_ALL, rid);
+				ClientCommand com;
+				com.m_coordinate_x = x;
+				com.m_coordinate_y = y;
+				com.m_action = act;
+				com.m_button = LEFT_MOUSE_BUTTON;
+				if (wo2!=0)
+				{
+					com.m_id = wo2->getId();
+					com.m_action = act;
+				}
+				else
+				{
+					com.m_id = 0;
+					com.m_action = Action::WALK;
+				}
+				
+				pl->onClientCommand(&com);
+				
+				/*
+				Command* com = cr->getCommand();
+				
+				if (wo2!=0)
+				{
+					com->m_type = Action::ATTACK;
+					com->m_goal_object_id = wo2->getId();
+					cout << "Zielobject "<<wo2->getId() << "\n";
+				}
+				else
+				{
+					com->m_type = Action::WALK;
+					//DEBUG("goal : %f %f",x,y);
+					com->m_goal_coordinate_x = x;
+					com->m_goal_coordinate_y = y;
+				}
+				*/
+				
+			}
+		}
+		else if (c=='i')
+		{
+			if (g_world->intersect(&(wo->getGeometry()->m_shape), &shs))
+				printf("ueberschneiden sich\n");
+		}
+		else if (c=='a')
+		{
+			cout << "Aktionsnummer angeben\n";
+			int a;
+			cin >> a;
+			act = (Action::ActionType) a;
+		}
+		else if (c=='l')
+		{
+			float xs,xe,ys,ye;
+			res->clear();
+			cout << "x start\n";
+			cin>> xs;
+			cout << "y start\n";
+			cin>> ys;
+			cout << "x end\n";
+			cin>> xe;
+			cout << "y end\n";
+			cin>> ye;
+			
+			g_world->getSWObjectsOnLine(xs,ys,xe,ye,WorldObject::Geometry::LAYER_AIR,rid,res);
+			
+			for (iter =res->begin(); iter!=res->end(); iter ++)
+			{
+				wo2 = *iter;
+				wob = wo2->getGeometry();
+				
+				printf("Objekt: %f %f key: %i layer: %x\n",wob->m_shape.m_coordinate_x,wob->m_shape.m_coordinate_y,wo2->getId(),wob->m_layer);	
+			}
+			
+		}
+		else if (c=='x')
+		{
+			//Beenden
+		}
+		else
+		{
+			//Typo
+			printf("Sie haben sich vertippt! x eingeben zum Beenden, andere Eingabe zum Fortfahren!\n");
+			cin >> c;
+		}
+	}	
+	
+	return 1;
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/mapcreator.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,70 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Alexander Boehm
+
+	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.
+*/
+
+#include <unistd.h>
+#include "debug.h"
+#include "network.h"
+#include "worldobject.h"
+#include "worldobjectselector.h"
+#include "constants.h"
+#include "worldobjecttype.h"
+#include "player.h"
+#include "command.h"
+#include "fixedobject.h"
+#include "constants.h"
+#include "monster.h"
+#include "clientstructures.h"
+#include "user.h"
+#include "goblin.h"
+#include "warrior.h"
+#include "fountain.h"
+#include "trader.h"
+#include "trade.h"
+#include "spawnpoint.h"
+#include "database.h"
+#include "chest.h"
+#include <sys/time.h>
+#include <sys/types.h>
+#include <unistd.h>
+#include <GL/gl.h>
+#include <GL/glut.h>
+
+
+World *g_world=NULL;
+
+int main( int argc, char** argv )
+{
+	
+	if( !db_init( argv[1], argv[2], argv[3], argv[4] ) )
+	{
+		ERROR( "No database available" );
+		return false;
+	}
+	
+	g_world=new World();
+	db_set_users_in_world( false );
+
+	g_world->saveData();
+	
+	delete g_world;
+	db_kill();
+	return 0;
+}
+	
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/mapgenerator.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,1165 @@
+
+
+#include "mapgenerator.h"
+
+using namespace std;
+
+
+
+
+ 
+	
+
+void MapGenerator::drawMap(list<MapArea*>* tmp)
+{
+	int i,j;
+	int map[MAPSIZE][MAPSIZE];
+	MapArea* ma;
+	
+	for (i=0;i<MAPSIZE;i++)
+		for (j=0;j<MAPSIZE;j++)
+			map[i][j]=-1;
+	
+	list<MapArea*>::iterator iter;
+	for (iter=tmp->begin();iter!=tmp->end();iter++)
+	{
+		ma = *iter;
+		map[(ma->x+MAPSIZE*10000)%MAPSIZE][(ma->y+MAPSIZE*10000)%MAPSIZE]=ma->content;
+	}
+			
+	cout << "\n\n";
+	for (i=0;i<MAPSIZE;i++)
+	{	
+		cout << "|";
+		for (j=0;j<MAPSIZE;j++)
+			{
+				switch(map[j][i])
+				{
+					case -1: cout << "  "; break;
+					case 0: cout << ".."; break;
+					case 1: cout << "##"; break;
+					case 2: cout << "^"; break;
+					case 3: cout << "v"; break;
+				}
+				//cout << f.margin_dist[0] << f.margin_dist[1] << f.margin_dist[2] << f.margin_dist[3] ;
+				//cout << f.type;
+			}
+		cout << "|\n"; 
+	}
+	cout << "\n\n";
+}
+
+
+
+// Zeigt den Dungeon in Konsolengraphik an
+void MapGenerator::showDungeon(QuadTree<MapArea>* dungeonmap)
+{
+	int x=0, y=0;
+	char c=' ';
+	list<MapArea*>* tmp = new list<MapArea*>;
+	
+	while (c != '0')
+	{
+		tmp->clear();
+		dungeonmap->getElementsInRect(x*MAPSIZE,y*MAPSIZE,(x+1)*MAPSIZE-1,(y+1)*MAPSIZE-1,NULL,NULL,tmp);
+		cout << "Koordinaten (" <<x<<","<<y<<")\n";
+		if (tmp->empty())
+		{
+			cout << "keine Daten\n\n";
+		}
+		else
+			drawMap(tmp);
+		cout << "2,4,6,8 fuer nach sued,west, ost, nord\n";
+		cout << "+,- fuer nach oben, nach unten\n";
+		cout << "0 fuer ende\n\n";
+		cin >> c;
+		if (c=='6')
+			x++;
+		if (c=='4')
+			x--;
+		if (c=='2')
+			y++;
+		if (c=='8' )
+			y--;
+		/*if (c=='+')
+			z++;
+		if (c=='-' )
+			z--;
+		*/
+		
+	}
+}
+
+
+
+MapArea* MapGenerator::getField(QuadTree<MapArea>* dungeonmap, int x, int y, bool expand)
+{
+
+	static int counter =10;
+	MapArea* ret = dungeonmap->getElementAt(x,y);
+	MapArea* ma;
+	if (expand && ret==0)
+	{
+		ret= new MapArea(x,y,counter++);
+		dungeonmap->insertElement(ret);
+		
+	}
+	
+	
+	if (expand)
+	{
+		Field* f;
+		for (int i=-1;i<=1;i++)
+		{
+			for (int j=-1;j<=1;j++)
+			{
+				if (dungeonmap->getElementAt(x+i,y+j)==0)
+				{
+					ma = new MapArea(x+i,y+j,counter++);
+					dungeonmap->insertElement(ma);
+				}
+			}
+		}
+	}
+	
+	return ret;
+}
+ 
+// Berechnet im Dungeon Einzelkarte an Position x,y,z
+// markiert alle Karten zu denen Wege fuehren als zu bearbeiten
+// schiebt neue Karten in die Taskliste
+// n Anzahl der bisher bearbeiteten Karten
+// max Obergrenze fuer die Anzahl 
+  void MapGenerator::calcDungeon(QuadTree<MapArea>* dungeonmap,int max )
+{
+
+	char c;
+		
+	// Queue fuer die Felder
+	queue<Coords>* coordq = new queue<Coords>;
+	
+	// testen der freien Richtungen
+	// finden der Eingangspunkte in die Karte
+	// 0..5 = nord, ost, sued, west, oben, unten
+	
+	
+	
+	
+	// Einbauen  der Stadt als Startpunkt
+	int i,j;
+	MapArea* field;
+	
+	for (i=0;i<5;i++)
+		for(j=0;j<5;j++)
+		{
+			field=getField(dungeonmap,i,j);
+			if (i % 4 ==0 || j%4==0)
+				field->content=1;
+			else
+				field->content=0;
+			field->town = true;
+		}
+		field=getField(dungeonmap,2,3);	
+		field->towncenter = true;
+		field->trader = true;
+		field=getField(dungeonmap,2,2);
+		field->trader = true;
+		
+		field=getField(dungeonmap,4,2);	
+	field->content=0;
+	field->dist=1;
+	
+	Coords coord;
+	coord.x=4;
+	coord.y=2;
+	coordq->push(coord);
+	
+	
+	
+	//return;
+	// Berechnen der Karte
+	
+	int nf, nb,todo,t,nfges ;
+	int adj[4][2];
+	int xf,yf,xa,ya;
+	float prob,psum;
+	int dist;
+	int counter =0;
+	
+	
+	// Solange es noch abzuarbeitende Felder gibt
+	while (!coordq->empty())
+	{
+		nf=0;
+		nb=0;
+		todo =0;
+		
+		// Feld aus der Queue holen
+		coord = coordq->front();
+		xf = coord.x;
+		yf = coord.y;
+		dist=coord.dist;
+		coordq->pop();
+		
+		//cout << "calc field: " << xf << " " << yf <<"\n";
+		
+		// benachbarte Felder absuchen
+		// Anzahl freie und blockierte zaehlen
+		// noch zu belegende finden
+		for (i=0;i<=3;i++)
+		{
+			xa = xf + direction[i][0];
+			ya = yf + direction[i][1];
+			
+			//cout << "view neighbour: " << xa << " " << ya <<"\n";
+			
+			
+			field = getField(dungeonmap,xa,ya);
+			t=field->content;
+			if (t==-1)
+			{
+				adj[todo][0]=xa;
+				adj[todo][1]=ya;
+				todo++;
+			}
+			else
+			{
+				if (t==1)
+				{
+					nb++;
+				}
+				else
+				{
+					nf++;
+				}
+			}
+		}
+		// betrachten der Nachbarfelder beendet
+		
+		
+		if (todo==0)
+			continue;
+		
+		// Berechnen wie viele Felder insgesamt frei werden sollen
+		psum =0;
+		prob = (rand()*1.0) / (RAND_MAX);
+		
+		nfges = min(nf-1,0);
+		
+		
+		while (prob>psum && (nfges-nf)< todo)
+		{
+			
+			psum += FIELDPROB[nf][nb][nfges];
+			//cout <<"psum nfges " << psum <<" "<<nfges<<"\n";
+			nfges++;
+		}
+		
+		
+		// Diese Zeile sorgt dafür, dass der letzte Weg nicht geschlossen wird
+		// solange weniger als max/2 Karten gezeichnet sind
+		if (coordq->empty() && nfges==nf && counter<(max/2))
+			nfges++;
+		
+		if (counter>max)
+			nfges=nf;
+		
+		
+		//cout << "nf nb nfges todo " << nf <<" "<<nb << " "<<nfges<<" "<<todo<<"\n";
+		//cout << "prob "<<prob<< "\n";
+		
+		// Felder eintragen
+		i=4-nf-nb;
+		
+		while (i>0)
+		{
+			j = (rand() % i);
+			xa = adj[j][0];
+			ya = adj[j][1];
+			field = getField(dungeonmap,xa,ya);
+			if (i<=nfges-nf)
+			{
+				// Feld als frei eintragen
+				
+				field->content =0;
+				field->dist=dist;
+				
+				// in die Queue schieben
+				coord.x=xa;
+				coord.y=ya;
+				coord.prev_x =xf;
+				coord.prev_y =yf;
+				coord.dist = dist+1;
+				coordq->push(coord);
+				
+			}
+			else
+			{
+				// Feld als blockiert eintragen
+				field->content=1;
+			}
+			
+			adj[j][0]=adj[i-1][0];
+			adj[j][1]=adj[i-1][1];
+			
+			i--;
+		}
+		
+		counter++;
+		
+//  		//showDungeon(dungeonmap);
+	}
+	// Ende while Schleife leeren der Queue
+	delete coordq;
+}
+
+void MapGenerator::turn(int &x, int &y,int t)
+{
+	int tmp;
+	if (t==1)
+	{
+		tmp = x;
+		x =(FIELD_STRETCH-1-y);
+		y=tmp;
+	}
+	if (t==2)
+	{
+		x =(FIELD_STRETCH-1-x);
+		y =(FIELD_STRETCH-1-y);
+	}
+	if (t==3)
+	{
+		tmp = y;
+		y =(FIELD_STRETCH-1-x);
+		x=tmp;
+	}
+}	
+
+ bool MapGenerator::check(int x,int y,World* world)
+{
+	bool b[8];
+	int n[8][2]={{-1,-1},{0,-1},{1,-1},{-1,0},{1,0},{-1,1},{0,1},{1,1}};
+	WorldObject* wo;
+	for (int i=0;i<=7;i++)
+	{
+		wo = world->getWorldObjectAt((float)x+n[i][0],(float) y+n[i][1]);
+		if (wo!=0)
+		{
+			b[i]=false;
+		}
+		else
+		{
+			b[i]=true;
+		}
+	}
+	
+	/*
+	if (x == 195 && y == -19)
+	{
+		printf("%d %d\n",x,y);
+		printf("%d%d%d\n",(int) b[0],(int) b[1],(int) b[2]);
+		printf("%d*%d\n",(int) b[3],(int) b[4]);
+		printf("%d%d%d\n",(int) b[5],(int) b[6],(int) b[7]);
+			
+	}
+	*/
+	bool ret1 = (b[1] && b[2] && b[0]) || (b[6] && b[7] && b[5]) || !(b[1] || b[2] || b[0]) || !(b[6] || b[7] || b[0]);
+	bool ret2 =	(b[0] && b[3] && b[5]) || (b[2] && b[4] && b[7]) || !(b[0] || b[3] || b[5]) || !(b[2] || b[4] || b[7]);
+	return ret1 & ret2;
+}
+	
+	
+void MapGenerator::insertElement(World* world,int i, int cx, int cy,int x, int y,int (*obj)[FIELD_STRETCH])
+{
+	static int ind=100;
+	float nx = x*FIELD_STRETCH+cx;
+	float ny = y*FIELD_STRETCH+cy;
+	obj[cx][cy]=i;
+	WorldObject* wo;
+	if (i<=11)
+		 wo = new FixedObject(world,nx,ny,ind++,IND_OBJECTS[i] );
+	else
+	{
+		// Brunnen
+		if (i==FOUNTAIN)
+		{
+			Fountain* f = new Fountain(world,nx,ny,ind++);
+			f->init(1);	// Level
+			wo = f;
+		}
+		
+		// Spawnpoint
+		if (i==SPAWNPOINT)
+		{
+			Spawnpoint* s= new Spawnpoint(world,nx,ny,ind++);
+			s->init(SUBTYPE_GOBLIN,1,2,10,1000);	
+			wo=s;
+		}
+		
+		// Kiste
+		if (i==CHEST)
+		{
+			Chest* c = new Chest(world,nx,ny,ind++,60000);
+			c->setLevel(1);
+			wo = c;
+		}
+		
+		if (i==TRADER)
+		{
+			Trader* tr = new Trader(world, nx,ny,ind++,SUBTYPE_UNIVERSAL_TRADER);
+			wo = tr;
+		}
+	}
+	world->insertWorldObject(wo);
+}
+
+void MapGenerator::stretchDungeon(QuadTree<MapArea>* dungeonmap, World* world)
+{	
+	int i,j,ki,kj,k;
+	int n,sum;
+	int x,y;
+	int a=1,u,v[4];
+	int ind=100;
+	list<MapArea*>::iterator iter;
+	list<MapArea*>* fieldlist= new list<MapArea*>;
+	dungeonmap->getElements(fieldlist);
+	MapArea* field;
+	MapArea* field2;
+	// Fuer alle Teilkarten
+	for (iter=fieldlist->begin();iter!=fieldlist->end();iter++)
+	{
+		field = (*iter);
+		x=field->x;
+		y=field->y;
+		
+		DEBUG4("calc field %i %i\n",x,y);
+		sum=0;
+		n=1;
+		
+		// Berechnen des Wertes des anliegenden 2x2 Feldes
+		for (ki=0;ki<=1;ki++)
+			for(kj=0;kj<=1;kj++)
+			{
+				field2 = getField(dungeonmap,x+kj,y+ki,false);
+				if (field2)
+					sum += (field2->content +1)*n;
+				n *=3;
+				
+			}
+		int cx,cy;
+		// Wert!=0 wenn nicht alle vier Felder leer
+		if (sum !=0)
+		{
+			// Berechnen ob an der Stelle Begrenzungen gezogen werden muessen
+			field->sum=sum;
+			//printf("calc %i %i res: %i\n",x,y,sum);
+			field->type = SUM_TYPE[sum];
+			field->turn=SUM_TURN[sum];
+
+			// Wenn Begrenzungen gezogen werden muessen
+			if (field->type!=0)
+			{
+				//field->margin_dist[0]=1+rand() % (FIELD_STRETCH-2);
+				u=-1;
+				
+				// Fuer alle vier Richtungen den Austrittspunkt der Kanten bestimmen
+				for (k=0;k<4;k++)
+				{
+					v[k]=0;
+					field2 = getField(dungeonmap,x+direction[k][0],y+direction[k][1],false);
+					//if (field2)
+						//printf("neigh %i %i,  ntype %i type %i dir %i turn %i \n",x+direction[k][0],y+direction[k][1],field2->type,field->type,k,field->turn);
+					if (field2 !=0 && field2->type!=0 && TYPE_DIR[field->type][(k+4-field->turn)%4]==1)
+					{
+						field->margin_dist[k]=field2->margin_dist[(k+2)%4];
+						u=field->margin_dist[k];
+						//printf( "copying dir %i\n",k);
+					}
+					else
+					{
+						v[k]=1;
+						
+						field->margin_dist[k]=1+rand() %(FIELD_STRETCH-2);
+						//field->margin_dist[k] =a;
+						//a=(a+1)%10;
+					}
+				}
+				if (u!=-1 && field->type==2)
+				{
+					for (k=0;k<4;k++)
+					{
+						if (v[k]==1)
+						{
+							field->margin_dist[k]=u;
+						}
+					}
+				}
+				
+			}
+			// Ende der Berechnung der Begrenzungen
+			
+			int obj[FIELD_STRETCH][FIELD_STRETCH];
+			for (i=0;i<FIELD_STRETCH;i++ )
+				for (j=0;j<FIELD_STRETCH;j++ )
+				{
+					obj[i][j]=-1;
+				}
+			
+				
+			// Begrenzungen zeichnen
+			DEBUG4("Zeichnen der Begrenzung %i",field->type);
+			/*for (int l=0;l<4;l++)
+			{
+				cout << field->margin_dist[l] << " ";
+			}
+			cout << "\n";*/
+			if (field->type==-1)
+			{
+				for (i=0;i<	FIELD_STRETCH;i++)
+					for (j=0;j<=FIELD_STRETCH;j++)
+					{	
+						obj[i][j]=0;
+					}	
+			}
+			
+			if (field->type==1 || field->type==3)
+			{
+				// Ecke
+				
+				int b1 = field->margin_dist[field->turn];
+				int b2= field->margin_dist[(3+field->turn)%4];
+				//cout << b1<<b2<<"\n";
+				if (field->turn==1 || field->turn==2)
+					b2 =(FIELD_STRETCH-1-b2);
+				if (field->turn>1)
+					b1 =(FIELD_STRETCH-1-b1);
+				
+				
+				//cout << b1<<b2<<"\n";
+				// Waagerechte
+				for (k=0;k<b1;k++)
+				{
+					cx=k;
+					cy=b2;
+					turn(cx,cy,field->turn);
+					insertElement(world,1+(1+field->type+field->turn)%4,cx,cy,x,y,obj);
+					
+				}
+				
+				// Ecke
+				cx=b1;
+				cy=b2;
+				turn(cx,cy,field->turn);
+				insertElement(world,5+(2+field->turn)%4,cx,cy,x,y,obj);
+				
+				// Senkrechte
+				for (k=0;k<b2;k++)
+				{
+					cx=b1;
+					cy=k;
+					turn(cx,cy,field->turn);
+					insertElement(world,1+(2+field->type+field->turn)%4,cx,cy,x,y,obj);
+				}
+				
+				// betretbare Felder festlegen
+				if (field->type==1)
+				{
+					for (i=b1+1;i<	FIELD_STRETCH;i++)
+						for (j=0;j<=b2;j++)
+						{	
+							cx=i;
+							cy=j;
+							turn(cx,cy,field->turn);
+							obj[cx][cy]=0;
+						}
+					
+					for (i=0;i<FIELD_STRETCH;i++)
+						for (j=b2+1;j<FIELD_STRETCH;j++)
+						{
+							cx=i;
+							cy=j;
+							turn(cx,cy,field->turn);
+							obj[cx][cy]=0;
+						}
+				}
+				else
+				{
+					for (i=0;i<	b1;i++)
+						for (j=0;j<b2;j++)
+						{	
+							cx=i;
+							cy=j;
+							turn(cx,cy,field->turn);
+							obj[cx][cy]=0;
+						}
+				}
+				
+			}
+			
+			
+			
+
+			if (field->type==2)
+			{
+				// Gerade
+				int b1 = field->margin_dist[(1+field->turn)%4];
+				int b2 = field->margin_dist[(3+field->turn)%4];
+				
+				if (field->turn==1 || field->turn==2)
+				{
+					b1 =(FIELD_STRETCH-1-b1);
+					b2 =(FIELD_STRETCH-1-b2);
+				}
+				
+				if (b1 == b2)
+				{
+					
+					// einfache Waagerechte
+					for (k=0;k<FIELD_STRETCH;k++)
+					{
+						cx=k;
+						cy=b1;
+						turn(cx,cy,field->turn);
+						insertElement(world,1+field->turn,cx,cy,x,y,obj);
+					}
+					// betretbare Felder festlegen
+					for (i=0;i<FIELD_STRETCH;i++)
+						for (j=b1+1;j<FIELD_STRETCH;j++)
+						{	
+							cx=i;
+							cy=j;
+							turn(cx,cy,field->turn);
+							obj[cx][cy]=0;
+						}
+				}
+				else
+				{
+					int c = rand() % FIELD_STRETCH;
+					
+					// Waagerechte 1
+					for (k=0;k<c;k++)
+					{
+						cx=k;
+						cy=b2;
+						turn(cx,cy,field->turn);
+						insertElement(world,1+field->turn,cx,cy,x,y,obj);
+					}
+					
+					//Ecke 1
+					cx=c;
+					cy=b2;
+					turn(cx,cy,field->turn);
+					if (b1<b2)
+						insertElement(world,5+(2+field->turn)%4,cx,cy,x,y,obj);
+					else
+						insertElement(world,5+(1+field->turn)%4,cx,cy,x,y,obj);
+					
+					// Senkrechte
+					for (k=min(b1,b2)+1;k<max(b1,b2);k++)
+					{
+						cx=c;
+						cy=k;
+						turn(cx,cy,field->turn);
+						if (b1<b2)
+							insertElement(world,1+(1+field->turn)%4,cx,cy,x,y,obj);
+						else
+							insertElement(world,1+(3+field->turn)%4,cx,cy,x,y,obj);
+					}
+					
+					//Ecke 2
+					cx=c;
+					cy=b1;
+					turn(cx,cy,field->turn);
+					if (b1<b2)
+						insertElement(world,5+field->turn,cx,cy,x,y,obj);
+					else
+						insertElement(world,5+(3+field->turn)%4,cx,cy,x,y,obj);
+					
+					// Waagerechte 1
+					for (k=c+1;k<FIELD_STRETCH;k++)
+					{
+						cx=k;
+						cy=b1;
+						turn(cx,cy,field->turn);
+						insertElement(world,1+field->turn,cx,cy,x,y,obj);
+					}
+					
+					
+					// betretbare Felder festlegen
+					for (i=0;i<c;i++)
+						for (j=b2+1;j<FIELD_STRETCH;j++)
+						{	
+							cx=i;
+							cy=j;
+							turn(cx,cy,field->turn);
+							if (obj[cx][cy]==-1)
+							obj[cx][cy]=0;
+						}
+						
+					for (i=c;i<	FIELD_STRETCH;i++)
+						for (j=b1+1;j<FIELD_STRETCH;j++)
+						{	
+							cx=i;
+							cy=j;
+							turn(cx,cy,field->turn);
+							if (obj[cx][cy]==-1)
+							obj[cx][cy]=0;
+						}
+				}
+			}
+			
+			
+			
+
+			if (field->type==4)
+			{
+				int b1 = field->margin_dist[(0+field->turn)%4];
+				int b2 = field->margin_dist[(1+field->turn)%4];
+				int b3 = field->margin_dist[(2+field->turn)%4];
+				int b4 = field->margin_dist[(3+field->turn)%4];
+				
+				/*printf("bx: %i %i %i %i\n",b1,b2,b3,b4);
+				printf("turn: %i\n",field->turn);
+				*/
+				if (field->turn==1 || field->turn==2)
+				{
+					b2 =(FIELD_STRETCH-1-b2);
+					b4 =(FIELD_STRETCH-1-b4);
+				}
+				
+				if (field->turn>1)
+				{
+					b1 =(FIELD_STRETCH-1-b1);
+					b3 =(FIELD_STRETCH-1-b3);
+				}
+				
+				
+				int r=rand() %2;
+				
+				if (b1<b3 || b4<b2 || r==0)
+				{
+					// Waagerechte
+					for (k=0;k<b1;k++)
+					{
+						cx=k;
+						cy=b4;
+						turn(cx,cy,field->turn);
+						insertElement(world,1+(2+field->turn)%4,cx,cy,x,y,obj);
+					
+					}
+				
+					// Ecke
+					cx=b1;
+					cy=b4;
+					turn(cx,cy,field->turn);
+					insertElement(world,5+(2+field->turn)%4,cx,cy,x,y,obj);
+				
+					// Senkrechte
+					for (k=0;k<b4;k++)
+					{
+						cx=b1;
+						cy=k;
+						turn(cx,cy,field->turn);
+						insertElement(world,1+(3+field->turn)%4,cx,cy,x,y,obj);
+					}
+					
+					// betretbare Felder festlegen
+					for (i=0;i<b1;i++)
+						for (j=0;j<b4;j++)
+						{	
+							cx=i;
+							cy=j;
+							turn(cx,cy,field->turn);
+							obj[cx][cy]=0;
+						}
+					
+				}
+				else
+				{
+					int ex = rand() % b3;
+					int ey = rand() % b2;
+					
+					// Waagerechte
+					for (k=0;k<ex;k++)
+					{
+						cx=k;
+						cy=b4;
+						turn(cx,cy,field->turn);
+						insertElement(world,1+(2+field->turn)%4,cx,cy,x,y,obj);
+					
+					}
+				
+					// Ecke
+					cx=ex;
+					cy=b4;
+					turn(cx,cy,field->turn);
+					insertElement(world,5+(2+field->turn)%4,cx,cy,x,y,obj);
+					
+					// Senkrechte
+					for (k=b4-1;k>ey;k--)
+					{
+						cx=ex;
+						cy=k;
+						turn(cx,cy,field->turn);
+						insertElement(world,1+(3+field->turn)%4,cx,cy,x,y,obj);
+					}
+					
+					// Ecke
+					cx=ex;
+					cy=ey;
+					turn(cx,cy,field->turn);
+					insertElement(world,5+(0+field->turn)%4,cx,cy,x,y,obj);
+					
+					// Waagerechte
+					for (k=ex+1;k<b1;k++)
+					{
+						cx=k;
+						cy=ey;
+						turn(cx,cy,field->turn);
+						insertElement(world,1+(2+field->turn)%4,cx,cy,x,y,obj);
+					
+					}
+					
+					// Ecke
+					cx=b1;
+					cy=ey;
+					turn(cx,cy,field->turn);
+					insertElement(world,5+(2+field->turn)%4,cx,cy,x,y,obj);
+					
+					// Senkrechte
+					for (k=0;k<ey;k++)
+					{
+						cx=b1;
+						cy=k;
+						turn(cx,cy,field->turn);
+						insertElement(world,1+(3+field->turn)%4,cx,cy,x,y,obj);
+					}
+					
+					// betretbare Felder festlegen
+					for (i=0;i<	ex;i++)
+						for (j=0;j<b4;j++)
+						{	
+							cx=i;
+							cy=j;
+							turn(cx,cy,field->turn);
+							if (obj[cx][cy]==-1)
+							obj[cx][cy]=0;
+						}
+						
+					for (i=ex;i<b1;i++)
+						for (j=0;j<ey;j++)
+						{	
+							cx=i;
+							cy=j;
+							turn(cx,cy,field->turn);
+							if (obj[cx][cy]==-1)
+								obj[cx][cy]=0;
+						}
+				}
+				
+				// zweiter Linienzug...
+				
+				if (b1<b3 || b4<b2 || r==1)
+				{
+					// Waagerechte
+					for (k=FIELD_STRETCH-1;k>b3;k--)
+					{
+						cx=k;
+						cy=b2;
+						turn(cx,cy,field->turn);
+						insertElement(world,1+(0+field->turn)%4,cx,cy,x,y,obj);
+					
+					}
+				
+					// Ecke
+					cx=b3;
+					cy=b2;
+					turn(cx,cy,field->turn);
+					insertElement(world,5+(0+field->turn)%4,cx,cy,x,y,obj);
+				
+					// Senkrechte
+					for (k=FIELD_STRETCH-1;k>b2;k--)
+					{
+						cx=b3;
+						cy=k;
+						turn(cx,cy,field->turn);
+						insertElement(world,1+(1+field->turn)%4,cx,cy,x,y,obj);
+					}
+					
+					// betretbare Felder festlegen
+					for (i=b3+1;i<FIELD_STRETCH;i++)
+						for (j=b2+1;j<FIELD_STRETCH;j++)
+						{	
+							cx=i;
+							cy=j;
+							turn(cx,cy,field->turn);
+							obj[cx][cy]=0;
+						}
+				}
+				else
+				{
+					int ex = FIELD_STRETCH-1-rand() % (FIELD_STRETCH-b1-1);
+					int ey = FIELD_STRETCH-1-rand() % (FIELD_STRETCH-b4-1);
+					
+					// Waagerechte
+					for (k=FIELD_STRETCH-1;k>ex;k--)
+					{
+						cx=k;
+						cy=b2;
+						turn(cx,cy,field->turn);
+						insertElement(world,1+(0+field->turn)%4,cx,cy,x,y,obj);
+					
+					}
+				
+					// Ecke
+					cx=ex;
+					cy=b2;
+					turn(cx,cy,field->turn);
+					insertElement(world,5+(0+field->turn)%4,cx,cy,x,y,obj);
+					
+					// Senkrechte
+					for (k=b2+1;k<ey;k++)
+					{
+						cx=ex;
+						cy=k;
+						turn(cx,cy,field->turn);
+						insertElement(world,1+(1+field->turn)%4,cx,cy,x,y,obj);
+					}
+					
+					// Ecke
+					cx=ex;
+					cy=ey;
+					turn(cx,cy,field->turn);
+					insertElement(world,5+(2+field->turn)%4,cx,cy,x,y,obj);
+					
+					// Waagerechte
+					for (k=b3+1;k<ex;k++)
+					{
+						cx=k;
+						cy=ey;
+						turn(cx,cy,field->turn);
+						insertElement(world,1+(0+field->turn)%4,cx,cy,x,y,obj);
+					
+					}
+					
+					// Ecke
+					cx=b3;
+					cy=ey;
+					turn(cx,cy,field->turn);
+					insertElement(world,5+(0+field->turn)%4,cx,cy,x,y,obj);
+					
+					// Senkrechte
+					for (k=FIELD_STRETCH-1;k>ey;k--)
+					{
+						cx=b3;
+						cy=k;
+						turn(cx,cy,field->turn);
+						insertElement(world,1+(1+field->turn)%4,cx,cy,x,y,obj);
+					}
+					
+					// betretbare Felder festlegen
+					for (i=b3+1;i<	ex;i++)
+						for (j=ey+1;j<FIELD_STRETCH;j++)
+						{	
+							cx=i;
+							cy=j;
+							turn(cx,cy,field->turn);
+							if (obj[cx][cy]==-1)
+								obj[cx][cy]=0;
+						}
+						
+					for (i=ex;i<FIELD_STRETCH;i++)
+						for (j=b2+1;j<FIELD_STRETCH;j++)
+						{	
+							cx=i;
+							cy=j;
+							turn(cx,cy,field->turn);
+							if (obj[cx][cy]==-1)
+							obj[cx][cy]=0;
+						}
+					
+				}
+
+				
+			}
+			
+			/*
+			printf("type %d\n",field->type);
+			for (int ii=FIELD_STRETCH-1;ii>=0;ii--)
+			{
+				for (int jj=0;jj<FIELD_STRETCH;jj++)
+					printf("%2d",obj[jj][ii]);
+				printf("\n");	
+			}
+			printf("\n");
+			}
+			*/
+			
+			int nx,ny;
+			// Towncenter, Brunnen einfuegen
+			if (field->towncenter)
+			{
+				i=0;
+				do
+				{
+					nx=rand()% FIELD_STRETCH;
+					ny=rand()% FIELD_STRETCH;
+					i++;
+				}
+				while (i<1000 && (obj[nx][ny]!=0 || !check(x*FIELD_STRETCH+nx,y*FIELD_STRETCH+ny,world)));
+				
+				if (i<1000)
+				{
+					insertElement(world,TOWNCENTER,nx,ny,x,y,obj);
+				}
+				
+				i=0;
+				do
+				{
+					nx=rand()% FIELD_STRETCH;
+					ny=rand()% FIELD_STRETCH;
+					i++;
+				}
+				while (i<1000 && (obj[nx][ny]!=0 || !check(x*FIELD_STRETCH+nx,y*FIELD_STRETCH+ny,world)));
+				
+				if (i<1000)
+				{
+					insertElement(world,FOUNTAIN,nx,ny,x,y,obj);
+				}
+				
+			}
+			
+			if (field->type !=0 && !field->town && rand()*1.0 / RAND_MAX < FOUNTAIN_PROB[field->type])
+			{
+				i=0;
+				do
+				{
+					nx=rand()% FIELD_STRETCH;
+					ny=rand()% FIELD_STRETCH;
+					i++;
+				}
+				while (i<3 && (obj[nx][ny]!=0 || !check(x*FIELD_STRETCH+nx,y*FIELD_STRETCH+ny,world)));
+				
+				if (i<3)
+				{
+					insertElement(world,FOUNTAIN,nx,ny,x,y,obj);
+				}
+			}
+
+			if (field->trader)
+			{
+				i=0;
+				do
+				{
+					nx=rand()% FIELD_STRETCH;
+					ny=rand()% FIELD_STRETCH;
+					i++;
+				}
+				while (i<1000 && (obj[nx][ny]!=0 || !check(x*FIELD_STRETCH+nx,y*FIELD_STRETCH+ny,world)));
+				
+				if (i<1000)
+				{
+					insertElement(world,TRADER,nx,ny,x,y,obj);
+				}
+			};
+				
+			// Kisten einfuegen
+			if (field->type!=0 && !field->town && rand()*1.0 / RAND_MAX < CHEST_PROB[field->type])
+			{
+				i=0;
+				do
+				{
+					nx=rand()% FIELD_STRETCH;
+					ny=rand()% FIELD_STRETCH;
+					i++;
+				}
+				while (i<3 && (obj[nx][ny]!=0 || !check(x*FIELD_STRETCH+nx,y*FIELD_STRETCH+ny,world)));
+				
+				if (i<3)
+				{
+					insertElement(world,CHEST,nx,ny,x,y,obj);
+				}
+			}
+			
+			//Spawnpoint einfuegen
+			if (field->type!=0 && !field->town && rand()*1.0 / RAND_MAX < SPAWNPOINT_PROB[field->type])
+			{
+				i=0;
+				do
+				{
+					nx=rand()% FIELD_STRETCH;
+					ny=rand()% FIELD_STRETCH;
+					i++;
+				}
+				while (i<10 && (obj[nx][ny]!=0 || !check(nx,ny,world)));
+				
+				if (i<10)
+				{
+					insertElement(world,SPAWNPOINT,nx,ny,x,y,obj);
+				}
+				
+				for (i=0;i<4;i++)
+				{
+					nx=rand()% FIELD_STRETCH;
+					ny=rand()% FIELD_STRETCH;
+					if (rand()*1.0/RAND_MAX < TOTEM_PROB && obj[nx][ny]==0 && check(x*FIELD_STRETCH+nx,y*FIELD_STRETCH+ny,world))
+						 insertElement(world,TOTEM,nx,ny,x,y,obj);
+				}
+			}
+			
+			char dummy;
+			float p = TREE_PROB[0];
+			if (field->town)
+				p= TREE_PROB[1];
+			// Baueme einfuegen
+			for (i=0;i<FIELD_STRETCH*FIELD_STRETCH;i++)
+			{
+				nx=rand()% FIELD_STRETCH;
+				ny=rand()% FIELD_STRETCH;
+				if ((rand()*1.0)/RAND_MAX < p && obj[nx][ny]<=0 && check(x*FIELD_STRETCH+nx,y*FIELD_STRETCH+ny,world))
+				{	
+					
+					insertElement(world,TREE,nx,ny,x,y,obj);
+					
+					//printf("%d %d\n",nx,ny);
+					if (x*FIELD_STRETCH+nx==195 && y*FIELD_STRETCH+ny==-19 && false)
+					{
+						for (int ii=FIELD_STRETCH;ii>=0;ii--)
+						{
+							for (int jj=0;jj<FIELD_STRETCH;jj++)
+								printf("%2d",obj[jj][ii]);
+							printf("\n");	
+						}
+						//cin >> dummy;
+					}	
+					
+				}
+			}
+		}
+		// Ende der Berechnung der relevanten Felder
+	}
+}
+
+void MapGenerator::createMap(World* world)
+{
+	long sec;
+	time(&sec);
+	//printf("time %i \n",sec);
+	//srand(sec);			// Zufallszahlen initialisieren;
+	srand(1192953949);
+	QuadTree<MapArea>* dungeonmap = new QuadTree<MapArea>(0,0,1,1);
+	int max = 100; // Anzahl Felder
+	calcDungeon(  dungeonmap,max);
+	stretchDungeon(dungeonmap,world);
+	
+	//showDungeon(dungeonmap);
+	delete dungeonmap;
+}
+
+/*int main()
+{
+	
+	return 0;
+}*/
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/mapgenerator.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,231 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf
+
+	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.
+*/
+/**
+ * \file mapgenerator.h
+ * \defgroup MapGenerator \ Kartenerstellung
+ * \ingroup MapGenerator
+ * \brief Klasse zum generieren der Spielwelt
+ * \author Hans
+ * \version 1.0
+ * \date 2007/05/28
+ * \note Beinhaltet die Klasse MapGenerator
+ */
+#ifndef MAPGENERATOR_H
+#define MAPGENERATOR_H
+#include <string>
+#include <stdio.h>
+#include <iostream>
+#include <queue>
+#include <math.h>
+#include <stdlib.h>
+#include <map>
+#include <list>
+
+#include "world.h"
+#include "fixedobject.h"
+#include "constants.h"
+#include "quadtree.h"
+#include "quadtree.cpp"
+#include "spawnpoint.h"
+#include "fountain.h"
+#include "chest.h"
+#include "trader.h"
+
+// Kantenlaenge einer einzelnen Karte
+#define MAPSIZE 20
+
+// FIELDPROB[f][b][n] = Wahrscheinlichkeit, dass ein Feld mit bereits b blockierten und f freien Nachbarfeldern insgesamt n+1 freie Nachbarn hat
+// Summe einer Vierergruppe muss immer 1 betragen
+
+// hier is die Stelle zum dran rumbasteln ;)
+// immer nur genau eine Variante einkommentieren ;)
+
+// Variante fuer verwinkelte langezogene Karte
+const float FIELDPROB[4][4][4]={{{0.7,0.2,0.1,0},{0.7,0.2,0.1,0},{0.8,0.2,0,0},{1,0,0,0}}, /* 0 freie */
+	{{0.05,0.7,0.2,0.05},{0.05,0.7,0.25,0},{0.05,0.95,0,0},{0,1,0,0}}, /* 1 freie */
+	{{0,0.4,0.3,0.3},{0,0.5,0.5,0},{0,0,1,0},{0,0,0,0}},	/* 2 freie */
+	{{0,0,0.5,0.5},	{0,0,0,1},{0,0,0,0},{0,0,0,0}}};	/* 3 freie */
+	
+// Variante fuer viele Sackgassen
+//	const float FIELDPROB[4][4][4]={{{0.7,0.2,0.1,0},{0.7,0.2,0.1,0},{0.8,0.2,0,0},{1,0,0,0}}, /* 0 freie*/
+//		{{0.1,0.7,0.15,0.05},{0.1,0.7,0.1,0},{0.1,0.9,0,0},{0,1,0,0}}, /* 1 freie */
+//		{{0,0.2,0.6,0.2},{0,0.2,0.8,0},{0,0,1,0},{0,0,0,0}},	/* 2 freie */
+//		{{0,0,0.5,0.5},	{0,0,0,1},{0,0,0,0},{0,0,0,0}}};	/* 3 freie */
+	
+// Variante fuer große Hoehlen	
+//const float FIELDPROB[4][4][4]={{{0.7,0.2,0.1,0},{0.7,0.2,0.1,0},{0.8,0.2,0,0},{1,0,0,0}}, /* 0 freie*/
+//		{{0.05,0.65,0.1,0.2},{0.05,0.6,0.35,0},{0.05,0.95,0,0},{0,1,0,0}}, /* 1 freie */
+//		{{0,0.3,0.1,0.6},{0,0.2,0.8,0},{0,0,1,0},{0,0,0,0}},	/* 2 freie */
+//		{{0,0,0.2,0.8},	{0,0,0,1},{0,0,0,0},{0,0,0,0}}};	/* 3 freie */
+	
+
+
+// Anmerkungen:
+// 0 freie Felder: nur möglich bei einer Leiter
+// 1 freie Felder: Standardfall (das Feld von dem man kommt ist das eine freie)
+// 2 freie Felder: Treffpunkt von zwei Gängen
+	
+	// Array mit den Aenderungen der Koordinaten in Richtung Nord, Ost, Sued, West
+	const int direction[4][2]={{0,-1},{1,0},{0,1},{-1,0}};
+	
+	// Anzahl Felder, in die ein einzelnes Feld der schematischen Karte übersetzt wird.
+	const int FIELD_STRETCH = 8;
+	
+	const int SUM_TYPE[81] = {0,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,0, 0,3,0,
+					0,0,0, 0,0,0, 0,0,0, 0,0,0, 0,-1,1, 0,1,2, 0,0,0, 0,1,2, 3,4,3,
+	  				0,0,0, 0,0,3, 0,0,0, 0,0,3, 0,1,4, 0,2,3, 0,0,0, 0,2,3, 0,3,0};
+	  
+	const int SUM_TURN[81]= {0,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,0,
+		  			0,0,0, 0,0,0, 0,0,0, 0,0,0, 0,0,0, 0,1,0, 0,0,0, 0,3,3, 2,0,2,
+		 			0,0,0, 0,0,1, 0,0,0, 0,0,3, 0,2,1, 0,1,3, 0,0,0, 0,2,1, 0,0,0};
+					
+	const int TYPE_DIR[5][4] = {{0,0,0,0},{1,0,0,1},{0,1,0,1},{1,0,0,1},{1,1,1,1}};
+		 			
+	const int IND_OBJECTS[12] = {0,SUBTYPE_PALISADE_FRONT,SUBTYPE_PALISADE_DOWN ,SUBTYPE_PALISADE_FRONT,SUBTYPE_PALISADE_DOWN ,SUBTYPE_PALISADE_CORNER_NW,SUBTYPE_PALISADE_CORNER_NE,SUBTYPE_PALISADE_CORNER_SE,SUBTYPE_PALISADE_CORNER_SW,SUBTYPE_TREE,SUBTYPE_TOWN_CENTER,SUBTYPE_TOTEM};
+	
+	const float TREE_PROB[2] = {0.1,0.03};
+	const float CHEST_PROB[5]={0.01,0.05,0.1,0.3,0.3};
+	const float FOUNTAIN_PROB[5]={0.1,0.01,0.01,0.001,0.001};
+	const float TOTEM_PROB=0.3;
+	const float SPAWNPOINT_PROB[5]={0.6,0.5,0.3,0.2,0.2};
+	
+	enum OBJECTS {TREE = 9, TOWNCENTER = 10, FOUNTAIN = 100,TOTEM =11 , SPAWNPOINT = 101, CHEST  = 102, TRADER = 103};
+	
+struct MapArea
+{
+	MapArea(int x, int y, int id)
+	{
+		this->x=x;
+		this->y=y;
+		content=-1;
+		type=0;
+		turn=0;
+		this->id=id;
+		town= towncenter=trader=false;
+	}
+	bool inside,town, towncenter,trader;
+	
+	int content;
+	int margin_dist[4];
+	int turn;
+	int type;
+	int sum;
+	int dist;
+	int x,y;
+	int id;
+	
+	float getCoordinateX()
+	{
+		return x;
+	}
+	float getCoordinateY()
+	{
+		return y;
+	}
+	
+	
+	
+	int getId()
+	{
+		return id;
+	}
+	
+};
+
+
+// Struktur fuer die Informationen eines Feldes
+struct Coords
+{
+	int x,y; 			// Koordinaten
+	int dist;
+	int prev_x, prev_y;	// Koordinaten des vorrangegangenen Feldes
+};
+
+	
+	
+// Array zum speichern einer Karte
+// -1 = noch nicht belegt, 0 = frei, 1=blockiert, 2=Leiter nach oben, 3= Leiter nach unten
+
+/*
+struct Gamemap
+{
+	MapArea gmap[MAPSIZE][MAPSIZE];
+	int x,y;
+};
+
+// Array zum speichern einen Dungeons
+// 9x9x9 Array von einzelnen Karten
+class Dungeonmap
+{
+	private:
+		map<int,Gamemap*>* gmaps;
+		int num_maps;
+		//map<int,Gamemap*>::iterator prev_map;
+		
+	public:
+	Dungeonmap();
+	~Dungeonmap();
+	
+	Gamemap* getGamemap(int x, int y);
+	
+	map<int,Gamemap*>* getGamemaps();
+
+	
+	MapArea* getMapArea(int x, int y,bool create=true);
+	
+};
+
+class DynMatrix
+{
+	
+	private:
+		int dim;
+		int* data;
+		
+	public:
+	DynMatrix(int dim);
+
+	
+	~DynMatrix();
+	
+	
+	int* ind(int x, int y);
+	
+};
+*/
+class MapGenerator{
+	
+	
+	public:
+		 static void createMap(World* world);
+		 MapGenerator(){};
+	
+		
+	private:
+		static void drawMap(list<MapArea*>* tmp);
+		static void showDungeon(QuadTree<MapArea>* dungeonmap);
+		static MapArea* getField(QuadTree<MapArea>* dungeonmap, int x, int y, bool expand=true);
+		static void calcDungeon(QuadTree<MapArea>* dungeonmap,int max );
+		static void turn(int &x, int &y,int t);
+		static bool check(int x,int y,World* world);
+		static void stretchDungeon(QuadTree<MapArea>* dungeonmap, World* world);
+		static void insertElement(World* world,int i, int cx, int cy,int x, int y,int (*obj)[FIELD_STRETCH]);
+};
+
+#endif //CHEST_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/matrix2d.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,84 @@
+#ifndef MATRIX2D_H
+#define MATRIX2D_H
+
+#include "debug.h"
+#include <stdio.h>
+#include <string.h>
+
+/**
+ * \class Matrix2d
+ * \brief Klasse fuer ein zweidimensionales Feld
+ */
+template <class Element>
+class Matrix2d
+{
+
+	private:
+		/**
+ 		 * \var int m_dimx
+ 		 * \brief TODO
+ 		 */
+		int m_dimx;
+		
+        /**
+         * \var int m_dimy
+         * \brief TODO
+         */
+		int m_dimy;
+		
+		/**
+ 		 * \var Element* m_data
+ 		 * \brief TODO
+ 		 */
+		Element* m_data;
+		
+	public:
+	/**
+ 	 * fn Matrix2D(int dimx, int dimy)
+ 	 * \brief Konstruktor
+ 	 * \param dimx Breite des Feldes
+ 	 * \param dimy Laenge des Feldes
+	 */
+	Matrix2d(int dimx, int dimy)
+	{
+		m_dimx = dimx,m_dimy = dimy;
+		m_data = new Element[dimx*dimy];
+		DEBUG5("creating Matrix2d at %p",m_data);
+	}
+	
+	
+	/**
+ 	 * \fn ~Matrix2d()
+ 	 * \brief Destruktor
+ 	 */
+	~Matrix2d()
+	{
+		delete[] m_data;
+	}
+	
+	
+	/**
+	 * \fn Element* ind(int x, int y)
+	 * \brief TODO
+	 * \param x TODO
+	 * \param y TODO
+	 */
+	Element* ind(int x, int y)
+	{
+		return &(m_data[x*m_dimy +y]);
+	}
+	
+	/**
+	 * \fn void clear()
+	 * \brief Schreibt 0 in alle Elemente des Feldes
+	 */
+	void clear()
+	{
+		memset(m_data,0,sizeof(Element)*m_dimx*m_dimy);
+	}
+	
+			
+};
+	
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/monster.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,403 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf
+
+	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.
+*/
+#include "monster.h"
+
+Monster::Monster(World* world, unsigned int id) : Creature( world,  id)
+{
+	bool tmp=Monster::init();
+	if(!tmp)
+	{
+		DEBUG("Initialisierung des Monsters fehlgeschlagen!");
+	}
+}
+
+
+Monster::Monster(World* world, unsigned int id,MonsterBasicData& data)
+	: Creature( world,  id)
+{
+	memcpy(getBaseAttr(),&data.m_base_attr, sizeof(data.m_base_attr));
+
+	getTypeInfo()->m_type = data.m_type_info.m_type;
+	getTypeInfo()->m_subtype = data.m_type_info.m_subtype;
+	getTypeInfo()->m_category = data.m_type_info.m_category;
+	getTypeInfo()->m_fraction = data.m_type_info.m_fraction;
+	
+
+	memcpy(m_drop_slots,&data.m_drop_slots, 4*sizeof(DropSlot));
+
+	getDynAttr()->m_experience=0;
+	getDynAttr()->m_health = getBaseAttr()->m_max_health;
+
+	// Standardform setzen
+	getGeometry()->m_shape.m_type = Shape::CIRCLE;
+	getGeometry()->m_shape.m_radius = data.m_radius;
+	getGeometry()->m_layer = data.m_layer;
+	getGeometry()->m_angle =0;
+
+	m_ai.m_goals = new list<pair<ServerWObject*,float> >;
+	m_ai.m_visible_goals = new list<pair<ServerWObject*,float> >;
+	m_ai.m_state = Ai::INACTIVE;
+	calcBaseAttrMod();
+}
+
+Monster::~Monster()
+{
+	// allokierten Speicher freigeben
+	delete m_ai.m_goals;
+	delete m_ai.m_visible_goals;
+}
+
+bool Monster::destroy()
+{
+	Creature::destroy();
+}
+
+bool Monster::init()
+{
+	//eigene Initialisierung
+	m_ai.m_goals = new list<pair<ServerWObject*,float> >;
+	m_ai.m_visible_goals = new list<pair<ServerWObject*,float> >;
+
+	// Basistyp setzen
+	getTypeInfo()->m_type = TypeInfo::TYPE_MONSTER;
+
+	// Standardform setzen
+	getGeometry()->m_shape.m_type = Shape::CIRCLE;
+	getGeometry()->m_shape.m_radius = 0.5;
+	getGeometry()->m_layer = (Geometry::LAYER_BASE | Geometry::LAYER_AIR);
+	getGeometry()->m_angle =0;
+
+	getBaseAttr()->m_step_length=0.5;
+
+	m_ai.m_sight_range=8;
+
+
+	return true;
+}
+
+bool Monster::update(float time)
+{
+	DEBUG5("Update des Monsters [%i]", getId());
+
+	// AI abhandeln
+
+
+
+	// Update Funktion der Oberklasse aufrufen
+	bool result;
+	result = Creature::update(time);
+	return result;
+}
+
+void Monster::updateCommand()
+{
+	m_ai.m_goals->clear();
+	m_ai.m_visible_goals->clear();
+
+	// eigene Koordinaten
+	float x = getGeometry()->m_shape.m_coordinate_x;
+	float y = getGeometry()->m_shape.m_coordinate_y;
+	// Nummer der Region
+	short rid = getGridLocation()->m_region;
+
+	// Koordinaten eines zieles
+	float goal_x,goal_y;
+
+	// moegliche Ziele ermitteln
+
+	// Liste der Spieler
+	map<int,ServerWObject*>* players = getRegion()->getPlayers();
+	list<ServerWObject*> ret;
+
+	ServerWObject* pl;
+
+	// Entfernungen und Sichtbarkeit der Ziele ermitteln
+	float dist;
+	for (map<int,ServerWObject*>::iterator it = players->begin(); it!=players->end(); ++it)
+	{
+		pl = it->second;
+		dist = World::getDistance(getGeometry()->m_shape, pl->getGeometry()->m_shape);
+		if ( dist< m_ai.m_sight_range)
+		{
+			// Spieler ist in Sichtweite
+			m_ai.m_goals->push_back(make_pair(pl,dist));
+
+			goal_x = pl->getGeometry()->m_shape.m_coordinate_x;
+			goal_y = pl->getGeometry()->m_shape.m_coordinate_y;
+
+			// Testen, ob der Weg zum Spieler frei ist
+			ret.clear();
+			getWorld()->getSWObjectsOnLine(x,y,goal_x,goal_y,rid,&ret,Geometry::LAYER_AIR, CREATURE | FIXED,0);
+
+			if (ret.empty())
+			{
+				// Keine Objekte auf der Linie vom Monster zum Ziel
+				m_ai.m_visible_goals->push_back(make_pair(pl,dist));
+
+			}
+		}
+	}
+
+	// Kommando ermitteln
+	m_ai.m_command.m_type = Action::NOACTION;
+	m_ai.m_command_value =0;
+
+	calcBestCommand();
+
+	// Wenn Ai aktiv
+	if ((m_ai.m_state & Ai::ACTIVE) && m_ai.m_command_value>0)
+	{
+		// berechnetes Kommando uebernehmen
+		DEBUG5("calculated command %i",m_ai.m_command.m_type);
+		Command* cmd = getCommand();
+		cmd-> m_type = m_ai.m_command.m_type;
+		cmd->m_goal_coordinate_x = m_ai.m_command.m_goal_coordinate_x;
+		cmd->m_goal_coordinate_y = m_ai.m_command.m_goal_coordinate_y;
+		cmd->m_goal_object_id = m_ai.m_command.m_goal_object_id;
+		cmd->m_range = m_ai.m_command.m_range;
+
+	}
+	else
+	{
+		DEBUG5("AI state %i ai value %f",m_ai.m_state,m_ai.m_command_value);
+	}
+
+	// Kommando ausrechnen das evtl aus einem Statusmod resultiert
+	calcStatusModCommand();
+
+}
+
+void Monster::calcBestCommand()
+{
+	int i,act;
+
+
+
+	// Basisaktionen bewerten
+	for (act = Action::ATTACK;act<=Action::HOLY_ATTACK;act++)
+	{
+		if (!checkAbility((Action::ActionType) act))
+		{
+			// Faehigkeit steht nicht zur Verfuegung
+			continue;
+		}
+
+
+		// Kommando evaluieren
+		evalCommand((Action::ActionType) act);
+
+
+	}
+
+	// Faehigkeiten bewerten
+	// Schleife ueber Faehigkeitengruppen
+	for (i=1;i<6;i++)
+	{
+		if (getBaseAttrMod()->m_abilities[i]!=0)
+		{
+			// Monster besitzt eine Faehigkeit aus der Gruppe
+
+			// Schleife ueber die Faehigkeiten
+			for (act = i*32;act <(i+1)*32;act++)
+			{
+				if (!checkAbility((Action::ActionType) act))
+				{
+					// Faehigkeit steht nicht zur Verfuegung
+					continue;
+				}
+
+
+				// Kommando evaluieren
+				evalCommand((Action::ActionType) act);
+			}
+		}
+	}
+}
+
+void Monster::evalCommand(Action::ActionType act)
+{
+	list<pair<ServerWObject*,float> >::iterator it;
+	list<pair<ServerWObject*,float> >* goal_list;
+	Creature* cgoal=0;
+
+	float dist;
+	float value;
+
+	// true, wenn sich Monster bewegen muss um Fernangriff auszufuehren
+	bool ranged_move = false;;
+
+	Action::ActionInfo* aci = Action::getActionInfo(act);
+
+	// Liste der Ziele festlegen
+	if (aci->m_distance == Action::MELEE)
+	{
+		// Nahkampfaktionen, Ziele sind alle Objekte im Sichtradius
+		goal_list =m_ai.m_goals;
+	}
+	else if (aci->m_distance == Action::RANGED)
+	{
+		// Fernkamfangriff, Ziele sind alle Objekte die direkt Sichtbar sind
+		goal_list = m_ai.m_visible_goals;
+
+		if (goal_list->empty() && !m_ai.m_goals->empty())
+		{
+			ranged_move = true;
+			goal_list =m_ai.m_goals;
+		}
+	}
+	else if (aci->m_distance == Action::PASSIVE)
+	{
+		// Passive Faehigkeiten werden nicht betrachtet
+		return;
+	}
+	else if (aci->m_distance == Action::SELF)
+	{
+		// Faehigkeit auf selbst, es gibt keine ziele
+		goal_list =0;
+	}
+	else if (aci->m_distance == Action::PARTY || aci->m_distance == Action::PARTY_MULTI)
+	{
+		// Faehigkeiten auf Verbuendete
+		// TODO Liste anlegen
+		return;
+	}
+
+	if (aci->m_timer_nr==1 && m_timer1>0 || aci->m_timer_nr==2 && m_timer2>0)
+	{
+		// Aktion erfordert einen Timer, der nicht frei ist
+		return;
+	}
+
+	// Schaden der Aktion ausrechnen
+	Damage dmg;
+	calcDamage(act,dmg);
+
+
+	if (goal_list)
+	{
+		// alle potentiellen Ziele durchgehen
+		for (it = goal_list->begin(); it !=goal_list->end(); ++it)
+		{
+			// moegliches Ziel
+			cgoal = (Creature*) it->first;
+			dist = it->second;
+
+			// Bewertung:
+			value = (dmg.getSumMinDamage()+dmg.getSumMaxDamage())/dist;
+
+			if (aci->m_distance == Action::MELEE || ranged_move)
+			{
+				value *= 3/(3+dist);
+			}
+
+			if (value > m_ai.m_command_value)
+			{
+				// aktuelle Aktion ist besser als alle vorher bewerteten
+				m_ai.m_command_value = value;
+				m_ai.m_command.m_type = act;
+				m_ai.m_command.m_goal_coordinate_x =cgoal->getGeometry()->m_shape.m_coordinate_x;
+				m_ai.m_command.m_goal_coordinate_y =cgoal->getGeometry()->m_shape.m_coordinate_y;
+				m_ai.m_command.m_goal_object_id =cgoal->getId();
+				if (aci->m_distance == Action::MELEE)
+				{
+					m_ai.m_command.m_range = getBaseAttr()->m_attack_range;
+				}
+				else
+				{
+					m_ai.m_command.m_range = 20;
+				}
+
+				if (ranged_move)
+				{
+					m_ai.m_command.m_type = Action::WALK;
+				}
+
+			}
+		}
+	}
+	else
+	{
+		// Bewertung pauschal
+	}
+}
+
+
+void Monster::die()
+{
+	DEBUG("die");
+	Geometry* geom = getGeometry();
+	//Zeiger auf letzten Angreifer per ID  holen
+
+	int id = getDynAttr()->m_last_attacker_id;
+	//schauen ob dieser noch lebt, wenn ja gainExperience bei ihm aufrufen mit der _experience dieser Instanz
+
+	// Object per ID von der World holen
+	ServerWObject* object;
+	object = getWorld()->getSWObject(id,getGridLocation()->m_region);
+
+	if (object!=0)
+	{
+		if (object->getState() == STATE_ACTIVE && object->getTypeInfo()->m_type==TypeInfo::TYPE_PLAYER)
+		{
+			Creature* pl = (Creature*) object;
+
+			// Für Erfahrungspunkte bitte noch eine vernünftige Formel einfallen lassen...
+			//pl->gainExperience((int) ceil(pow(1.5,getLevel()-1)*4));
+			// Verteilen der Exp auf Spieler in der Nähe
+			// TODO: XP nur auf spieler in der Party verteilen
+
+			pl->gainExperience((int) ceil(pow(1.5,min(pl->getBaseAttrMod()->m_level,getBaseAttr()->m_level)-1)*2));
+
+			list<ServerWObject*> ret;
+			Shape s;
+			s.m_type = Shape::CIRCLE;
+			s.m_radius = 20;
+			s.m_coordinate_x = geom->m_shape.m_coordinate_x;
+			s.m_coordinate_y = geom->m_shape.m_coordinate_y;
+
+			getWorld()->getSWObjectsInShape(&s, getGridLocation()->m_region, &ret, Geometry::LAYER_AIR, CREATURE);
+
+			list<ServerWObject*>::iterator i;
+			
+			for (i=ret.begin();i!=ret.end();i++)
+			{
+				pl = (Creature*) (*i);
+				pl->gainExperience((int) ceil(pow(1.5,getBaseAttr()->m_level-1)*2/ret.size()));
+			}
+
+		}
+	}
+
+	ServerItem* si;
+	for (int i=0;i<4;i++)
+	{
+		si = ItemFactory::createItem(m_drop_slots[i]);
+		if (si!=0)
+		{
+			getRegion()->dropItem(si,getGeometry()->m_shape.m_coordinate_x,getGeometry()->m_shape.m_coordinate_y);
+		}
+	}
+
+	Creature::die();
+}
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/monster.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,250 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf
+
+	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.
+*/
+/**
+ * \file monster.h
+ * \defgroup Monster \ Monster
+ * \ingroup Player
+ * \brief Stellt das Objekt Monster zur Verf&uuml;gung
+ * \author Hans Wulf
+ * \version 1.0
+ * \date 2007/05/28
+ * \note Beinhaltet die Klasse Monster, sowie die Struktur AiVariables
+ */
+#ifndef MONSTER_H
+#define MONSTER_H
+#include <string>
+#include "creature.h"
+#include "dropslot.h"
+#include "monsterbase.h"
+
+
+
+/**
+ * \struct Ai
+ * \brief Variablen für die 'K&uuml;nstliche Intelligenz' des Monsters (Struktur)
+ */
+struct Ai
+{
+	/**
+	 * \enum AiState
+	 * \brief Aufzaehlung von Zustaenden der KI
+	 */
+	enum AiState
+	{
+		INACTIVE =0,
+		ACTIVE =1,
+	};
+	
+	/**
+	 * \var m_sight_range
+	 * 
+	 * \brief Sichtweite des Monsters
+	 */
+	float m_sight_range;
+	
+	/**
+	 * \var list<ServerWObject*>* m_goals
+	 * \brief Liste der moeglichen Ziele
+	 */
+	list<pair<ServerWObject*,float> >* m_goals;
+	
+	/**
+	 * \var list<ServerWObject*>* m_visible_goals
+	 * \brief Liste der sichtbaren Ziele
+	 */
+	list< pair<ServerWObject*,float> >* m_visible_goals;
+	
+	/**
+	 * \var float m_command_value
+	 * \brief Bewertung des aktuellen Kommandos
+	 */
+	float m_command_value;
+	
+	/**
+	 * \var Command m_command
+	 * \brief durch die AI berechnetes Kommando
+	 */
+	Command m_command;
+	
+	/**
+	 * \var m_state
+	 * 
+	 * \brief Status der AI des Monsters
+	 */
+	int m_state;
+};
+
+/**
+ * \class Monster
+ * 
+ * \brief Dieses Objekt stellt ein Monster dar. Das Monster wird unter andrem durch Gruppenbezogene KI charakterisiert.
+ * 
+ */
+class Monster : public Creature {
+/**
+ * Public stuff
+ */
+public:
+	/**
+	 * Fields
+	 */
+	/**
+	 * Constructors
+	 */
+	/**
+	 * \fn Monster(World* world, unsigned int id)
+	 * \brief Konstruktor
+	 * \param world 
+	 * \param id 
+	 *
+	 * Legt ein neues Monster Objekt an.
+	 */
+	Monster(World* world, unsigned int id);
+	
+	/**
+	 * \fn Monster(World* world, unsigned int id,MonsterBasicData& data)
+	 * \brief Erzeugt ein Monster auf Basis der gegebenen Daten
+	 * \param world 
+	 * \param id 
+	 * \param data Daten fuer die Erzeugung des Monsters
+	 */
+	Monster(World* world, unsigned int id,MonsterBasicData& data);
+	
+	/**
+	 * \fn ~Monster()
+	 * \brief Destruktor
+	 *
+	 * Gibt den Allokierten Speicher wieder frei
+	 */
+	~Monster();
+	/**
+	 * Accessor Methods
+	 */
+	/**
+	 * Operations
+	 */
+	/**
+	* \fn virtual bool init()
+	* \brief Initialisierung des Monsters
+	* \return bool Gibt an ob die Initialisierung erfolgreich war
+	*/
+	virtual bool init();
+	/**
+	 * \fn virtual bool update (float time)
+	 * \brief Updatefunktion des Monsters
+	 * \param time Verstrichene Zeit
+	 * \return bool, Erfolgreiches Update?
+	 *
+	 * Die Updatefunktion des Monsters wird in regelm&auml;ssigen Abst&auml;nden von der World aufgerufen und ben&ouml;tigt die Angabe, wie viel Zeit f&uuml;r das Update zur Verf&uuml;gung gestellt wird. Der R&uuml;ckgabewert gibt an ob die Funktion erfolgreich ausgef&uuml;hrt wurde. Da die Funktion hier virtuell definiert wird, wird sie erst in den abgeleiteten Klassen implementiert.
+	 */
+	virtual bool update(float time);
+	 
+	
+	/**
+	 * \fn virtual bool destroy ()
+	 * \brief Zerstoert das Objekt. Die Funktion ist virtuell und wird durch die abgeleiteten Klassen &uuml;berschrieben.
+	 * \return bool, der angibt ob die Zerstoerung erfolgreich war
+	 */
+	virtual bool destroy();
+	
+	/**
+	 * \fn virtual void updateCommand()
+	 * \brief aktualisiert das aktuelle Kommando
+	 */
+	virtual void updateCommand();
+	
+	/**
+	 * \fn virtual void calcBestCommand()
+	 * \brief Berechnet das aus Sicht der AI beste Kommando
+	 */
+	virtual void calcBestCommand();
+	
+	/**
+	 * \fn virtual void evalCommand(Action::ActionType act)
+	 * \brief Bewertet das Kommando. Die Bewertung wird in der AI Struktur gespeichert, falls das Kommando besser ist, als das aktuell dort gespeicherte
+	 * \param act zu bewertende Aktion
+	 */
+	virtual void evalCommand(Action::ActionType act);
+	
+	/**
+	 * \fn virtual void die()
+	 * \brief Wird aufgerufen, wenn das Monster stirbt. Verteilt Erfahrungspunkte und droppt die Items.
+	 */
+	virtual void die();
+	
+	/**
+	 * \fn virtual Action::ActionEquip getActionEquip()
+	 * \brief Gibt aus, ob die Aktion einhaendig oder zweihaendig ausgefuehrt wird
+	 */
+	virtual Action::ActionEquip getActionEquip()
+	{
+		// Monster per default immer einhaendig;
+		return Action::ONE_HANDED;
+	}
+	
+/**
+ * Protected stuff
+ */
+protected:
+	/**
+	 * Fields
+	 */
+	
+	/**
+	* \var Ai m_ai
+	 * \brief Alle Daten fuer die Ai
+	 */
+	Ai m_ai;
+	
+	/**
+	 * \var DropSlot m_drop_slots[4]
+	 * \brief Beschreibung der Items die das Monster droppen kann, wenn es stirbt
+	 */
+	DropSlot m_drop_slots[4];
+	
+	/**
+	 * Constructors
+	 */
+	/**
+	 * Accessor Methods
+	 */
+	/**
+	 * Operations
+	 */
+/**
+ * Private stuff
+ */
+private:
+	/**
+	 * Fields
+	 */
+	
+	
+	/**
+	 * Constructors
+	 */
+	/**
+	 * Accessor Methods
+	 */
+	/**
+	 * Operations
+	 */
+	
+};
+#endif //MONSTER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/monsterbase.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,53 @@
+#ifndef MONSTER_BASE_H
+#define MONSTER_BASE_H
+
+#include "dropslot.h"
+#include "worldobject.h"
+#include "creaturestruct.h"
+
+/**
+ * \struct MonsterBasicData
+ * \brief enthaelt alle Daten die zur Erzeugung eines Monsters noetig sind
+ */
+struct MonsterBasicData
+{
+	
+	/**
+	 * \var CreatureBaseAttr m_base_attr
+	 * \brief Basisattribute
+	 */
+	CreatureBaseAttr m_base_attr;
+	
+	/**
+	 * \var WorldObject::TypeInfo m_type_info
+	 * \brief Informationen zum Typ
+	 */
+	WorldObject::TypeInfo m_type_info;
+	
+	/**
+	 * \var DropSlot m_drop_slots[4]
+	 * \brief Beschreibung der Items die das Monster droppen kann, wenn es stirbt
+	 */
+	DropSlot m_drop_slots[4];
+	
+	/**
+	 * \var float m_ai_sight_range
+	 * \brief Sichtweite der AI
+	 */
+	float m_ai_sight_range;
+	
+	/**
+	 * \var m_radius
+	 * \brief Radius des Grundkreises
+	 */
+	float m_radius;
+	
+	/**
+	 * \var short m_layer
+	 * \brief Ebene in der das Monster sich befindet
+	 */
+	short m_layer;
+};
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/network.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,27 @@
+#include "network.h"
+
+
+Network::Network()
+{
+	m_peer = RakNetworkFactory::GetRakPeerInterface();
+	SocketDescriptor sock;
+	
+	m_peer->Startup(1,10,&sock, 1);
+	m_server_address = UNASSIGNED_SYSTEM_ADDRESS;
+}
+
+
+void Network::kill()
+{
+	m_peer->Shutdown(0);
+	RakNetworkFactory::DestroyRakPeerInterface(m_peer);
+}
+
+unsigned char  Network::getPacketIdentifier(Packet *p)
+{
+	if ((unsigned char)p->data[0] == ID_TIMESTAMP)
+		return (unsigned char) p->data[sizeof(unsigned char) + sizeof(unsigned long)];
+	else
+		return (unsigned char) p->data[0];
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/network.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,131 @@
+#ifdef NETWORK_H
+#else
+#define NETWORK_H
+
+#include "raknet/MessageIdentifiers.h"
+#include "raknet/RakNetworkFactory.h"
+#include "raknet/RakPeerInterface.h"
+#include "raknet/RakNetTypes.h"
+#include "raknet/BitStream.h"
+
+#define REQ_PORT 5331
+
+/**
+ * \enum NetStatus
+ * \brief Aufzaehlung von Zustaenden der Netzwerkschnittstelle
+ */
+enum NetStatus
+{
+	NET_REJECTED = -5,
+ NET_SLOTS_FULL=-4,	/*!< Server-Slots sind voll */
+ NET_TIMEOUT=-3,		/*!< Zeit fuer Operation ist */
+ NET_CLOSE=-2,		/*!< Verbindung wurde geschlossen */
+ NET_ERROR=-1,		/*!< Ein Fehler ist aufgetreten */
+ NET_OK=0,		/*!< Operation erfolgreich abgeschlossen */
+ NET_QUEUE_EMPTY,	/*!< Puffer ist leer */
+ NET_CONNECTED		/*!< Verbindung hergestellt */
+};
+
+/**
+ * \class Network
+ * \brief Basisklasse fuer Netzwerkinterface
+ */
+class Network
+{
+	public:
+		/**
+		 * \fn Network()
+		 * \brief Konstruktor
+		 */
+		Network();
+		
+		/**
+		 * \fn NetStatus init( int auth_port )
+		 * \brief Initialisiert den Server, oeffnet die Netzwerkschnittstelle
+		 * \param auth_port gibt den Port an, auf dem sich Clients anmelden koennen
+		 * \return Status der Methode
+		 *
+		 */
+		virtual NetStatus init( int auth_port=REQ_PORT )
+		{
+			
+		};
+		
+		/**
+		 * \fn void kill()
+		 * \brief Schliesst das die Netzwerkverbindung
+		 */
+		virtual void kill();
+		
+		/**
+		 * \fn  void update()
+		 * \brief Sendet / Empfaengt die Daten
+		 */
+		virtual void update()=0;
+		
+		/**
+		 * \fn unsigned char getPacketIdentifier(Packet *p)
+		 * \brief Extrahier aus einem Packet die Identifikationsnummer
+		 */
+		unsigned char getPacketIdentifier(Packet *p);
+		
+		/**
+		 * \fn int numberSlotMessages()
+		 * \brief Anzahl der Packete im Empfangspuffer
+		 * \return Anzahl der Packete
+		 *
+		 * Ist der Slot ungeultig wird Null geliefert, sonst die Anzahl der Packete im Empfangspuffers
+		 */
+		virtual int numberSlotMessages(int slot=0) =0;
+		
+		
+		/**
+		 * \fn void popSlotMessage(Packet* &data, int slot=0)
+		 * \brief Fuehrt net_pop_slot_message auf den Client-Slots
+		 * \param data Puffer fuer die zu kopierenden Daten
+		 * \param size Groesse des Datenblocks
+		 * \return Status der Methode
+		 *
+		 */
+		virtual void popSlotMessage( Packet* &data, int slot=0) =0;
+		
+		/**
+		 * \fn void pushSlotMessage( RakNet::BitStream * data,int slot=0, PacketPriority prio= HIGH_PRIORITY,PacketReliability reliability = RELIABLE )
+		 * \brief Fuehrt net_push_slot_message auf einen Server-Slots aus
+		 * \param data Puffer fuer die zu kopierenden Daten
+		 * \param slot Slot des Empfaengers
+		 * \return Status der Methode
+		 *
+		 */
+		virtual void pushSlotMessage( RakNet::BitStream * data, int slot=0, PacketPriority prio= HIGH_PRIORITY,PacketReliability reliability = RELIABLE) =0;
+		
+		/**
+		 * \fn void deallocatePacket(Packet* packet)
+		 * \brief Loescht ein nicht mehr benoetigtes Paket. Um Speicherlecks zu vermeiden sollten alle Paket auf mit dieser Funktion entfernt werden
+		 */
+		void deallocatePacket(Packet* packet)
+		{
+			m_peer->DeallocatePacket(packet);
+		}
+		
+		/**
+		 * \fn NetStatus getSlotStatus( int slot=0 )
+		 * \brief Liefert den Status eines Server-Slots
+		 * \param slot Slotnummer des Servers
+		 * \return Status des Slots
+		 *
+		 */
+		virtual NetStatus getSlotStatus( int slot=0 ) =0;
+		
+		
+	protected:
+		/**
+		 * \var RakPeerInterface* m_peer
+		 * \brief Netzwerkschnittstelle von RakNet
+		 */
+		RakPeerInterface* m_peer;
+		
+};
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/networkstruct.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,85 @@
+#include "networkstruct.h"
+#include "charconv.h"
+
+void ServerHeader::toString(CharConv* cv)
+{
+	
+	cv->toBuffer<unsigned char>((unsigned char) m_content);
+	cv->toBuffer(m_objects);
+	cv->toBuffer(m_projectiles);
+	cv->toBuffer(m_items);
+	cv->toBuffer(m_drop_items);	
+	cv->toBuffer(m_chatmessage);
+	cv->toBuffer(m_trade);
+	cv->toBuffer(m_detailed_item);
+	
+	
+}
+
+void ServerHeader::fromString(CharConv* cv)
+{
+	unsigned char tmp;
+	cv->fromBuffer(tmp);
+	m_content = (PackageType) tmp;
+	cv->fromBuffer<short>(m_objects);
+	cv->fromBuffer<short>(m_projectiles);	
+	cv->fromBuffer<short>(m_items);
+	cv->fromBuffer<short>(m_drop_items);
+	cv->fromBuffer<bool>(m_chatmessage);
+	cv->fromBuffer<bool>(m_trade);
+	cv->fromBuffer<short>(m_detailed_item);
+	
+	
+}
+	
+	
+void ClientHeader::toString(CharConv* cv)
+{
+	cv->toBuffer<unsigned char>((unsigned char) m_content);
+	cv->toBuffer(m_chatmessage);
+	
+}
+
+
+void ClientHeader::fromString(CharConv* cv)
+{
+	unsigned char tmp;
+	cv->fromBuffer(tmp);
+	m_content = (PackageType) tmp;
+	cv->fromBuffer<bool>(m_chatmessage);
+	
+}
+
+void ClientCommand::toString(CharConv* cv)
+{
+	cv->toBuffer<char>((char) m_button);
+	cv->toBuffer<short>((short) m_action);
+	cv->toBuffer(m_coordinate_x);
+	cv->toBuffer(m_coordinate_y);
+	cv->toBuffer(m_id);
+	cv->toBuffer(m_number);
+	cv->toBuffer<short>(m_direction);
+	
+}
+
+
+void ClientCommand::fromString(CharConv* cv)
+{
+	char ctmp;
+	short tmp;
+	cv->fromBuffer<char>(ctmp);
+	m_button = (Button) ctmp;
+	cv->fromBuffer<short>(tmp);
+	m_action = (Action::ActionType) tmp;
+	cv->fromBuffer<float>(m_coordinate_x);
+	cv->fromBuffer<float>(m_coordinate_y);
+	cv->fromBuffer<int>(m_id);
+	cv->fromBuffer<int>(m_number);
+	cv->fromBuffer<short>(m_direction );
+	
+}
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/networkstruct.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,328 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Daniel Erler, Michael Kempf
+
+	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.
+*/
+
+/**
+ * \file clientstructures.h
+ * \defgroup clientstructures \ Strukturen zur Netzwerk&uuml;bertragung
+ * \author Hans Wulf
+ * \version 1.0
+ * \date 2007-05-31
+ * \brief Pakete bei Netzwerk&uuml;bertragung
+ * \note Definiert mittels den Strukturen Chatmessage, ClientCommand, ClientItem und ClientWorldObject den Aufbau der Datenpakete, die zwischen Server und Client &uuml;bertragen werden
+ */
+#ifndef NETWORKSTRUCT_H
+#define NETWORKSTRUCT_H
+
+#include "network.h"
+#include "action.h"
+#include "worldobject.h"
+
+/**
+ * \enum PackageType
+ * \brief Zaehlt die verschiedenen Arten von Netzwerkpaketen auf
+ */
+enum PackageType
+{
+	/**
+	 * \brief Anfrage des Clients an den Server
+	 */
+	PTYPE_C2S_REQUEST =ID_USER_PACKET_ENUM,
+ 
+ /**
+  * \brief Antwort des Servers auf eine Anfrage des Clients
+  */
+	PTYPE_S2C_RESPONSE ,
+ 
+ /**
+  * \brief Savegame vom Server an den Client
+  */
+	PTYPE_S2C_SAVEGAME ,
+ 
+ 	/**
+  	* \brief Savegame vom Client an den Server
+  	*/
+ 	PTYPE_C2S_SAVEGAME ,
+ 
+ /**
+  * \brief Normale Daten vom Server zum Client
+  */
+	PTYPE_S2C_DATA ,
+ 
+ /**
+  * \brief Normale daten vom Client zum Server
+  */
+	PTYPE_C2S_DATA,
+ 
+ /**
+  * \brief Detailierte Daten zu einem Item vom Server zum Client
+  */
+	PTYPE_S2C_ITEM ,
+ 
+  /**
+  * \brief Detailierte Daten zum Schaden einer Faehigkeit vom Server zum Client
+	*/
+ PTYPE_S2C_DAMAGE ,
+ 
+ /**
+  * \brief Daten zu einer Region (feste Objekte und Untergrund)
+  */
+ PTYPE_S2C_REGION ,
+};
+	
+	
+
+/**
+ * \enum Button
+ * \brief Zählt alle Möglichkeiten auf, wie der Anwender durch Mausklicks oder das Drücken von Buttons Aktionen auslösen kann
+ */
+enum Button
+{
+	/**
+	 * \brief Eingabe durch Klicken mit linker Maustaste ins Spielfeld
+	 */
+	LEFT_MOUSE_BUTTON =0,
+
+ 	/**
+ 	 * \brief Eingabe durch Klicken mit linker Maustaste und Shift ins Spielfeld
+ 	 */
+ 	LEFT_SHIFT_MOUSE_BUTTON =1,
+  
+ 	 /**
+	* \brief Eingabe durch Klicken mit rechter Maustaste und Shift ins Spielfeld
+	*/
+  	RIGHT_MOUSE_BUTTON =2,
+  
+
+	/**
+	 * \brief Eingabe durch Speichern+Beenden Schaltfläche oder Schliessen-Kreuz
+	 */
+	BUTTON_SAVE_QUIT =3,
+	
+	BUTTON_PARTY_APPLY =4,
+ 
+	BUTTON_PARTY_ACCEPT =5,
+		
+	BUTTON_SET_LEFT_ACTION =6,
+ 
+	BUTTON_SET_RIGHT_ACTION=7,
+ 
+	BUTTON_ITEM_LEFT=8,
+	
+	BUTTON_ITEM_RIGHT=9,
+ 
+	BUTTON_SWAP_EQUIP = 10,
+ 
+	REQUEST_DETAILED_ITEM = 11,
+ 
+	REQUEST_ABILITY_DAMAGE=12,
+ 
+	BUTTON_INCREASE_ATTRIBUTE=13,
+ 
+	BUTTON_LEARN_ABILITY = 14,
+ 
+	DROP_ITEM = 20,
+ 
+	DEBUG_SIGNAL=100,
+};
+
+
+/**
+ * \struct ClientCommand
+ * \brief Datenpaket, das ein Kommando des Anwenders enthält (Struktur)
+ *
+ * Sämtliche Anweisungen des Nutzers werden auf diese Weise vom Client zum Server übertragen.
+ */
+struct ClientCommand
+{
+	/**
+	 * \var m_button;
+	 * \brief Gibt den angelickten Button an
+	 */
+	Button m_button;
+	
+	/**
+	 * \var Action::ActionType m_action
+	 * \brief Action die ausgefuehrt werden soll
+	 */
+	
+	Action::ActionType m_action;
+	
+	
+	/**
+	 * \var m_coordinate_x;
+	 * \brief Gibt x-Koordinate an, auf die der Spieler gelickt hat
+	 */
+	float m_coordinate_x;
+	/**
+	 * \var m_coordinate_y;
+	 * \brief Gibt y-Koordinate an, auf die der Spieler gelickt hat
+	 */
+	float m_coordinate_y;
+	/**
+	 * \var m_id;
+	 * \brief Gibt Typ des Gegenstands an, falls die Aktionen einen Gegenstand betrifft Gibt Id des ZielObjekts an, wenn die Aktion ein Objekt betrifft
+	 */
+	int m_id;
+	/**
+	 * \var m_number;
+		 * \brief Gibt Anzahl der Gegenst&auml;nde an, falls die Aktionen einen Gegenstand betrifft 
+	 */
+	int m_number;
+	/**
+	 * \var m_direction;
+	 * \brief Gibt an, in welche Richtung ein Gegenstand verschoben wird, wenn die Aktion einen Handel betrifft
+	 */
+	short m_direction;
+	
+	/**
+	 * \fn void toString(char* buf)
+	 * \brief Konvertiert das Objekt in einen String und schreibt ihn in der Puffer
+	 * \param buf Ausgabepuffer
+	 * \return Zeiger hinter den beschriebenen Datenbereich
+	 */
+	virtual void toString(CharConv* cv);
+			
+			
+	/**
+	 * \fn void fromString(char* buf)
+	 * \brief Erzeugt das Objekt aus einem String
+	 * \param buf Objekt als String
+	 * \return Zeiger hinter den gelesenen Datenbereich
+	 */
+	virtual void fromString(CharConv* cv);
+};
+
+/**
+ * \enum ItemLocation
+ * \brief Zählt alle möglichen Positionen auf, an denen sich ein beim Client angezeigter Gegenstand befinden kann: Im Inventar des Spielers, im Angebot des Spielers für einen Handel, im Inventar des Handelspartners, im Angebot des Handelspartner, sowie in der Hand beziehungsweise am Körper, wenn der Gegenstand gerade benutzt wird.
+ */
+enum ItemLocation
+{
+	LOCATION_INVENTORY=1,
+	LOCATION_OFFER=2,
+	LOCATION_TRADER_INVENTORY=3,
+	LOCATION_TRADER_OFFER=4,
+	LOCATION_RIGHT_HAND=5,
+	LOCATION_BODY_LOCATION=6,
+	LOCATION_LEFT_HAND=7
+};
+
+
+
+struct ServerHeader
+{
+	/**
+	 * \var PackageType m_content
+	 * \brief Art der Nachricht
+	 */
+	PackageType m_content;
+	
+	/**
+	 * \var short m_objects
+	 * \brief Anzahl der enthaltenen Objekte
+	 */
+	short m_objects;
+	
+	/**
+	 * \var short m_projectiles
+	 * \brief Anzahl der Geschosse
+	 */
+	short m_projectiles;
+	
+	/**
+	 * \var short m_items
+	 * \brief Anzahl der enthaltenen Gegenstaende
+	 */
+	short m_items;
+	
+	/**
+	 * \var short m_drop_items
+	 * \brief Anzahl am Boden liegender Gegenstaende
+	 */
+	short m_drop_items;
+	
+	/**
+	 * \var bool m_chatmessage
+	 * \brief true, wenn die Nachricht eine Chatnachricht ist
+	 */
+	bool m_chatmessage;
+	
+	/**
+	 * \var bool m_trade
+	 * \brief true, wenn Handelsinformationen enthalten sind
+	 */
+	bool m_trade;
+	
+	/**
+	 * \var short m_detailed_item
+	 * \brief ID des mit detaillierten Informationen uebertragenen Items (wenn kein Item detailliert gesendet wird gleich 0 )
+	 */
+	short m_detailed_item;
+	
+	/**
+	 * \fn void toString(CharConv* cv)
+	 * \brief Konvertiert das Objekt in einen String und schreibt ihn in der Puffer
+	 * \param buf Ausgabepuffer
+	 * \return Zeiger hinter den beschriebenen Datenbereich
+	 */
+	virtual void toString(CharConv* cv);
+			
+			
+	/**
+	 * \fn void fromString(CharConv* cv)
+	 * \brief Erzeugt das Objekt aus einem String
+	 * \param buf Objekt als String
+	 * \return Zeiger hinter den gelesenen Datenbereich
+	 */
+	virtual void fromString(CharConv* cv);
+};
+	
+struct ClientHeader
+{
+	/**
+	 * \var PackageType m_content
+	 * \brief Art der Nachricht
+	 */
+	PackageType m_content;
+	
+	/**
+	 * \var bool m_chatmessage
+	 * \brief true, wenn die Nachricht eine Chatnachricht ist
+	 */
+	bool m_chatmessage;
+	
+	/**
+	 * \fn void toString(CharConv* cv)
+	 * \brief Konvertiert das Objekt in einen String und schreibt ihn in der Puffer
+	 * \param buf Ausgabepuffer
+	 * \return Zeiger hinter den beschriebenen Datenbereich
+	 */
+	virtual void toString(CharConv* cv);
+			
+			
+	/**
+	 * \fn void fromString(CharConv* cv)
+	 * \brief Erzeugt das Objekt aus einem String
+	 * \param buf Objekt als String
+	 * \return Zeiger hinter den gelesenen Datenbereich
+	 */
+	virtual void fromString(CharConv* cv);
+};
+	
+#endif //NETWORKSTRUCT_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/objectfactory.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,293 @@
+#include "objectfactory.h"
+
+#include "warrior.h"
+#include "mage.h"
+#include "archer.h"
+#include "priest.h"
+#include "fixedobject.h"
+#include "monster.h"
+#include "goblin.h"
+
+#define USE_OBJECTLOADER
+
+
+World* ObjectFactory::m_world;
+
+map<WorldObject::TypeInfo::ObjectSubtype, MonsterBasicData*> ObjectFactory::m_monster_data;
+
+void ObjectFactory::registerMonster(WorldObject::TypeInfo::ObjectSubtype subtype, MonsterBasicData* data)
+{
+	DEBUG("registered monster for subtype %s",subtype.c_str());
+	m_monster_data.insert(make_pair(subtype,data));
+}
+
+void ObjectFactory::init()
+{
+	MonsterBasicData* mdata;
+	int i;
+	float p[4];
+	
+#ifdef USE_OBJECTLOADER
+	// Objekte bzw. Monster aus XML Laden
+	ObjectLoader* objectloader = 0;
+	objectloader = new ObjectLoader;
+	list<MonsterBasicData*>* monster_list;
+	monster_list = objectloader->loadObjects("../../data/monsters.xml");
+	
+	if (monster_list != 0)
+	{
+		list<MonsterBasicData*>::iterator forward_iterator = monster_list->begin();
+		while (forward_iterator != monster_list->end())
+		{
+			/*cout << "> > >  Testwert: " << (*forward_iterator)->m_base_attr.m_abilities[0] << "  < < <" << endl;
+			if ((*forward_iterator)->m_base_attr.m_abilities[0] == 0xf1f)
+				cout << "Wert stimmt ueberein" << endl;
+			else
+				cout << "Wert ist falsch" << endl;*/
+			// FIXME WorldObject::TypeInfo::SUBTYPE_GOBLIN  soll von loadObjects zurueckgegeben werden
+			registerMonster("goblin", *forward_iterator);
+			//registerMonster(WorldObject::TypeInfo::SUBTYPE_GOBLIN, *forward_iterator);
+			*forward_iterator++;
+		}
+	}
+	
+	delete objectloader;
+#endif
+
+#ifndef USE_OBJECTLOADER
+	// Goblin
+	mdata = new MonsterBasicData;
+
+	// Goblin Type Informationen
+	mdata->m_type_info.m_type = WorldObject::TypeInfo::TYPE_MONSTER;
+	mdata->m_type_info.m_subtype = "goblin";
+	mdata->m_type_info.m_fraction = WorldObject::TypeInfo::FRAC_MONSTER;
+	mdata->m_type_info.m_category = WorldObject::TypeInfo::GOBLIN;
+
+	// Goblin Drop Informationen
+	p[0] = 0.1; p[1] = 0.2; p[2] = 0.2; p[3] = 0.2;
+	mdata->m_drop_slots[0].init(p, 0,20, 0.3, 500);
+	mdata->m_drop_slots[1].init(p,0, 10, 0.3, 1000);
+
+	// Goblin Attribut werte
+	mdata->m_base_attr.m_max_experience = 100000;
+	mdata->m_base_attr.m_level =1;
+	mdata->m_base_attr.m_max_health = 150;
+	mdata->m_base_attr.m_armor = 10;
+	mdata->m_base_attr.m_block=0;
+	mdata->m_base_attr.m_attack = 10;
+	mdata->m_base_attr.m_strength = 15;
+	mdata->m_base_attr.m_dexterity = 10;
+	mdata->m_base_attr.m_magic_power = 5;
+	mdata->m_base_attr.m_willpower = 10;
+	mdata->m_base_attr.m_resistances[Damage::PHYSICAL] =0;
+	mdata->m_base_attr.m_resistances[Damage::AIR] =0;
+	mdata->m_base_attr.m_resistances[Damage::ICE] =0;
+	mdata->m_base_attr.m_resistances[Damage::FIRE] =0;
+	mdata->m_base_attr.m_resistances_cap[Damage::PHYSICAL] =50;
+	mdata->m_base_attr.m_resistances_cap[Damage::AIR] =50;
+	mdata->m_base_attr.m_resistances_cap[Damage::ICE] =50;
+	mdata->m_base_attr.m_resistances_cap[Damage::FIRE] =50;
+	mdata->m_base_attr.m_walk_speed = 2000;
+	mdata->m_base_attr.m_attack_speed=1500;
+	mdata->m_base_attr.m_step_length = 0.5;
+	for (i=0;i<6;i++)
+		mdata->m_base_attr.m_abilities[i]=0;
+
+	mdata->m_base_attr.m_abilities[0] = 0xf1f;
+	mdata->m_base_attr.m_attack_range =1;
+	mdata->m_base_attr.m_special_flags=0;
+	mdata->m_base_attr.m_immunity =0;
+
+	// Goblin Geometrie Informationen
+	mdata->m_layer = (WorldObject::Geometry::LAYER_BASE | WorldObject::Geometry::LAYER_AIR)
+	mdata->m_radius = 0.5;
+
+	// Goblin AI Informationen
+	mdata->m_ai_sight_range = 8;
+
+	registerMonster("goblin",mdata);
+#endif
+
+	// Lich
+	mdata = new MonsterBasicData;
+
+	// Lich Type Informationen
+	mdata->m_type_info.m_type = WorldObject::TypeInfo::TYPE_MONSTER;
+	mdata->m_type_info.m_subtype = "lich";
+	mdata->m_type_info.m_fraction = WorldObject::TypeInfo::FRAC_UNDEAD;
+	mdata->m_type_info.m_category = WorldObject::TypeInfo::UNDEAD;
+
+	// Lich Drop Informationen
+	p[0] = 0.1; p[1] = 0.2; p[2] = 0.2; p[3] = 0.2;
+	mdata->m_drop_slots[0].init(p, 10,40, 0.5,1000);
+	mdata->m_drop_slots[1].init(p,0, 20, 0.5, 1000);
+
+	// Lich Attribut werte
+	mdata->m_base_attr.m_max_experience = 100000;
+	mdata->m_base_attr.m_level =1;
+	mdata->m_base_attr.m_max_health = 250;
+	mdata->m_base_attr.m_armor = 20;
+	mdata->m_base_attr.m_block=0;
+	mdata->m_base_attr.m_attack = 20;
+	mdata->m_base_attr.m_strength = 25;
+	mdata->m_base_attr.m_dexterity = 10;
+	mdata->m_base_attr.m_magic_power = 5;
+	mdata->m_base_attr.m_willpower = 20;
+	mdata->m_base_attr.m_resistances[Damage::PHYSICAL] =30;
+	mdata->m_base_attr.m_resistances[Damage::AIR] =0;
+	mdata->m_base_attr.m_resistances[Damage::ICE] =50;
+	mdata->m_base_attr.m_resistances[Damage::FIRE] =-50;
+	mdata->m_base_attr.m_resistances_cap[Damage::PHYSICAL] =50;
+	mdata->m_base_attr.m_resistances_cap[Damage::AIR] =50;
+	mdata->m_base_attr.m_resistances_cap[Damage::ICE] =50;
+	mdata->m_base_attr.m_resistances_cap[Damage::FIRE] =50;
+	mdata->m_base_attr.m_walk_speed = 1500;
+	mdata->m_base_attr.m_attack_speed=1000;
+	mdata->m_base_attr.m_step_length = 1.0;
+	for (i=0;i<6;i++)
+		mdata->m_base_attr.m_abilities[i]=0;
+
+	mdata->m_base_attr.m_abilities[0] = 0xf1f;
+	mdata->m_base_attr.m_abilities[3] = 0x100;
+	mdata->m_base_attr.m_attack_range =2;
+	mdata->m_base_attr.m_special_flags=0;
+	mdata->m_base_attr.m_immunity =0xa;
+
+	// Lich Geometrie Informationen
+	mdata->m_layer = (WorldObject::Geometry::LAYER_BASE | WorldObject::Geometry::LAYER_AIR);
+	mdata->m_radius = 1.0;
+
+	// Lich AI Informationen
+	mdata->m_ai_sight_range = 8;
+
+	registerMonster("lich",mdata);
+
+
+	// Goblin dog
+	mdata = new MonsterBasicData;
+
+	// Goblin dog Informationen
+	mdata->m_type_info.m_type = WorldObject::TypeInfo::TYPE_MONSTER;
+	mdata->m_type_info.m_subtype ="gob_dog";
+	mdata->m_type_info.m_fraction = WorldObject::TypeInfo::FRAC_MONSTER;
+	mdata->m_type_info.m_category = WorldObject::TypeInfo::ANIMAL;
+
+	// Goblin dog Drop Informationen
+	p[0] = 0.1; p[1] = 0.2; p[2] = 0.2; p[3] = 0.2;
+	mdata->m_drop_slots[0].init(p, 10,40, 0.5,1000);
+	mdata->m_drop_slots[1].init(p,0, 20, 0.5, 1000);
+
+	// Goblin dog Attribut werte
+	mdata->m_base_attr.m_max_experience = 100000;
+	mdata->m_base_attr.m_level =1;
+	mdata->m_base_attr.m_max_health = 100;
+	mdata->m_base_attr.m_armor = 10;
+	mdata->m_base_attr.m_block=0;
+	mdata->m_base_attr.m_attack = 20;
+	mdata->m_base_attr.m_strength = 10;
+	mdata->m_base_attr.m_dexterity = 20;
+	mdata->m_base_attr.m_magic_power = 5;
+	mdata->m_base_attr.m_willpower = 10;
+	mdata->m_base_attr.m_resistances[Damage::PHYSICAL] =0;
+	mdata->m_base_attr.m_resistances[Damage::AIR] =0;
+	mdata->m_base_attr.m_resistances[Damage::ICE] =10;
+	mdata->m_base_attr.m_resistances[Damage::FIRE] =0;
+	mdata->m_base_attr.m_resistances_cap[Damage::PHYSICAL] =50;
+	mdata->m_base_attr.m_resistances_cap[Damage::AIR] =50;
+	mdata->m_base_attr.m_resistances_cap[Damage::ICE] =50;
+	mdata->m_base_attr.m_resistances_cap[Damage::FIRE] =50;
+	mdata->m_base_attr.m_walk_speed = 2500;
+	mdata->m_base_attr.m_attack_speed=2000;
+	mdata->m_base_attr.m_step_length = 0.5;
+	for (i=0;i<6;i++)
+		mdata->m_base_attr.m_abilities[i]=0;
+
+	mdata->m_base_attr.m_abilities[0] = 0xf1f;
+	mdata->m_base_attr.m_attack_range =0.5;
+	mdata->m_base_attr.m_special_flags=0;
+	mdata->m_base_attr.m_immunity =0;
+
+	// Goblin dogGeometrie Informationen
+	mdata->m_layer = (WorldObject::Geometry::LAYER_BASE | WorldObject::Geometry::LAYER_AIR);
+	mdata->m_radius = 0.5;
+
+	// Goblin dog AI Informationen
+	mdata->m_ai_sight_range = 8;
+
+	registerMonster("gob_dog",mdata);
+}
+
+ServerWObject* ObjectFactory::createObject(WorldObject::TypeInfo::ObjectType type, WorldObject::TypeInfo::ObjectSubtype subtype)
+{
+	// Zeiger auf erzeugtes Objekt
+	ServerWObject* ret=0;
+
+	// ID des Objektes
+	int id = m_world->getValidId();
+	if (type ==WorldObject::TypeInfo::TYPE_PLAYER)
+	{
+		if (subtype == "warrior")
+		{
+			ret = new Warrior( m_world, id );
+		}
+		else if (subtype == "mage")
+		{
+			ret = new Mage( m_world, id );
+		}
+		else if (subtype == "archer")
+		{
+			ret = new Archer( m_world, id );
+		}
+		else if(subtype == "priest")
+		{
+			ret = new Priest( m_world, id );				
+		}
+	}
+	else if (type ==WorldObject::TypeInfo::TYPE_MONSTER)
+	{
+		DEBUG5("requested subtype: %s",subtype.c_str());
+		MonsterBasicData* mdata;
+		map<WorldObject::TypeInfo::ObjectSubtype, MonsterBasicData*>::iterator i;
+
+		i = m_monster_data.find(subtype);
+		if (i== m_monster_data.end())
+		{
+			ERRORMSG("subtype not found: %s",subtype.c_str());
+			i = m_monster_data.find("goblin");
+		}
+		mdata = i->second;
+		ret = new Monster(m_world, id,*mdata);
+		DEBUG5("Monster created");
+	}
+	else if (type ==WorldObject::TypeInfo::TYPE_FIXED_OBJECT)
+	{
+		WorldObject::Geometry* wob;
+		Shape* sp;
+		DEBUG("create fixed object: %s",subtype.c_str());
+		ret = new FixedObject(m_world,id,subtype);
+
+		wob=ret->getGeometry();
+		sp=&(wob->m_shape);
+		wob->m_angle =0;
+
+		ret->setState(WorldObject::STATE_STATIC);
+		wob->m_layer = (WorldObject::Geometry::LAYER_BASE | WorldObject::Geometry::LAYER_AIR);
+
+		if (subtype =="fence")
+		{
+			sp->m_type = Shape::RECT;
+			sp->m_extent_x = 0.3;
+			sp->m_extent_y = 2.5;
+		}
+		else if (subtype =="tree")
+		{
+			
+				sp->m_type = Shape::CIRCLE;
+				sp->m_radius = 2.8;
+		}
+	}
+	return ret;
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/objectfactory.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,62 @@
+#ifndef OBJECTFACTORY_H
+#define OBJECTFACTORY_H
+
+
+
+#include <map>
+#include "monsterbase.h"
+#include "objectloader.h"
+
+#include "../tinyxml/tinyxml.h"
+#include <string>
+#include <list>
+using namespace std;
+
+class World;
+
+/**
+ * \class ObjectFactory
+ * \brief Erzeugt Objekte vom Typ ServerWObject
+ */
+class ObjectFactory
+{
+	public:
+		
+	/**
+	 * \fn static ServerWObject* createObject(WorldObject::TypeInfo::ObjectType type, WorldObject::TypeInfo::ObjectSubtype subtype)
+	 * \brief Erzeugt ein Objekt des angefordertens Typs/Subtyps
+	 */
+		static ServerWObject* createObject(WorldObject::TypeInfo::ObjectType type, WorldObject::TypeInfo::ObjectSubtype subtype);
+	
+	/**
+	 * \var static World* m_world
+	 * \brief Welt in fuer die die Objekte generiert werden
+	 */
+	static World* m_world;
+		
+	/**
+	 * \var static map<WorldObject::TypeInfo::ObjectSubtype, MonsterBasicData*> m_monster_data
+	 * \brief Basisdaten zu den Monstern
+	 */
+	static map<WorldObject::TypeInfo::ObjectSubtype, MonsterBasicData*> m_monster_data;
+	
+	/**
+	 * \fn static init()
+	 * \brief registriert die Daten der Monster
+	 */
+	static void init();
+	
+	/**
+	 * \fn static registerMonster(WorldObject::TypeInfo::ObjectSubtype subtype, MonsterBasicData* data)
+	 * \brief Registriert die Daten fuer ein bestimmten Monstertyp
+	 * \param subtyp Subtyp des Monsters
+	 * \param data Daten des Monsters
+	 */
+	static void registerMonster(WorldObject::TypeInfo::ObjectSubtype subtype, MonsterBasicData* data);
+};
+
+
+#include "world.h"
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/objectloader.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,325 @@
+#include "objectloader.h"
+
+#include "warrior.h"
+#include "mage.h"
+#include "archer.h"
+#include "priest.h"
+#include "fixedobject.h"
+#include "monster.h"
+#include "goblin.h"
+
+
+int ObjectLoader::generateObjects(TiXmlElement* pElement, string element)
+{
+	if ( !pElement ) return 0;
+	
+	TiXmlAttribute* pAttrib=pElement->FirstAttribute();
+	int i=0;
+	int ival;
+	double dval;
+	
+	if (element == "Monster" && pAttrib)
+	{
+		if (m_monster_data == 0)
+		{
+			m_monster_data = new MonsterBasicData;
+			m_monster_data->m_layer = (WorldObject::Geometry::LAYER_BASE | WorldObject::Geometry::LAYER_AIR);
+		}
+		
+		while (element == "Monster" && pAttrib)
+		{
+			if (!strcmp(pAttrib->Name(), "type"))
+			{
+				if (!strcmp(pAttrib->Value(), "MONSTER"))
+					m_monster_data->m_type_info.m_type = WorldObject::TypeInfo::TYPE_MONSTER;
+			}
+			else if (!strcmp(pAttrib->Name(), "subtype"))
+			{
+				if (!strcmp(pAttrib->Value(), "GOBLIN"))
+					m_monster_data->m_type_info.m_subtype = "goblin";
+					//m_monster_data->m_type_info.m_subtype = WorldObject::TypeInfo::SUBTYPE_GOBLIN;
+			}
+			else if (!strcmp(pAttrib->Name(), "fraction"))
+			{
+				if (!strcmp(pAttrib->Value(), "MONSTER"))
+					m_monster_data->m_type_info.m_fraction = WorldObject::TypeInfo::FRAC_MONSTER;
+			}
+			else if (!strcmp(pAttrib->Name(), "category"))
+			{
+				if (!strcmp(pAttrib->Value(), "GOBLIN"))
+					m_monster_data->m_type_info.m_category = WorldObject::TypeInfo::GOBLIN;
+			}
+			
+			i++;
+			pAttrib=pAttrib->Next();
+		}
+	}
+	
+	if (element == "Dropslots" && pAttrib)
+	{
+		while (element == "Dropslots" && pAttrib)
+		{
+			if (!strcmp(pAttrib->Name(), "p0") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+				m_size_prob[0] = static_cast<float>(dval);
+			else if (!strcmp(pAttrib->Name(), "p1") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+				m_size_prob[1] = static_cast<float>(dval);
+			else if (!strcmp(pAttrib->Name(), "p2") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+				m_size_prob[2] = static_cast<float>(dval);
+			else if (!strcmp(pAttrib->Name(), "p3") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+				m_size_prob[3] = static_cast<float>(dval);
+			
+			i++;
+			pAttrib=pAttrib->Next();
+		}
+	}
+	
+	if (element == "Dropslot0" && pAttrib)
+	{
+		while (element == "Dropslot0" && pAttrib)
+		{
+			if (!strcmp(pAttrib->Name(), "min_level") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_min_level[0] = ival;
+			else if (!strcmp(pAttrib->Name(), "max_level") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_max_level[0] = ival;
+			else if (!strcmp(pAttrib->Name(), "magic_prob") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+				m_magic_prob[0] = static_cast<float>(dval);
+			else if (!strcmp(pAttrib->Name(), "magic_power") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+				m_magic_power[0] = static_cast<float>(dval);
+			
+			i++;
+			pAttrib=pAttrib->Next();
+		}
+	}
+	
+	if (element == "Dropslot1" && pAttrib)
+	{
+		while (element == "Dropslot1" && pAttrib)
+		{
+			if (!strcmp(pAttrib->Name(), "min_level") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_min_level[1] = ival;
+			else if (!strcmp(pAttrib->Name(), "max_level") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_max_level[1] = ival;
+			else if (!strcmp(pAttrib->Name(), "magic_prob") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+				m_magic_prob[1] = static_cast<float>(dval);
+			else if (!strcmp(pAttrib->Name(), "magic_power") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+				m_magic_power[1] = static_cast<float>(dval);
+			
+			i++;
+			pAttrib=pAttrib->Next();
+		}
+	}
+	
+	if (element == "BasicAttributes" && pAttrib)
+	{
+		for (int k=0; k<6; k++)
+			m_monster_data->m_base_attr.m_abilities[k]=0;
+		
+		while (element == "BasicAttributes" && pAttrib)
+		{
+			/*printf( "%s: value=[%s]", pAttrib->Name(), pAttrib->Value());*/
+			
+			/*cout << "<<< " << element << " >>>" << endl;
+			if (pAttrib)
+				cout << "+++ " << pAttrib->Name() << " +++" << endl;*/
+			
+			if (!strcmp(pAttrib->Name(), "max_experience") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_max_experience = static_cast<float>(dval);
+			else if (!strcmp(pAttrib->Name(), "level") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_level = static_cast<char>(ival);
+			else if (!strcmp(pAttrib->Name(), "max_health") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_max_health = static_cast<float>(dval);
+			else if (!strcmp(pAttrib->Name(), "armor") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_armor = static_cast<short>(ival);
+			else if (!strcmp(pAttrib->Name(), "block") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_block = static_cast<short>(ival);
+			else if (!strcmp(pAttrib->Name(), "attack") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_attack = static_cast<short>(ival);
+			else if (!strcmp(pAttrib->Name(), "strength") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_strength = static_cast<short>(ival);
+			else if (!strcmp(pAttrib->Name(), "dexterity") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_dexterity = static_cast<short>(ival);
+			else if (!strcmp(pAttrib->Name(), "magic_power") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_magic_power = static_cast<short>(ival);
+			else if (!strcmp(pAttrib->Name(), "willpower") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_willpower = static_cast<short>(ival);
+			else if (!strcmp(pAttrib->Name(), "resistances_physical") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_resistances[Damage::PHYSICAL] = static_cast<short>(ival);
+			else if (!strcmp(pAttrib->Name(), "resistances_air") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_resistances[Damage::AIR] = static_cast<short>(ival);
+			else if (!strcmp(pAttrib->Name(), "resistances_ice") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_resistances[Damage::ICE] = static_cast<short>(ival);
+			else if (!strcmp(pAttrib->Name(), "resistances_fire") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_resistances[Damage::FIRE] = static_cast<short>(ival);
+			else if (!strcmp(pAttrib->Name(), "resistances_cap_physical") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_resistances_cap[Damage::PHYSICAL] = static_cast<short>(ival);
+			else if (!strcmp(pAttrib->Name(), "resistances_cap_air") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_resistances_cap[Damage::AIR] = static_cast<short>(ival);
+			else if (!strcmp(pAttrib->Name(), "resistances_cap_ice") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_resistances_cap[Damage::ICE] = static_cast<short>(ival);
+			else if (!strcmp(pAttrib->Name(), "resistances_cap_fire") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_resistances_cap[Damage::FIRE] = static_cast<short>(ival);
+			else if (!strcmp(pAttrib->Name(), "walk_speed") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_walk_speed = static_cast<short>(ival);
+			else if (!strcmp(pAttrib->Name(), "attack_speed") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_attack_speed = static_cast<short>(ival);
+			else if (!strcmp(pAttrib->Name(), "step_length") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_step_length = static_cast<float>(dval);
+			else if (!strcmp(pAttrib->Name(), "abilities0") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_abilities[0] = ival;
+			else if (!strcmp(pAttrib->Name(), "abilities1") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_abilities[1] = ival;
+			else if (!strcmp(pAttrib->Name(), "abilities2") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_abilities[2] = ival;
+			else if (!strcmp(pAttrib->Name(), "abilities3") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_abilities[3] = ival;
+			else if (!strcmp(pAttrib->Name(), "abilities4") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_abilities[4] = ival;
+			else if (!strcmp(pAttrib->Name(), "abilities5") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_abilities[5] = ival;
+			else if (!strcmp(pAttrib->Name(), "attack_range") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_attack_range = static_cast<float>(dval);
+			else if (!strcmp(pAttrib->Name(), "special_flags") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_special_flags = ival;
+			else if (!strcmp(pAttrib->Name(), "immunity") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+				m_monster_data->m_base_attr.m_immunity = static_cast<char>(ival);
+			/*
+			else if (!strcmp(pAttrib->Name(), "ability") && pAttrib->QueryIntValue(&ival) == TIXML_SUCCESS)
+			{
+				// Enum name der Aktion
+				std::string aname = pAttrib->Name();
+				
+				// Suche in der Liste der registrierten Aktionen
+				map<std::string, Action::ActionType>::iterator it;
+				it = Action::m_enum_string_to_type.find(aname);
+				
+				if (it != Action::m_enum_string_to_type.end())
+				{
+					// in der Liste gefunden
+					// Nummer der Aktion
+					int anr =it->second;
+					// Bit setzen
+					m_monster_data->m_base_attr.m_abilities[anr /32] |= (1 << (anr %32));
+					
+				}
+			}
+			*/
+			
+			i++;
+			pAttrib=pAttrib->Next();
+		}
+	}
+	
+	if (element == "Geometry" && pAttrib)
+	{
+		while (element == "Geometry" && pAttrib)
+		{
+			if (!strcmp(pAttrib->Name(), "radius") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+				m_monster_data->m_radius = static_cast<float>(dval);
+			
+			i++;
+			pAttrib=pAttrib->Next();
+		}
+	}
+	
+	if (element == "AI" && pAttrib)
+	{
+		while (element == "AI" && pAttrib)
+		{
+			if (!strcmp(pAttrib->Name(), "ai_sight_range") && pAttrib->QueryDoubleValue(&dval) == TIXML_SUCCESS)
+				m_monster_data->m_ai_sight_range = static_cast<float>(dval);
+			
+			i++;
+			pAttrib=pAttrib->Next();
+		}
+	}
+	
+	return i;
+}
+
+
+void ObjectLoader::searchXml(TiXmlNode* pParent)
+{
+	if ( !pParent ) return;
+	
+	TiXmlNode* pChild;
+	TiXmlText* pText;
+	
+	int t = pParent->Type();
+	int num;
+	
+	switch ( t )
+	{
+	case TiXmlNode::ELEMENT:
+		//printf( "Element [%s]", pParent->Value() );
+		num = generateObjects(pParent->ToElement(), pParent->Value());
+		/*switch(num)
+		{
+			case 0:  printf( " (No attributes)"); break;
+			case 1:  printf( "%s1 attribute", getIndentAlt(indent)); break;
+			default: printf( "%s%d attributes", getIndentAlt(indent), num); break;
+		}*/
+		break;
+	/*
+	case TiXmlNode::TEXT:
+		pText = pParent->ToText();
+		printf( "Text: [%s]", pText->Value() );
+		break;
+	*/
+	default:
+		break;
+	}
+	
+	for ( pChild = pParent->FirstChild(); pChild != 0; pChild = pChild->NextSibling())
+	{
+		searchXml(pChild);
+		//DEBUG("Searching Document");
+		//cout << "Immer:  " << pChild->Value() << endl;
+		//if (pChild->Type() == TiXmlNode::ELEMENT)
+			//cout << "Element:" << pChild->Value() << endl;
+		if ( !strcmp(pChild->Value(), "Monster") && pChild->Type() == TiXmlNode::ELEMENT) //|| pChild->NextSibling() == 0) || monster_data == 0)
+		{
+			m_monster_data->m_drop_slots[0].init(m_size_prob, m_min_level[0], m_max_level[0], m_magic_prob[0], m_magic_power[0]);
+			m_monster_data->m_drop_slots[1].init(m_size_prob, m_min_level[1], m_max_level[1], m_magic_prob[1], m_magic_power[1]);
+			//registerMonster(WorldObject::TypeInfo::SUBTYPE_GOBLIN, m_monster_data); FIXME
+			m_monster_list->push_back(m_monster_data);
+			m_monster_data = 0;
+			DEBUG("Object loaded");
+		}
+	}
+}
+
+
+list<MonsterBasicData*>* ObjectLoader::loadObjects(const char* pFilename) // TODO Noch nicht benutzen!
+{
+	for (int i=0; i<4; i++)
+	{
+		m_size_prob[i] = 0.0;
+	}
+	for (int i=0; i<2; i++)
+	{
+		m_min_level[i] = 0;
+		m_max_level[i] = 0;
+		m_magic_prob[i] = 0.0;
+		m_magic_power[i] = 0.0;
+	}
+	m_monster_data = 0;
+	m_monster_list = new list<MonsterBasicData*>;
+	
+	TiXmlDocument doc(pFilename);
+	bool loadOkay = doc.LoadFile();
+	
+	if (loadOkay)
+	{
+		DEBUG("Loading %s", pFilename);
+		searchXml(&doc);
+		DEBUG("Loading %s finished", pFilename);
+		return m_monster_list;
+	}
+	else
+	{
+		DEBUG("Failed to load file %s", pFilename);
+		return 0;
+	}
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/objectloader.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,64 @@
+#ifndef OBJECTLOADER_H
+#define OBJECTLOADER_H
+
+
+#include "world.h"
+#include <map>
+#include <list>
+#include "monsterbase.h"
+
+#include "../tinyxml/tinyxml.h"
+#include <string>
+#include <cstring>
+using namespace std;
+
+
+/**
+ * \class ObjectLoader
+ * \brief Laedt Objecte aus einer XML-Datei
+ */
+class ObjectLoader
+{
+	public:
+	
+	/**
+	 * \fn void loadObjects(const char* pFilename)
+	 * \brief Sorgt fuer das Anlegen von Objekten, die in einer XML-Datei gespeichert sind
+	 * \param pFilename Pfad zu einer XML-Datei, die Objekte enthaelt
+	 * \return Liste der geladenen Items
+	 */
+	list<MonsterBasicData*>* loadObjects(const char* pFilename);
+	
+	
+	private:
+	
+	/**
+	 * \fn int generateObjects(TiXmlElement* pElement, string element)
+	 * \brief Legt Objekte im Speicher anhand von Daten an, die als Parameter uebergeben wurden. Diese Daten stammen aus einer XML-Datei.
+	 * \param pElement Zeiger auf ein Element der XML-Datei
+	 * \param element Name des Elements
+	 * \return Anzahl der Attribute des bearbeiteten Elements
+	 */
+	int generateObjects(TiXmlElement* pElement, string element);
+	
+	/**
+	 * \fn void searchXml( TiXmlNode* pParent )
+	 * \brief Durchmustert eine XML-Datei und sucht nach Elementen.
+	 * \param pParent Zeiger auf eine XML-Datei
+	 */
+	void searchXml(TiXmlNode* pParent);
+	
+	
+	MonsterBasicData* m_monster_data;
+	list<MonsterBasicData*>* m_monster_list;
+	
+	float m_size_prob[4];
+	int m_min_level[2];
+	int m_max_level[2];
+	float m_magic_prob[2];
+	float m_magic_power[2];
+};
+
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/party.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,172 @@
+#include "party.h"
+
+
+void Party::init(char nr_parties, char id)
+{
+	m_members = new int[nr_parties];
+	m_candidates = new int[nr_parties];
+	m_relations = new WorldObject::Relation[nr_parties];
+	int i;
+	for (i=0;i<nr_parties;i++)
+	{
+		m_members[i]=0;
+		m_candidates[i]=0;
+		m_relations[i]=WorldObject::NEUTRAL;
+		//m_relations[i]=WorldObject::HOSTILE;
+	}
+	m_relations[id] = WorldObject::ALLIED;
+	m_nr_parties = nr_parties;
+	m_nr_members =0;
+	m_nr_candidates = 0;
+	m_id = id;
+}
+
+
+Party::~Party()
+{
+	delete[] m_members;
+	delete[] m_candidates;
+	delete[] m_relations;
+}
+
+void Party::clear()
+{
+	int i;
+	m_nr_members =0;
+	m_nr_candidates = 0;
+	for (i=0;i<m_nr_parties;i++)
+	{
+		m_members[i]=0;
+		m_candidates[i]=0;
+		m_relations[i]=WorldObject::NEUTRAL;
+		//m_relations[i]=WorldObject::HOSTILE;
+	}
+	m_relations[m_id] = WorldObject::ALLIED;
+}
+
+void Party::addMember(int id)
+{
+	if (m_nr_members == m_nr_parties)
+	{
+		ERRORMSG("mehr Spieler in der Party als anwesend sein koennen");
+		return;
+	}
+	m_members[m_nr_members] = id;
+	m_nr_members++;
+}
+
+void Party::addCandidate(int id)
+{
+	if (m_nr_candidates == m_nr_parties)
+	{
+		ERRORMSG("mehr Spieler als Bewerber als anwesend sein koennen");
+		return;
+	}
+	m_candidates[m_nr_candidates] = id;
+	m_nr_candidates++;
+}
+
+void Party::removeMember(int id)
+{
+	int i;
+	for (i=0;i<m_nr_members;i++)
+	{
+		if (m_members[i]==id)
+			break;
+	}
+	if (i==m_nr_members)
+	{
+		DEBUG("Spieler nicht in der Party");
+	}
+	else
+	{
+		for (;i<m_nr_members-1;i++)
+		{
+			m_members[i] = m_members[i+1];
+		}
+		m_members[m_nr_members-1]=0;
+		m_nr_members--;
+	}
+}
+
+void Party::removeCandidate(int id)
+{
+	int i;
+	for (i=0;i<m_nr_candidates;i++)
+	{
+		if (m_candidates[i]==id)
+			break;
+	}
+	if (i==m_nr_candidates)
+	{
+		DEBUG("Spieler nicht unter den Bewerbern");
+	}
+	else
+	{
+		for (;i<m_nr_candidates-1;i++)
+		{
+			m_candidates[i] = m_candidates[i+1];
+		}
+		m_candidates[m_nr_candidates-1]=0;
+		m_nr_candidates--;
+	}
+}
+
+
+void Party::acceptCandidate(int id)
+{
+	removeCandidate(id);
+	addMember(id);
+}
+
+void Party::toString(CharConv* cv)
+{
+	
+	int i;
+	cv->toBuffer(m_id);
+	cv->toBuffer(m_nr_parties);
+	cv->toBuffer(m_nr_members);
+	for (i=0;i<m_nr_members;i++)
+		cv->toBuffer(m_members[i]);
+	cv->toBuffer(m_nr_candidates);
+	for (i=0;i<m_nr_candidates;i++)
+		cv->toBuffer(m_candidates[i]);
+	for (i=0;i<m_nr_parties;i++)
+		cv->toBuffer((char) m_relations[i]);
+
+}
+
+void Party::fromString(CharConv* cv)
+{
+	
+	int i;
+	cv->fromBuffer<char>(m_id);
+	cv->fromBuffer<char>(m_nr_parties);
+	m_members = new int[m_nr_parties];
+	m_candidates = new int[m_nr_parties];
+	m_relations = new WorldObject::Relation[m_nr_parties];
+	cv->fromBuffer<char>(m_nr_members);
+	for (i=0;i<m_nr_members;i++)
+	{
+		cv->fromBuffer<int>(m_members[i]);
+	}
+	cv->fromBuffer<char>(m_nr_candidates);
+	for (i=0;i<m_nr_candidates;i++)
+	{
+		cv->fromBuffer<int>(m_candidates[i]);
+	}
+	char tmp;
+	for (i=0;i<m_nr_parties;i++)
+	{
+		cv->fromBuffer<char>(tmp);
+		m_relations[i] = (WorldObject::Relation) tmp;
+	}
+
+}
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/party.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,206 @@
+#ifndef PARTY_H
+#define PARTY_H
+
+#include "debug.h"
+#include "charconv.h"
+#include "worldobject.h"
+
+/**
+ * \class Party
+ * \brief Eine Party ist eine Gruppe von Lebewesen welche kooperieren
+ */
+class Party
+{
+
+	public:
+
+
+
+	/**
+	 * \fn Party()
+	 * \brief Konstruktor
+	 * \parm id ID der Party
+	 */
+	Party(){};
+
+
+	/**
+	 * \fn ~Party()
+	 * \brief Destruktor
+	 */
+	virtual ~Party();
+
+	/**
+	 * \fn init(char nr_parties, char id)
+	 * \brief initialisiert das Objekt
+	 * \param nr_parties maximale Anzahl Parties
+	 * \param id ID
+	 */
+	void init(char nr_parties, char id);
+
+
+	/**
+	 * \fn void clear()
+	 * \brief Loescht alle aktuellen Mitglieder und Bewerber
+	 */
+	void clear();
+
+
+	/**
+	 * \fn int* getMembers()
+	 * \brief gibt Liste der Mitglieder zurueck
+	 */
+	int* getMembers()
+	{
+		return m_members;
+	}
+
+	/**
+	 * \fn int* getCandidates()
+	 * \brief Gibt Liste der Kandidaten zurueck
+	 */
+	int* getCandidates()
+	{
+		return m_candidates;
+	}
+
+	/**
+	 * \fn Relation* getRelations()
+	 * \brief Gibt Beziehungen zu den anderen Parties aus
+	 */
+	WorldObject::Relation* getRelations()
+	{
+		return m_relations;
+	}
+
+	/**
+	 * \fn char getId()
+	 * \brief Gibt die ID aus
+	 * \return ID
+	 */
+	char getId()
+	{
+		return m_id;
+	}
+
+	/**
+	 * \fn char getNrMembers()
+	 * \brief Gibt Anzahl der Mitglieder aus
+	 */
+	char getNrMembers()
+	{
+		return m_nr_members;
+	}
+
+	/**
+	 * \fn char getNrCandidates()
+	 * \brief Gibt Anzahl der Bewerber aus
+	 */
+	char getNrCandidates()
+	{
+		return m_nr_candidates;
+	}
+
+	/**
+	 * \fn void addMember(int id)
+	 * \brief Fuegt Mitglied hinzu
+	 * \param id ID des aufgenommenen Mitglieds
+	 */
+	void addMember(int id);
+
+	/**
+	 * \fn void removeMember(int id)
+	 * \brief Entfernt Mitglied
+	 * \param id ID des entfernten Mitglieds
+	 */
+	void removeMember(int id);
+
+	/**
+	 * \fn void addCandidate(int id)
+	 * \brief Fuegt einen Bewerber hinzu
+	 * \param id ID des neuen Bewerbers
+	 */
+	void addCandidate(int id);
+
+	/**
+	 * \fn void acceptCandidate(int id)
+	 * \brief Nimmt Bewerber auf
+	 * \param id ID des aufgenommenen Bewerbers
+	 */
+	void acceptCandidate(int id);
+
+	/**
+	 * \fn void removeCandidate(int id)
+	 * \brief Entfernt einen Bewerber
+	 * \param id ID des Bewerbers
+	 */
+	void removeCandidate(int id);
+
+	/**
+	 * \fn void toString(CharConv* cv)
+	 * \brief Konvertiert das Objekt in einen String und schreibt ihn in der Puffer
+	 * \param buf Ausgabepuffer
+	 * \return Zeiger hinter den beschriebenen Datenbereich
+	 */
+	virtual void toString(CharConv* cv);
+
+
+	/**
+	 * \fn void fromString(CharConv* cv)
+	 * \brief Erzeugt das Objekt aus einem String
+	 * \param buf Objekt als String
+	 * \return Zeiger hinter den gelesenen Datenbereich
+	 */
+	virtual void fromString(CharConv* cv);
+
+
+
+	private:
+
+	/**
+	 * \var char m_id
+	 * \brief ID
+	 */
+	char m_id;
+
+	/**
+	 * \var char m_nr_parties
+	 * \brief maximale Anzahl von Parties
+	 */
+	char m_nr_parties;
+
+	/**
+	 * \var int* m_members
+	 * \brief Feld mit den IDs der Mitglieder
+	 */
+	int* m_members;
+
+	/**
+	 * \var char m_nr_members
+	 * \brief Anzahl der Mitglieder
+	 */
+	char m_nr_members;
+
+	/**
+	 * \var char m_nr_candidates
+	 * \brief Anzahl der Bewerber
+	 */
+	char m_nr_candidates;
+
+	/**
+	 * \var int* candidates
+	 * \brief Feld mit den IDs der Bewerber
+	 */
+	int* m_candidates;
+
+	/**
+	 * \var Relation* m_relations
+	 * \brief Beziehungen zu anderen Parties
+	 */
+	WorldObject::Relation* m_relations;
+
+};
+
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/pathfind.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,536 @@
+
+#include "pathfind.h"
+
+#define INF 100000000
+
+PathfindInfo::~PathfindInfo()
+{
+	if (m_pot)
+		delete m_pot;
+	
+	if (m_block)
+		delete m_block;
+}
+
+SearchField::SearchField(int dim)
+{
+	
+	m_dim = dim;
+	// Heap ist zum Beginn leer
+	m_heap_dimension=0;
+	
+	// Anzahl Felder = Kantenlänge^2
+	int sqdim=dim*dim;
+	
+	// Feld für Array anlegen
+	m_heap = new SearchFieldEntry*[sqdim];
+	
+	// Array mit den Suchfeldeintraegen
+	m_array = new Matrix2d<SearchFieldEntry>(dim,dim) ;
+	
+	// Bei allen Suchfeldeintraegen die Koordinaten eintragen
+	for (int i=0;i<m_dim;++i)
+	{
+		for (int j=0;j<m_dim;++j)
+		{
+			m_array->ind(i,j)->m_x =i;
+			m_array->ind(i,j)->m_y =j;
+		}
+	}
+	
+
+}
+
+SearchField::~SearchField()
+{
+	delete m_array;
+	delete m_heap;
+}
+
+void SearchField::init(Matrix2d<float>* pot, Matrix2d<char>* block)
+{
+	m_pot = pot;
+	m_block = block;
+}
+
+void SearchField::heapPush(SearchFieldEntry* fentry)
+{
+	
+	// größe des Heap inkrementieren
+	m_heap_dimension++;
+			
+	// Feld an letzte Position speichern
+	m_heap[m_heap_dimension]=fentry;
+	
+	// speichern, wo im Heap sich das Feld befindet
+	fentry->m_heapref=m_heap_dimension;
+	
+	//Feld korrekt einordnen
+	reOrder(fentry);
+}
+	
+SearchFieldEntry* SearchField::heapPop()
+{
+	// Wenn der Heap leer ist NULL ausgebe
+	if (m_heap_dimension==0)
+		return 0;
+	
+	// Erstes Element im Heap ausgeben
+	SearchFieldEntry* result = m_heap[1];
+	// Element wird aus dem Heap entfernt
+	result->m_heapref=0;
+	
+	// Letztes Element an die Spitze des Heap setzen
+	m_heap[1]=m_heap[m_heap_dimension];
+	m_heap[1]->m_heapref=1;
+	
+	// Dimension dekrementieren
+	m_heap_dimension--;
+	
+	// Ab hier: Element einsickern lassen
+	int pos=-1,newpos=1;
+	SearchFieldEntry* swap=0;
+	while (pos != newpos)
+	{
+		// solange bis das Element sich nicht mehr bewegt
+		pos=newpos;
+		if (2*pos<m_heap_dimension)
+		{
+			// Knoten hat zwei Kinder
+			// Wenn einer der Kindknoten einen kleineren Wert hat
+			// Kindknoten mit den kleinsten Wert als neue Position auswaehlen
+			if (m_heap[pos]->m_f > m_heap[2*pos]->m_f) 
+				newpos=2*pos;
+			if (m_heap[newpos]->m_f > m_heap[2*pos+1]->m_f) 
+				newpos=2*pos+1;
+		}
+		else if (2*pos==m_heap_dimension)
+		{
+			// Knoten hat ein Kind
+			// Wenn Kindknoten kleineren Wert hat, Element weiter einsickern lassen
+			if (m_heap[pos]->m_f > m_heap[2*pos]->m_f) 
+				newpos=2*pos;
+		}
+		
+		if (newpos!=pos)
+		{
+			//Element einsickern lassen
+			
+			// Vertauschen mit dem ausgesuchen Kindknoten
+			swap=m_heap[newpos];
+			m_heap[newpos]=m_heap[pos];
+			m_heap[pos]=swap;
+			
+			// aktualisieren der Indizee die in den Heap zeigen
+			m_heap[pos]->m_heapref=pos;
+			m_heap[newpos]->m_heapref=newpos;		
+		}
+		
+	}
+		
+	return result;
+}
+
+void SearchField::reOrder(SearchFieldEntry* fentry)
+{
+	// aktuelle Position des betrachteten Elements
+	int i = fentry->m_heapref;
+	SearchFieldEntry* swap;
+	while	(i>1 && m_heap[i]->m_f <= m_heap[i/2]->m_f)
+	{
+		// Element hat einen kleineren Wert als der Vaterknoten
+		
+		// tauschen mit dem Vater
+		swap=m_heap[i/2];
+		m_heap[i/2]=m_heap[i];
+		m_heap[i]=swap;
+		
+		// aktualisieren der Indizee die in den Heap zeigen
+		m_heap[i]->m_heapref=i;
+		m_heap[i/2]->m_heapref=i/2;
+		i=i/2;
+	}
+	
+}
+
+SearchFieldEntry* SearchField::getSearchFieldEntry(int x, int y)
+{
+
+	// Wenn Koordinaten innerhalb des Array liegen, Zeiger in das Array zurückgeben
+	if (x>= 0 && x<m_dim  && y>= 0 && y<m_dim )
+	{
+		SearchFieldEntry* ret =m_array->ind(x,y);
+		return ret;
+		
+	}
+	
+	// Koordinaten ausserhalb angegeben, NULL Zeiger ausgeben
+	return 0;
+}
+
+void SearchField::createPotential(int start_x, int start_y)
+{
+	int sqdim=m_dim*m_dim;
+	
+	// Felder initialisieren
+	int i,j;
+	/*for (i=0; i<sqdim;i++)
+	{
+		m_heap[i]=0;
+	}*/
+	memset(m_heap,0,sizeof(m_heap));
+	
+	for (i=0;i<m_dim;++i)
+	{
+		for (j=0;j<m_dim;++j)
+		{
+			m_array->ind(i,j)->m_heapref=0;
+			m_array->ind(i,j)->m_state=0;
+			
+		}
+	}
+	
+	//printf("initialized\n");
+	const int adj[4][2] = {{0,1},{1,0},{0,-1},{-1,0}};
+	
+	SearchFieldEntry* fentry,*fentry_adj;
+	fentry=getSearchFieldEntry(start_x,start_y);
+	fentry->m_f =0;
+	fentry->m_state =1;
+	//printf("start: %i %i\n",start_x,start_y);
+	
+	heapPush(fentry);
+	int x,y,xa,ya,s;
+	float f,fa,p,po,f1,f2,t;
+	
+	
+	
+	while (m_heap_dimension>0)
+	{
+		fentry=heapPop();
+		x= fentry->m_x;
+		y=fentry->m_y;
+		f=fentry->m_f;
+		//printf("processing (%i %i) : %f\n",x,y,f);
+		po = penalty[*(m_block->ind(x,y))];
+		
+		for (i=0;i<4;++i)
+		{
+			xa = x+adj[i][0];
+			ya = y+adj[i][1];
+			
+			fentry_adj = getSearchFieldEntry(xa, ya);
+			if (!fentry_adj)
+				continue;
+			
+			if (*(m_block->ind(xa,ya))=='X')
+				continue;
+			else
+			{
+				//p = penalty[*(m_block->ind(xa,ya))-'0'];
+				p = penalty[*(m_block->ind(xa,ya))];
+				
+			}
+			
+			
+			
+			fa = fentry_adj->m_f;
+			
+			s= fentry_adj->m_state;
+			if (s ==0)
+			{
+				
+				
+				fentry_adj->m_f = f+p;
+				fentry_adj->m_state =1;
+				//printf("adding (%i %i) : %f\n",xa,ya,f+1);
+				heapPush(fentry_adj);
+			}
+			else if (s==1)
+			{
+				//printf("neighbour (%i %i) : %f\n",xa,ya,fa);
+				fa = fentry_adj->m_f;
+				if (fa <= f+p)
+				{
+					//fentry_adj->m_f = f+p*DIAG_PRIO*(fa-f)/(p+(fa-f));
+					t= p/(fa-f);
+					fentry_adj->m_f = fa-1/(t*(t+1));
+					reOrder(fentry_adj);
+				}
+				else
+				{
+					
+					fentry_adj->m_f = f+p;
+					reOrder(fentry_adj);
+				}
+			}
+			
+		}
+		fentry->m_state =2;
+		*(m_pot->ind(x,y)) = fentry->m_f;
+	}
+		
+	/*
+	for (i=0;i<m_dim;++i)
+	{
+		for (j=0;j<m_dim;++j)
+		{
+			printf("%2.2f ",*(m_pot->ind(j,m_dim-1-i)));
+		}
+		printf("\n");
+	}
+	*/
+
+}
+
+void SearchField::createGradient(Matrix2d<float[2]>* grad)
+{
+	const int adj[4][2] = {{0,1},{1,0},{0,-1},{-1,0}};
+	const int diag[4][2] = {{1,1},{1,-1},{-1,-1},{-1,1}};
+	int k,ia1,ja1,ia2,ja2,id,jd;
+	bool b;
+	float fa1,fa2,fd,f1,f2;
+	float qmax=0,q;
+	int i,j;
+	float f;
+	for (i=0;i<m_dim;++i)
+	{
+		for (j=0;j<m_dim;++j)
+		{
+			b=false;
+			f=*(m_pot->ind(i,j));
+			for (k=0;k<4;++k)
+			{
+				qmax =0;
+				ia1 = i+adj[k][0];
+				ja1 = j+adj[k][1];
+				ia2 = i+adj[(k+1)%4][0];
+				ja2 = j+adj[(k+1)%4][1];
+				
+				if (ia1 <0 || ia2<0 || ja1 <0 || ja2<0 || ia1>=m_dim || ia2>=m_dim || ja1>=m_dim || ja2>=m_dim)
+				{
+					continue;
+					
+				}
+				
+			
+				id = i+diag[k][0];
+				jd = j+diag[k][1];
+				
+				if (*(m_block->ind(ia1,ja1))=='X' || *(m_block->ind(ia2,ja2))=='X' || *(m_block->ind(id,jd))=='X')
+				{
+					continue;
+				} 
+				
+				fa1 = *(m_pot->ind(ia1,ja1));
+				fa2 = *(m_pot->ind(ia2,ja2));
+				fd = *(m_pot->ind(id,jd));
+				
+
+				if (fa1<f && fa2<f && fd<fa1 && fd < fa2)
+				{
+					f1 = (f-fa1)*adj[k][0]+(f-fa2)*adj[(k+1)%4][0];
+					f2 = (f-fa1)*adj[k][1]+(f-fa2)*adj[(k+1)%4][1];
+					
+					q = f1*f1+f2*f2;
+					if (q>qmax)
+					{
+						
+						(*(grad->ind(i,j)))[0] = f1;
+						(*(grad->ind(i,j)))[1] = f2;
+						q=qmax;
+						
+					}
+					b=true;
+				}
+			}
+			
+			if (!b)
+			{
+				for (k=0;k<4;++k)
+				{
+					ia1 = i+adj[k][0];
+					ja1 = j+adj[k][1];
+					
+					if (ia1 <0 || ja1 <0 || ia1>=m_dim || ja1>=m_dim)
+						continue;
+					
+					fa1 = *(m_pot->ind(ia1,ja1));
+					if (fa1 <f && *(m_block->ind(ia1,ja1))!='X')
+					{
+						f1 = (f-fa1)*adj[k][0];
+						f2 = (f-fa1)*adj[k][1];
+						
+						
+						q = f1*f1+f2*f2;
+						if (q>qmax)
+						{
+							(*(grad->ind(i,j)))[0] = f1;
+							(*(grad->ind(i,j)))[1] = f2;
+							qmax=q;
+							b=true;
+						}
+					}
+				}
+			}
+			
+			if (!b)
+			{
+				(*(grad->ind(i,j)))[0] = 0;
+				(*(grad->ind(i,j)))[1] = 0;
+			}
+			
+			
+		}
+	}
+	
+	
+	
+	
+	
+}
+
+ void SearchField::getGradient(Matrix2d<float>* m_pot,Matrix2d<char>* m_block,int m_dim, float grad[2], int x, int y)
+{
+	
+	const int adj[4][2] = {{0,1},{1,0},{0,-1},{-1,0}};
+	const int diag[4][2] = {{1,1},{1,-1},{-1,-1},{-1,1}};
+	
+	int k,ia1,ja1,ia2,ja2,id,jd;
+	bool b;
+	float fa1,fa2,fd,f1,f2;
+	float qmax=0,q;
+	int i,j;
+	float f;
+	b=false;
+	i =x;
+	j=y;
+	
+	f=*(m_pot->ind(i,j));
+	
+	if ((*(m_block->ind(i,j))=='X'))
+	{
+		DEBUG("blockiertes Feld betreten");
+		qmax = 1000000;
+		for (k=0;k<4;++k)
+		{
+			ia1 = i+adj[k][0];
+			ja1 = j+adj[k][1];
+			if (ia1 <0 ||  ja1 <0 || ia1>=m_dim ||  ja1>=m_dim )
+			{
+				continue;
+			}
+			fa1 = *(m_pot->ind(ia1,ja1));
+		
+			q = fabs(fa1);
+			DEBUG5("coord %i %i val %f",ia1,ja1,q);
+			if (q<qmax && q!=0)
+			{
+				
+				qmax = q;
+				grad[0] = adj[k][0];
+				grad[1] = adj[k][1];
+				b = true;
+			}
+			
+		}
+	}
+	else
+	{
+		// debugging
+		/*
+		for (k=0;k<=20;k++)
+		{
+			for (ia1=0;ia1<=20;ia1++)
+			{
+				printf("%f ",*(m_pot->ind(k,ia1)));
+			}
+			printf("\n");
+		}
+		*/
+		
+		for (k=0;k<4;++k)
+		{
+			qmax =0;
+			ia1 = i+adj[k][0];
+			ja1 = j+adj[k][1];
+			ia2 = i+adj[(k+1)%4][0];
+			ja2 = j+adj[(k+1)%4][1];
+					
+			if (ia1 <0 || ia2<0 || ja1 <0 || ja2<0 || ia1>=m_dim || ia2>=m_dim || ja1>=m_dim || ja2>=m_dim)
+			{
+				continue;
+				
+			}
+			
+				
+			id = i+diag[k][0];
+			jd = j+diag[k][1];
+					
+			if (*(m_block->ind(ia1,ja1))=='X' || *(m_block->ind(ia2,ja2))=='X' || *(m_block->ind(id,jd))=='X')
+			{
+				continue;
+			} 
+					
+			fa1 = *(m_pot->ind(ia1,ja1));
+			fa2 = *(m_pot->ind(ia2,ja2));
+			fd = *(m_pot->ind(id,jd));
+					
+	
+			if (fa1<f && fa2<f && fd<fa1 && fd < fa2)
+			{
+				f1 = (f-fa1)*adj[k][0]+(f-fa2)*adj[(k+1)%4][0];
+				f2 = (f-fa1)*adj[k][1]+(f-fa2)*adj[(k+1)%4][1];
+						
+				q = f1*f1+f2*f2;
+				if (q>qmax)
+				{
+							
+					grad[0] = f1;
+					grad[1] = f2;
+					q=qmax;
+							
+				}
+				b=true;
+			}
+		}
+				
+		if (!b)
+		{
+			for (k=0;k<4;++k)
+			{
+				ia1 = i+adj[k][0];
+				ja1 = j+adj[k][1];
+						
+				if (ia1 <0 || ja1 <0 || ia1>=m_dim || ja1>=m_dim)
+					continue;
+						
+				fa1 = *(m_pot->ind(ia1,ja1));
+				if (fa1 <f && *(m_block->ind(ia1,ja1))!='X')
+				{
+					f1 = (f-fa1)*adj[k][0];
+					f2 = (f-fa1)*adj[k][1];
+							
+							
+					q = f1*f1+f2*f2;
+					if (q>qmax)
+					{
+						grad[0] = f1;
+						grad[1] = f2;
+						qmax=q;
+						b=true;
+					}
+				}
+			}
+		}
+	}
+		
+	if (!b)
+	{
+		grad[0] = 0;
+		grad[1] = 0;
+	}
+	
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/pathfind.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,290 @@
+
+#ifndef PATH2_H
+#define PATH2_H
+
+#include "matrix2d.h"
+#include <string>
+#include <stdio.h>
+#include <iostream>
+#include <math.h>
+#include <algorithm>
+
+
+const float DIAG_PRIO=1.0;
+
+const float penalty[10] = {1,1.2,1.5,2,3,5,10,20,40,200};
+
+/**
+ * \struct PathfindInfo
+ * \brief Informationen zu einem Wegfindeauftrag
+ */
+struct PathfindInfo
+{
+	/**
+	 * \var Matrix2d<float>* m_pot
+	 * \brief Potentialfeld fuer die Wegfindung. Je hoeher das Potential desto groesser ist der Abstand zum Ziel
+	 */
+	Matrix2d<float>* m_pot;
+	
+	/**
+	 * \var Matrix2d<char>* m_block
+	 * \brief Array der blockierten Felder
+	 * zulassig sind die Werte 0-9 sowie X . Felder mit Zahlen koennen ueberquert werden, allerdings steigen die Kosten von 0 nach 9 stark an. Felder mit X koennen nicht ueberquert werden
+	 */
+	Matrix2d<char>* m_block;
+	
+	/**
+	 * \fn ~PathfindInfo()
+	 * \brief gibt allokierten Speicher frei
+	 */
+	~PathfindInfo();
+	
+	/**
+	 * \var float m_start_x
+	 * \brief x-Koordinate des Zielpunktes
+	 * Da die Suche rueckwarts laeuft hier als Startpunkt bezeichnet
+	 */
+	float m_start_x;
+	
+	/**
+	 * \var float m_start_y
+	 * \brief y-Koordinate des Zielpunktes
+	 */
+	float m_start_y;
+	
+	/**
+	 * \var float m_center_x
+	 * \brief x-Koordinate des Mittelpunktes des Suchbereiches
+	 */
+	float m_center_x;
+	
+	/**
+	 * \var float m_center_y
+	 * \brief y-Koordinate des Mittelpunktes des Suchbereiches
+	 */
+	float m_center_y;
+	
+	/**
+	 * \var int m_dim
+	 * \brief Laenge und Breite des Suchbereiches in Feldern
+	 */
+	int m_dim;
+	
+	/**
+	 * \var short m_layer
+	 * \brief Bitmaske der Ebenen in denen nach Hindernissen gesucht wird
+	 */
+	short m_layer;
+	
+	/**
+	 * \var short m_region
+	 * \brief Region in der die Suche stattfindet
+	 */
+	short m_region;
+	
+	/**
+	 * \var float m_base_size
+	 * \brief Durchmesser des Grundkreises fuer den die Suche stattfindet
+	 * Die Groesse des Grundkreises bestimmt, durch welche engen Durchgaenge das Objekt passt
+	 */
+	float m_base_size;
+	
+	/**
+	 * \var int m_quality
+	 * \brief Qualitaet der Suche
+	 * die Kantenlaenge eines Feldes bei der Suche errechnet sich als base_size/quality. Die Rechenzeit steigt quadratisch mit der Qualitaet
+	 */
+	int m_quality;
+	
+	/**
+	 * \var int m_id
+	 * \brief ID des Wegsuchenden Objektes
+	 */
+	int m_id;
+	
+	/**
+	 * \var float m_timer
+	 * \brief Timer fuer Debugging Zwecke
+	 */
+	float m_timer;
+ 
+};
+
+/**
+ * \struct SearchFieldEntry
+ * \brief Eintrag eines Suchfeldes
+ */
+struct SearchFieldEntry {
+	
+	float m_f;
+	
+	/**
+	 * \var m_x
+	 * \brief x-Koordinate des aktuellen Feldes
+	 */
+	int m_x;
+	/**
+	 * \var m_y
+	 * \brief x-Koordinate des aktuellen Feldes
+	 */
+	int m_y;
+	
+	/**
+	 * \var int m_state
+	 * \brief aktueller Zustand des Feldes (unentdeckt, entdeckt, abgearbeitet)
+	 */
+	int m_state;
+	
+	
+	/**
+	 * \var m_heapref
+	 * \brief Verweis, wo das Element im Heap zu finden ist
+	 */
+	int m_heapref;
+
+};
+
+/**
+ * \class SearchField
+ * \brief Klasse fuer die Berechnung von Wegfindeauftraegen
+ */
+class SearchField
+{
+	public:
+		/**
+		* \fn SearchField(int max_distance)
+		* \brief Konstruktor
+		* \param max_distance maximale Anzahl Felder, die sich die Suche vom Startpunkt entfernen darf
+		*
+		* Legt ein neues Suchfeld an
+		*/
+			SearchField(int dim);
+		/**
+		* \fn ~SearchField()
+		* \brief Destruktor
+		*
+		* Zerstört das Objekt und gibt allokierten Speicher frei
+		*/
+			~SearchField();
+			
+		/**
+		 * \fn void init(Matrix2d<float>* pot, Matrix2d<char>* block)
+		 * \brief initialisiert einen neuen Wegfindeauftrag
+		 * \param pot Ausgabeparameter fuer das berechnete Potentialfeld
+		 * \param block Matrix der blockierten Felder
+		 */
+		void init(Matrix2d<float>* pot, Matrix2d<char>* block);
+		
+		/**
+		* \fn heapPush(SearchFieldEntry* fentry)
+		* \brief Fügt ein Element dem Heap hinzu
+		* \param fentry Feld, das auf den Heap abgelegt werden soll
+		* Legt das Element auf dem Heap ab.
+		*/
+		inline void heapPush(SearchFieldEntry* fentry);
+		
+		/**
+		* \fn SearchFieldEntry* heapPop()
+		* \brief Gibt oberstes Element des Heaps zurück
+		* \return SearchFieldEntry* Oberste Element des Heap
+		*
+		* Gibt das oberste Element des Heaps zurück. Das Element wird aus dem Heap gelöscht.
+		*/
+		inline SearchFieldEntry* heapPop();
+		
+		/**
+		* \fn reOrder(SearchFieldEntry* fentry)
+		* \brief Ordnet das Feld in den internen Datenstrukturen neu ein
+		* \param fentry Feld, der neu eingeordnet werden soll
+		*
+		* Ordnet das Feld im Heap neu ein. Diese Funktion sollte immer dann aufgerufen werden, wenn die Priorität eines Felds sich geändert hat.
+		*/
+		inline void reOrder(SearchFieldEntry* fentry);
+		
+		
+		/**
+		* \fn SearchFieldEntry* getSearchFieldEntry(int x, int y)
+		* \brief Gibt einen Zeiger auf den Feldeintrag an den gegebenen Koordinaten aus
+		* \param x x-Koordinate
+		* \param y y-Koordinate
+		* \return Zeiger auf den Feldeintrag bei den gegebenen Koordinaten
+		*/
+		inline SearchFieldEntry* getSearchFieldEntry(int x, int y);
+			
+		/**
+		 * \fn void createPotential(int start_x, int start_y)
+		 * \brief Berechnet das Potentialfeld
+		 * \param start_x x-Koordinate der Senke
+		 * \param start_x x-Koordinate der Senke
+		 */
+		void createPotential(int start_x, int start_y);
+		
+		/**
+		 * \fn  void createGradient(Matrix2d<float[2]>* grad)
+		 * \brief Berechnet den Gradienten des Potentialfeldes
+		 * \param grad Ausgabeparameter fuer den Gradienten
+		 */
+		void createGradient(Matrix2d<float[2]>* grad);
+		
+		/**
+		 * \fn static void getGradient(Matrix2d<float>* m_pot,Matrix2d<char>* m_block,int m_dim, float grad[2], int x, int y)
+		 * \brief Berechnet den Gradienten an einer gegebenen Stelle
+		 * \param m_pot Potentialfeld
+		 * \param m_block dem Potentialfeld zugrunde liegende Matrix der blockierten Felder
+		 * \param m_dim Dimension der Potentialfeld-, sowie Blockadematrix
+		 * \param grad Ausgabeparameter fuer den Gradienten
+		 * \param x x-Koordinate des Punktes an dem der Gradient gesucht ist
+		 * \param y y-Koordinate des Punktes an dem der Gradient gesucht ist
+		 */
+		static void getGradient(Matrix2d<float>* m_pot,Matrix2d<char>* m_block,int m_dim, float grad[2], int x, int y);
+
+	private:
+	
+		/**
+		* \var m_heap_dimension
+		* \brief Gibt die Anzahl der Elemente im Heap an
+		*/
+		int m_heap_dimension;
+		
+		/**
+		 * \var int m_dim
+		 * \brief Dimension der Potentialfeld-, sowie Blockadematrix
+		 */
+		int m_dim;
+		
+		/**
+		 * \var Matrix2d<float>* m_pot
+		 * \brief Matrix fuer das Potentialfeld
+		 */
+		Matrix2d<float>* m_pot;
+		
+		/**
+		 * \var Matrix2d<char>* m_block
+		 * \brief Matrix fuer die blockierten Felder
+		 */
+		Matrix2d<char>* m_block;
+		
+		/**
+		 * \var Matrix2d<float[2]>* m_grad
+		 * \brief Matrix fuer den Gradienten des Potentialfeldes
+		 */
+		Matrix2d<float[2]>* m_grad;
+		
+		
+		/**
+		 * \var m_array
+		 * \brief Datenarray, welches die Feldinformationen speichert.
+		 */
+		Matrix2d<SearchFieldEntry>* m_array ;
+		
+		/**
+		 * \var m_heap
+		 * \brief Heapstruktur, speichert Zeiger in das Datenarray
+ 		*/
+		SearchFieldEntry** m_heap;
+		
+		
+};
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/player.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,1843 @@
+
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf, Alexander Boehm
+
+	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.
+*/
+
+#include "player.h"
+
+//Constructors/Destructors
+
+Player::Player(World* world, int id) : Creature(world,  id)
+{
+	bool tmp=Player::init();
+	if (!tmp)
+	{
+		DEBUG("Initialiserung des Players fehlgeschlagen!");
+	}
+}
+
+
+Player::~Player()
+{
+
+}
+
+bool Player::destroy()
+{
+	DEBUG5("leave Party");
+	DEBUG5("destroy");
+	getWorld()->getParty(getTypeInfo()->m_fraction)->removeMember(getId());
+	Creature::destroy();
+}
+
+//Operations
+
+bool Player::init()
+{
+	DEBUG("Player::init");
+	//eigene Initialisierung
+	m_network_slot=-1;
+	m_package_number =0;
+	setTradeId(0);
+	getTypeInfo()->m_type = TypeInfo::TYPE_PLAYER;
+	getTypeInfo()->m_category = TypeInfo::HUMAN;
+	Party* p = getWorld()->getEmptyParty();
+	if (p==0)
+	{
+//		ERROR("cant open new party");
+	}
+	p->clear();
+	p->addMember(getId());
+	getTypeInfo()->m_fraction = (TypeInfo::Fraction) (p->getId() + TypeInfo::FRAC_PLAYER_PARTY);
+	DEBUG("opened Party %i",p->getId());
+
+	getGeometry()->m_shape.m_type = Shape::CIRCLE;
+	getGeometry()->m_shape.m_radius = 0.5;
+	getGeometry()->m_layer = (Geometry::LAYER_BASE | Geometry::LAYER_AIR);
+	getGeometry()->m_angle =0;
+
+	getBaseAttr()->m_step_length=1.5;
+	getBaseAttr()->m_attack_range=0.5;
+	getBaseAttr()->m_level=1;
+
+	m_attribute_points=0;
+	m_skill_points=25;
+
+	m_secondary_equip = false;
+
+	m_equipement = new Equipement(5,14,30);
+
+	m_save_timer= 3000;
+
+	return true;
+}
+
+bool Player::onGamefieldClick(ClientCommand* command)
+{
+	if (command->m_action>=192)
+	{
+		ERRORMSG("invalid action");
+		return false;
+	}
+
+	Command* com = getNextCommand();
+	int dist;
+	bool meleedir = false;
+	Party* p, *p2;
+	ServerWObject* wo;
+	WorldObject::Relation rel;
+
+	// Actionen auf self brauchen kein Zielobjekt
+	dist = Action::getActionInfo(command->m_action)->m_distance;
+	if ( dist == Action::SELF || dist == Action::PARTY_MULTI)
+		command->m_id=0;
+	
+	// TODO ???
+	if (dist == Action::PARTY)
+		command->m_id = getId();
+
+	// bei Take Item wird in der ID die ID des Items gespeichert
+	if ( command->m_id!=0 && command->m_action != Action::TAKE_ITEM)
+	{
+
+		DEBUG4("Kommando erhalten, zielid: %i",command->m_id);
+		wo = getWorld()->getSWObject(command->m_id,getGridLocation()->m_region);
+
+		// Unterscheidung Zielobject vs kein Zielobject
+		if (wo !=0)
+		{
+			rel = getWorld()->getRelation(getTypeInfo()->m_fraction,wo);
+			
+			if (command->m_button == LEFT_MOUSE_BUTTON)
+			{
+				// Linke Maustaste: Aktion nur ausfuehren, wenn tatsaechlich ein passendenes Objekt vorhanden ist
+				
+				// Fuer Aktionen der Art Nah oder Fernkampf braucht man eine feindliche Kreatur
+				if (rel == WorldObject::HOSTILE && (dist == Action::MELEE || dist == Action::RANGED))
+				{
+
+					if (wo->getState()==STATE_ACTIVE)
+					{
+
+						com->m_type =command->m_action;
+
+						com->m_goal_object_id = command->m_id;
+						com->m_goal_coordinate_x =command->m_coordinate_x;
+						com->m_goal_coordinate_y =command->m_coordinate_y;
+						com->m_range = getBaseAttr()->m_attack_range;
+						DEBUG5("action range %f",getCommand()->m_range);
+					}
+					else
+					{
+						/*
+						if (wo->getState()==STATES_DEAD)
+						{
+						getNextCommand()->setType(COMMAND_TRADE);
+						getNextCommand()->setGoalObjectId(command->m_id);
+						DEBUG("Monster auspluendern");
+					}
+						*/
+					}
+				}
+				if (rel == WorldObject::ALLIED && dist == Action::PARTY)
+				{
+					if (wo->getState()==STATE_ACTIVE)
+					{
+						com->m_type =command->m_action;
+
+						com->m_goal_object_id = command->m_id;
+						com->m_goal_coordinate_x =command->m_coordinate_x;
+						com->m_goal_coordinate_y =command->m_coordinate_y;
+						com->m_range = getBaseAttr()->m_attack_range;
+					}
+				}
+				if (wo->getTypeInfo()->m_type==TypeInfo::TYPE_FIXED_OBJECT )
+				{
+					// festes Objekt benutzen
+					com->m_type =Action::USE;
+					com->m_goal_object_id = command->m_id;
+					com->m_range = 0.5;
+					DEBUG5("action range %f",getCommand()->m_range);
+
+				}
+						/*
+				if (wo->getObjectType().getObjectType()==OBJECTTYPE_TRADER)
+				{
+							// mit einem Händler handeln
+				getNextCommand()->setType(COMMAND_TRADE);
+				getNextCommand()->setGoalObjectId(command->m_id);
+			}
+						*/
+			}
+			else if (command->m_button == RIGHT_MOUSE_BUTTON)
+			{
+				com->m_type =command->m_action;
+				com->m_goal_object_id = command->m_id;
+				com->m_goal_coordinate_x =command->m_coordinate_x;
+				com->m_goal_coordinate_y =command->m_coordinate_y;
+				com->m_range = getBaseAttr()->m_attack_range;
+				com->m_goal_object_id = command->m_id;
+			}
+			else if (command->m_button == LEFT_SHIFT_MOUSE_BUTTON)
+			{
+				com->m_type = command->m_action;
+				com->m_goal_coordinate_x =command->m_coordinate_x;
+				com->m_goal_coordinate_y =command->m_coordinate_y;
+				com->m_range = getBaseAttr()->m_attack_range;
+				com->m_goal_object_id =0;
+				if (dist == Action::MELEE)
+				{
+					
+					meleedir = true;
+				}
+			}
+		}
+		else
+		{
+			// Objekt existiert nicht ( Fehler?)
+			com->m_type =Action::NOACTION;
+		}
+
+	}
+	else
+	{
+		// Kein Zielobjekt gegeben
+		DEBUG5("Kommando erhalten, Ziel (%f,%f) button %i action %i dist %i",command->m_coordinate_x, command->m_coordinate_y,command->m_button,command->m_action,dist);
+
+		if (command->m_button == LEFT_MOUSE_BUTTON)
+		{
+
+			// linke Maustaste -> immer laufen
+			if (command->m_action == Action::TAKE_ITEM)
+			{
+				com->m_type = Action::TAKE_ITEM;
+				com->m_goal_object_id =command->m_id;
+				DEBUG("take item");
+			}
+			else
+			{
+				com->m_type = Action::WALK;
+				com->m_goal_object_id =0;
+			}
+			com->m_goal_coordinate_x =command->m_coordinate_x;
+			com->m_goal_coordinate_y =command->m_coordinate_y;
+
+		}
+		else if (dist == Action::SELF)
+		{
+			// Aktionen auf selbst auf left_shift und rechts ausfuehren
+			com->m_type = command->m_action;
+			com->m_goal_coordinate_x =0;
+			com->m_goal_coordinate_y =0;
+			com->m_goal_object_id =0;
+		}
+		else if (dist == Action::PARTY_MULTI)
+		{
+			com->m_type = command->m_action;
+			com->m_goal_coordinate_x =command->m_coordinate_x;
+			com->m_goal_coordinate_y =command->m_coordinate_y;
+			com->m_goal_object_id =0;
+		}
+		else if (dist == Action::PARTY)
+		{
+			// Aktionen auf Party nie ausfuehren, wenn kein Ziel angegeben
+			com->m_type =Action::NOACTION;
+			com->m_goal_coordinate_x =0;
+			com->m_goal_coordinate_y =0;
+			com->m_goal_object_id =0;
+
+		}
+		else if (dist == Action::RANGED)
+		{
+			// Fernkampf immer starten
+			com->m_type = command->m_action;
+			com->m_goal_coordinate_x =command->m_coordinate_x;
+			com->m_goal_coordinate_y =command->m_coordinate_y;
+			com->m_range = getBaseAttr()->m_attack_range;
+			com->m_goal_object_id =0;
+		}
+		else if (dist == Action::MELEE && command->m_button == LEFT_SHIFT_MOUSE_BUTTON)
+		{
+			// Nahkampf nur dann starten, wenn shift gedrueckt wurde
+			com->m_type = command->m_action;
+			com->m_goal_coordinate_x =command->m_coordinate_x;
+			com->m_goal_coordinate_y =command->m_coordinate_y;
+			com->m_range = getBaseAttr()->m_attack_range;
+			com->m_goal_object_id =0;
+			meleedir = true;
+		}
+		else
+		{
+			com->m_type =Action::NOACTION;
+		}
+
+	}
+
+	if (!checkAbility(com->m_type))
+	{
+		com->m_type = Action::getActionInfo(com->m_type)->m_base_action;
+		DEBUG("Basisaktion verwendet");
+	}
+
+	if (meleedir)
+	{
+		DEBUG5("meleedir");
+		float dir[2];
+		float d;
+		float x = getGeometry()->m_shape.m_coordinate_x;
+		float y = getGeometry()->m_shape.m_coordinate_y;
+		dir[0] = com->m_goal_coordinate_x-x;
+		dir[1] = com->m_goal_coordinate_y-y;
+		d = sqr(dir[0]) + sqr(dir[1]);
+		float range = com->m_range + getGeometry()->m_shape.m_radius;
+		if ( d>= sqr(range))
+		{
+			if (d>0)
+			{
+				d = 1/sqrt(d);
+				dir[0]*= d*0.95*range;
+				dir[1]*= d*0.95*range;
+				com->m_goal_coordinate_x = x+dir[0];
+				com->m_goal_coordinate_y = y+dir[1];
+				DEBUG5("new goal %f %f", com->m_goal_coordinate_x,com->m_goal_coordinate_y);
+			}
+			else
+			{
+				com->m_type =Action::NOACTION;
+			}
+		}
+	}
+}
+
+
+bool Player::onItemClick(ClientCommand* command)
+{
+	short pos = command->m_id;
+
+	if (m_secondary_equip)
+	{
+		if (pos == Equipement::WEAPON)
+			pos = Equipement::WEAPON2;
+
+		if (pos == Equipement::SHIELD)
+			pos = Equipement::SHIELD2;
+
+	}
+
+	// das Item welches, des Spieler aktuell *in der Hand* hat
+	ServerItem* it = static_cast<ServerItem*>(m_equipement->getItem(Equipement::CURSOR_ITEM));
+
+	DEBUG5("got Item %p",it);
+
+	if (command->m_button== BUTTON_ITEM_LEFT)
+	{
+		// Item soll verschoben werden
+		if (it!=0)
+		{
+
+			// zeigt an, ob der Vorraussetzungen erfuellt sind
+			bool req = true;
+
+			if (pos <Equipement::CURSOR_ITEM)
+			{
+
+				// Item soll als Ausruestungsgegenstand benutzt werden
+
+				// testen ob Level ausreicht
+				if (getBaseAttr()->m_level < it->m_level_req)
+				{
+					// Level Vorraussetzung nicht erfuellt
+					DEBUG("level too low: own level: %i item level: %i",getBaseAttr()->m_level,it->m_level_req);
+					req= false;
+				}
+
+
+				// testen ob Item fuer die Charakterklasse zugelassen ist
+				char mask = Item::REQ_WARRIOR;
+				if (getTypeInfo()->m_subtype == "mage")
+					mask = Item::REQ_MAGE;
+				if (getTypeInfo()->m_subtype == "archer")
+					mask = Item::REQ_ARCHER;
+				if (getTypeInfo()->m_subtype == "priest")
+					mask = Item::REQ_PRIEST;
+
+				if (it->m_char_req & mask != mask)
+				{
+					// Spieler darf das Item nicht benutzen (falsche Spielerklasse)
+					DEBUG("wrong subtype");
+					req =false;
+				}
+
+				// geforderter Typ um das Item anlegen zu koennen
+				Item::Type req_type = Item::NOITEM;
+
+				if (pos == Equipement::WEAPON || pos == Equipement::WEAPON2)
+					req_type = Item::WEAPON;
+				if (pos == Equipement::HELMET)
+					req_type = Item::HELMET;
+				if (pos == Equipement::SHIELD || pos == Equipement::SHIELD2)
+					req_type = Item::SHIELD;
+				if (pos == Equipement::GLOVES)
+					req_type = Item::GLOVES;
+				if (pos == Equipement::RING_LEFT)
+					req_type = Item::RING;
+				if (pos == Equipement::RING_RIGHT)
+					req_type = Item::RING;
+				if (pos == Equipement::AMULET)
+					req_type = Item::AMULET;
+				if (pos == Equipement::ARMOR)
+					req_type = Item::ARMOR;
+
+
+				if (it->m_type != req_type)
+				{
+					// Item passt nicht an den entsprechenden Ausruestungsslot
+					DEBUG("wrong itemtype");
+					req= false;
+				}
+
+				
+
+			}
+			else
+			{
+			// Item soll im Inventar abgelegt werden
+			DEBUG("swap in inventory");
+
+			// Groesse die das Item haben muss
+				Item::Size size = Item::BIG;
+
+				if (pos >= Equipement::MEDIUM_ITEMS)
+					size = Item::MEDIUM;
+				if (pos >= Equipement::SMALL_ITEMS)
+					size = Item::SMALL;
+
+				if (it->m_size != size)
+				{
+				// Groesse stimmt nicht
+					DEBUG("wrong size");
+					req = false;
+				}
+
+				if (pos >= Equipement::SMALL_ITEMS && pos < Equipement::SMALL_ITEMS+10)
+				{
+					// Guertel, nur Traenke zulassen
+					if (it->m_type != Item::POTION)
+						req = false;
+				}
+
+			}
+
+			if (req == false)
+			{
+			// Vorraussetzungen nicht erfuellt
+				return true;
+			}
+		}
+
+
+		// Vertauschen von Cursoritem und angeklicktem Item
+		m_equipement->swapCursorItem(pos);
+
+		Item* itm;
+		if (pos==Equipement::WEAPON || pos == Equipement::WEAPON2)
+		{
+			// Waffe wurde angelegt, bei zweihaendig testen ob der Schild Slot frei ist
+			ServerItem* weapon = getWeapon();
+			if (weapon!=0 && weapon->m_weapon_attr->m_two_handed)
+			{
+				if (getShield()!=0)
+				{
+					// Schild Slot ist nicht frei
+					// Schild muss entfernt werden
+					short shpos= Equipement::SHIELD;
+					if (pos == Equipement::WEAPON2)
+						shpos = Equipement::SHIELD2;
+					
+					// Wenn aktuell kein Item am Cursor gehalten wird
+					if (m_equipement->getItem(Equipement::CURSOR_ITEM)==0)
+					{
+						// Schild aufnehmen
+						m_equipement->swapCursorItem(shpos);
+					}
+					else
+					{
+						// Schild ins Inventar verschieben
+						itm =0;
+						// Schild aus dem Schildslot holen
+						m_equipement->swapItem( itm,shpos);
+						
+						if (!getEquipement()->insertItem(itm))
+						{
+							// Einfuegen ins Inventar fehlgeschlagen
+							// Item fallen lassen
+							getRegion()->dropItem(itm,getGeometry()->m_shape.m_coordinate_x,getGeometry()->m_shape.m_coordinate_y);	
+						}
+					}
+				}
+			}
+		}
+
+
+		if (pos==Equipement::SHIELD || pos == Equipement::SHIELD2)
+		{
+			// Schild soll verwendet werden, testen dass keine zweihaendige Waffe benutzt wird
+			ServerItem* weapon = getWeapon();
+			if (weapon!=0 && weapon->m_weapon_attr->m_two_handed)
+			{
+				
+				// zweihaendige Waffe wird verwendet, muss entfernt werden
+				short wpos= Equipement::WEAPON;
+				if (pos == Equipement::SHIELD2)
+					wpos = Equipement::WEAPON2;
+			
+				m_equipement->swapCursorItem(wpos);
+			}
+		}
+		
+		// Wenn an der Ausruestung etwas geaendert wurde
+		if (pos <Equipement::CURSOR_ITEM)
+		{
+			// modifizierte Basisattribute neu berechnen
+			calcBaseAttrMod();
+		}
+	}
+	else
+	{
+		// Item soll verbraucht werden
+		it = static_cast<ServerItem*>(m_equipement->getItem(pos));
+		if (it!=0)
+		{
+			if (it->m_useup_effect==0)
+			{
+				// Item kann nicht verbraucht werden
+				return true;
+			}
+
+			// Wirkung des Items
+			applyDynAttrMod(it->m_useup_effect);
+
+			// entfernen aus dem Inventar durch Tausch mit einem Nullpointer
+			Item* swap=0;
+			m_equipement->swapItem(swap,pos);
+
+			// Typ und Subtyp des Items
+			Item::Type type = it->m_type;
+			Item::Subtype stype = it->m_subtype;
+
+			// Item loeschen
+			delete it;
+
+			if (pos>=Equipement::SMALL_ITEMS && pos < Equipement::SMALL_ITEMS+10)
+			{
+				// Item befand sich im Guertel
+				// suchen nach einem aehnlichen Item zum nachruecken
+				for (int i=10;i<30;i++)
+				{
+					it = static_cast<ServerItem*>(m_equipement->getItem(Equipement::SMALL_ITEMS+i));
+
+					if (it==0)
+						continue;
+
+					if (it->m_type == type && it->m_subtype == stype)
+					{
+						// Item zum tauschen gefunden
+						swap=0;
+
+						// von der aktuellen Position wegnehmen
+						m_equipement->swapItem(swap,Equipement::SMALL_ITEMS+i);
+						// an der Position des verbrauchten Items einfuegen
+						m_equipement->swapItem(swap,pos);
+
+						break;
+					}
+				}
+			}
+		}
+	}
+	return true;
+}
+
+ServerItem* Player::getWeapon()
+{
+	ServerItem* si = static_cast<ServerItem*>(m_equipement->getItem(Equipement::WEAPON));
+	if (m_secondary_equip)
+	{
+		si = static_cast<ServerItem*>(m_equipement->getItem(Equipement::WEAPON2));
+	}
+	return si;
+}
+
+ServerItem* Player::getShield()
+{
+	ServerItem* si = static_cast<ServerItem*>(m_equipement->getItem(Equipement::SHIELD));
+		if (m_secondary_equip)
+	{
+		si = static_cast<ServerItem*>(m_equipement->getItem(Equipement::SHIELD2));
+	}
+	return si;
+}
+
+Action::ActionEquip Player::getActionEquip()
+{
+	ServerItem* weapon = getWeapon();
+	if (weapon ==0)
+	{
+		return Action::NO_WEAPON;
+	}
+	
+	if (weapon->m_weapon_attr->m_two_handed)
+	{
+		return Action::TWO_HANDED;
+	}
+	else
+	{
+		return Action::	ONE_HANDED;
+	}
+	
+}
+
+void Player::increaseAttribute(CreatureBaseAttr::Attribute attr)
+{
+	switch (attr)
+	{
+		case (CreatureBaseAttr::STRENGTH):
+			getBaseAttr()->m_strength++;
+			getBaseAttr()->m_max_health += 5;
+			getDynAttr()->m_health +=5;
+			break;
+		case (CreatureBaseAttr::DEXTERITY):
+			getBaseAttr()->m_dexterity++;
+			getBaseAttr()->m_attack_speed +=3;
+			break;
+		case (CreatureBaseAttr::WILLPOWER):
+			getBaseAttr()->m_willpower++;
+			break;
+		case (CreatureBaseAttr::MAGIC_POWER):
+			getBaseAttr()->m_magic_power++;
+			break;
+
+	}
+	calcBaseAttrMod();
+}
+
+void Player::gainLevel()
+{
+	// Level um 1 erhöhen
+	getBaseAttr()->m_level++;
+
+	// heilen
+	getDynAttr()->m_health =getBaseAttrMod()->m_max_health;
+
+	// Erfahrungspunkte reduzieren
+	getDynAttr()->m_experience-= getBaseAttr()->m_max_experience;
+
+	if (getDynAttr()->m_experience<0)
+	{
+		getDynAttr()->m_experience=0;
+	}
+
+	// maximale Erfahrungspunkte erhoehen
+	getBaseAttr()->m_max_experience += getBaseAttr()->m_level*100;
+	getBaseAttr()->m_max_experience *= 1.2;
+
+
+	// Attributpunkte hinzufuegen
+	m_attribute_points +=5;
+
+	if (getBaseAttr()->m_level %10 ==0 || getBaseAttr()->m_level==15 || getBaseAttr()->m_level==5 || getBaseAttr()->m_level==3)
+	{
+		// Skillpunkt hinzufuegen
+		m_skill_points ++;
+	}
+
+	// Schaden neu berechnen
+	recalcDamage();
+
+}
+
+
+bool Player::onClientCommand( ClientCommand* command)
+{
+	DEBUG5("Kommando (%f %f) button: %i id: %i action: %i",command->m_coordinate_x,command->m_coordinate_y,command->m_button,command->m_id, command->m_action);
+
+	Party* p, *p2;
+	ServerWObject* wo;
+
+	Item* si;
+	DropSlot ds;
+	// Wahrscheinlichkeiten BIG, MEDIUM, SMALL, GOLD
+	float prob[4] = {0.1, 0.2, 0.2, 0.2};
+	
+	// prob_size, min level, max_level, prob_magic, magic_power
+	ds.init(prob, 0,20, 0.3, 2000);
+
+	switch(command->m_button)
+	{
+
+	// je nach dem welche Eingabe getaetigt wurde
+		// Behandlung rechte Maustaste
+
+		case LEFT_MOUSE_BUTTON:
+		case RIGHT_MOUSE_BUTTON:
+		case LEFT_SHIFT_MOUSE_BUTTON:
+			onGamefieldClick(command);
+			break;
+
+		case BUTTON_PARTY_APPLY:
+			DEBUG("apply to party %i",command->m_id);
+			p = getWorld()->getParty((WorldObject::TypeInfo::Fraction) (command->m_id + TypeInfo::FRAC_PLAYER_PARTY));
+			if (p->getNrMembers()==0)
+				break;
+			p->addCandidate(getId());
+
+			break;
+
+		case BUTTON_PARTY_ACCEPT:
+			DEBUG("accept %i",command->m_id)
+
+			p = getWorld()->getParty(getTypeInfo()->m_fraction);
+			p ->acceptCandidate(command->m_id);
+			// FIXME: Spieler ausgeben lassen !
+			wo = getWorld()->getSWObject(command->m_id,getGridLocation()->m_region);
+			if (wo !=0)
+			{
+				p2 = getWorld()->getParty(wo->getTypeInfo()->m_fraction);
+				p2->removeMember(command->m_id);
+				wo->getTypeInfo()->m_fraction = getTypeInfo()->m_fraction;
+			}
+
+			break;
+
+		case BUTTON_SET_LEFT_ACTION:
+			m_left_action = (Action::ActionType) command->m_action;
+			recalcDamage();
+			break;
+
+		case BUTTON_SET_RIGHT_ACTION:
+			m_right_action = (Action::ActionType) command->m_action;
+			recalcDamage();
+			break;
+
+		case BUTTON_ITEM_LEFT:
+		case BUTTON_ITEM_RIGHT:
+			onItemClick(command);
+			break;
+
+		case BUTTON_SAVE_QUIT:
+			DEBUG("players wants to quit, sending savegame");
+			sendSavegame();
+			break;
+
+		case BUTTON_SWAP_EQUIP:
+			m_secondary_equip = !m_secondary_equip;
+			calcBaseAttrMod();
+			DEBUG5("switching equip");
+			break;
+
+		case REQUEST_DETAILED_ITEM:
+			DEBUG5("requested item %i",command->m_id);
+			sendDetailedItem(command->m_id);
+			break;
+
+		case REQUEST_ABILITY_DAMAGE:
+			DEBUG5("requested info %i",command->m_id);
+			sendAbilityDamage((Action::ActionType) command->m_id);
+			break;
+
+		case BUTTON_INCREASE_ATTRIBUTE:
+			if (m_attribute_points>0)
+			{
+				// noch freie Attributpunkte vorhanden
+				m_attribute_points--;
+
+				// entsprechendes Attribut erhoehen
+				increaseAttribute((CreatureBaseAttr::Attribute) command->m_id);
+			}
+			break;
+
+		case BUTTON_LEARN_ABILITY:
+			if (m_skill_points>0)
+			{
+				// Skill punkte stehen zur Verfuegung
+				if (checkAbilityLearnable(( Action::ActionType) command->m_id))
+				{
+					// Faehigkeit kann gelernt werden
+
+					m_skill_points--;
+
+					// Bit fuer die Faehigkeit setzen
+					getBaseAttr()->m_abilities[command->m_id/32] |= (1 << (command->m_id%32));
+
+					DEBUG("lerne Faehigkeit %i", command->m_id);
+
+					calcBaseAttrMod();
+				}
+			}
+			break;
+
+		case DROP_ITEM:
+			si = getEquipement()->getItem(Equipement::CURSOR_ITEM);
+			if (si !=0)
+			{
+				si=0;
+				getEquipement()->swapItem(si,Equipement::CURSOR_ITEM);
+				getRegion()->dropItem(si,getGeometry()->m_shape.m_coordinate_x,getGeometry()->m_shape.m_coordinate_y);
+			}
+
+		case DEBUG_SIGNAL:
+			// Debugging
+			if (command->m_id==0)
+			{
+				gainLevel();
+			}
+			if (command->m_id==2)
+			{
+				si = ItemFactory::createItem(Item::WEAPON,"short_sw",1000);
+				getRegion()->dropItem(si,10,20);
+			}
+			if (command->m_id==1)
+			{
+				// Debugging 2
+				si = ItemFactory::createItem(Item::WEAPON,"short_sw",1000);
+				getEquipement()->swapItem(si,Equipement::MEDIUM_ITEMS+4);
+				if (si!=0)
+					delete si;
+
+				si = ItemFactory::createItem(Item::HELMET,"steel_hlm",100);
+				getEquipement()->swapItem(si,Equipement::MEDIUM_ITEMS+5);
+				if (si!=0)
+					delete si;
+
+				si = ItemFactory::createItem(Item::GLOVES,"leath_gl",100);
+				getEquipement()->swapItem(si,Equipement::MEDIUM_ITEMS+6);
+				if (si!=0)
+					delete si;
+
+				si = ItemFactory::createItem(Item::ARMOR,"heavy_arm",500);
+				getEquipement()->swapItem(si,Equipement::BIG_ITEMS+3);
+				if (si!=0)
+					delete si;
+
+				si = ItemFactory::createItem(Item::SHIELD,"iron_sh",100);
+				getEquipement()->swapItem(si,Equipement::BIG_ITEMS+4);
+				if (si!=0)
+					delete si;
+
+				si = ItemFactory::createItem(Item::RING,"ring",100);
+				getEquipement()->swapItem(si,Equipement::SMALL_ITEMS+15);
+				if (si!=0)
+					delete si;
+
+				si = ItemFactory::createItem(Item::RING,"ring",400);
+				getEquipement()->swapItem(si,Equipement::SMALL_ITEMS+16);
+				if (si!=0)
+					delete si;
+
+				si = ItemFactory::createItem(Item::AMULET,"amulet",100);
+				getEquipement()->swapItem(si,Equipement::SMALL_ITEMS+17);
+				if (si!=0)
+					delete si;
+
+				si = ItemFactory::createItem(Item::AMULET,"amulet",800);
+				getEquipement()->swapItem(si,Equipement::SMALL_ITEMS+18);
+				if (si!=0)
+					delete si;
+
+			}
+			else if (command->m_id==3)
+			{
+				
+				si = ItemFactory::createItem(ds);
+				bool ret = getEquipement()->insertItem(si);
+				
+				if (ret == false)
+				{
+					getEquipement()->clear();
+					getEquipement()->insertItem(si);
+				}
+				
+			}
+			break;
+
+		default: ;
+	}
+}
+
+bool Player::update(float time)
+{
+	// Aufruf des updates für von Creature
+	Creature::update(time);
+
+	// Player spezifische Updateroutine
+	DEBUG5("Update des Playerobjekts [%i] wird gestartet", getId());
+
+	// Debugging
+	//return true;
+
+	Trade* trade = 0;
+	// handle inputs form network
+	ServerNetwork* net = getWorld()->getNetwork();
+	if( net->getSlotStatus( m_network_slot )!=NET_CONNECTED )
+	{
+		// disconnect, Spieler sichern und aus der Welt entfernen
+		// TODO
+		//saveObject( false );
+		DEBUG("disconnect");
+		setDestroyed(true);
+
+		return false;
+	}
+
+	Packet* data;
+	int len;
+
+	if (getState() == STATE_REGION_ENTERED)
+	{
+		// Spieler hat Region betreten und ist in der Region noch nicht aktiviert
+
+		Region* reg = getRegion();
+		
+		ServerHeader header;
+
+		CharConv cv;
+		// Header erstellen
+		memset(&header,0,sizeof(header));
+		header.m_content = PTYPE_S2C_REGION;
+		header.toString(&cv);
+
+		reg->getRegionDataString(&cv);
+
+		net->pushSlotMessage(m_network_slot, cv.getBitStream());
+
+
+		// Spieler aktivieren
+		setState(STATE_ACTIVE);
+	}
+
+	ClientHeader headerp;
+	CharConv* cv;
+	while( net->numberSlotMessages( m_network_slot )>0 )
+	{
+		DEBUG5("received msg");
+		data=0;
+		net->popSlotMessage( m_network_slot,data );
+		
+		cv = new CharConv(data);
+
+		headerp.fromString(cv);
+
+		if( headerp.m_content == PTYPE_C2S_DATA && !headerp.m_chatmessage)
+		{
+			ClientCommand comp;
+
+			comp.fromString(cv);
+			DEBUG5("Kommando (%f %f) %i %i",comp.m_coordinate_x,comp.m_coordinate_y,comp.m_button, comp.m_id);
+
+			/*for (char* c =(char*) comp; c< sizeof(ClientCommand) + (char*) comp; c++)
+				printf("%02x",*c);
+			printf("\n");
+			*/
+			onClientCommand( &comp );
+
+		}
+		
+
+		// Chatmessage erhalten
+		if(  headerp.m_content == PTYPE_C2S_DATA && headerp.m_chatmessage	)
+		{
+			DEBUG("Chatmessage erhalten");
+			/*for (int i=0;i<len;i++)
+				printf("%c",data[i]);
+			printf("\n");
+			*/
+			/*
+			char* msgp = data + sizeof(ClientHeader);
+			int len = sizeof(PackageHeader)+sizeof(Chatmessage);
+			char sendmsg[len];
+			Chatmessage cmsg;
+			PackageHeader header;
+			memset(&header,0,sizeof(PackageHeader));
+
+			// Weiterleiten an alle Player
+			WorldObjectSelector* sel = new WorldObjectSelector;
+			sel->getObjectType().setObjectType(OBJECTTYPE_USER);
+			sel->setSelectObjectType(true);
+
+			list<WorldObject*>* ret = new list<WorldObject*>;
+
+			getWorld()->getWorldObjectsInCircle(getCoordinateX(),getCoordinateY(),1000, sel,ret);
+
+			list<WorldObject*>::iterator i;
+
+
+			header.m_chatmessages++;
+			header.m_mark = MARK;
+
+			string msg =getName() ;
+			msg += " :> ";
+			msg.append(msgp,CHATMESSAGE_LEN-msg.size());
+
+			memcpy(&cmsg.m_message,msg.c_str(),CHATMESSAGE_LEN);
+			cmsg.m_message[CHATMESSAGE_LEN-1]=0;
+
+
+			memcpy(sendmsg,&header, sizeof(PackageHeader));
+			memcpy(sendmsg+sizeof(PackageHeader),&cmsg,sizeof(Chatmessage));
+
+
+
+			Player* usr;
+
+			//DEBUG4("zu sendende nachricht %s", chat.m_message);
+			for (i=ret->begin(); i!=ret->end();i++)
+			{
+					if ((*i)->getObjectType().getObjectType() == OBJECTTYPE_USER)
+					{
+
+						usr = (Player*) (*i);
+
+						DEBUG4("sende nachricht an Player %i", usr->getId());
+						net->pushSlotMessage(usr->getNetworkSlot(), sendmsg, len );
+					}
+			}
+			DEBUG3("Senden abgeschlossen");
+			*/
+		}
+
+		delete cv;
+		net->deallocatePacket(data);
+
+	}
+
+
+	// Behandlung des Handels
+	if (getTradeId() !=0)
+	{
+		trade = getWorld()->getTrade(getTradeId());
+
+		/*
+		// Wenn der Handel nicht existiert Fehler ausgeben
+		if (trade == 0)
+		{
+			setTradeId(0);
+		}
+		else
+		{
+			// eigene Position bei dem Handel bestimmen
+			int idx = trade->getPlayerIndex(getId());
+
+			// Wenn spieler gestorben Handel abbrechen
+			if (getState()==STATES_DEAD)
+			{
+				trade->abortTrade();
+			}
+
+			DEBUG5("Playerobjekt [%i] hat das Handelsobjekt [%i] als sein Handel erkannt", getId() ,getTradeId());
+			// Abfragen ob der Handel bereits abgeschlossen ist.
+			if (idx ==-1)
+			{
+				setTradeId(0);
+			}
+			else if (trade->getFinished()==true)
+			{
+				// Abfragen ob der Handel erfolgreich war
+				if (trade->getSuccessful()==true)
+				{
+					// Wenn Gegenstände noch nicht ausgetauscht
+					if (trade->getGotItems(idx)==false)
+					{
+						// Items auf erhalten setzen
+						trade->setGotItems(true, idx);
+
+						// Items austauschen
+						ItemList* tmp = trade->getInventory(idx);
+						trade->setInventory(getItems(),idx);
+						setItems(tmp);
+
+						calcBaggage();
+					}
+
+				}
+				DEBUG5("Handel [%i] für Player [%i] abgeschlossen", getTradeId(), getId());
+				// Handel ist erledigt, id auf 0 setzen
+				setTradeId(0);
+			}
+
+		}
+		if (getCommand()->getType() == COMMAND_TRADE && getTradeId()==0)
+		{
+			getCommand()->setType(COMMAND_NONE);
+			getObjectType().setActionType(ACTION_NONE);
+			getAction()->setType(ACTION_NONE);
+		}
+		*/
+
+	}
+
+
+	// Wenn ausreichend lange tot
+	/*
+	if (getState()==STATES_DEAD && getAction()->getProgress()==1)
+	{
+		//respawnen
+		setState(STATES_ACTIVE);
+		setHealth(getMaxHealth());
+
+		// RespawnPoint, das muss dann nochmal verbessert werden
+		// aktuell gibts nen Fehler wenn (0,0) nicht frei ist
+
+		float x,y;
+		getWorld()->getClosestFreeSquare(0,0,x,y);
+
+		MoveTo(x,y);
+
+		setTradeId(0);
+		getCommand()->setType(COMMAND_NONE);
+		getObjectType().setActionType(ACTION_NONE);
+		getAction()->setType(ACTION_NONE);
+
+
+	}
+	*/
+	/*
+	int len = 5+rand()%50;
+	char* tmp=new char[len];
+	memset(tmp,'a',len);
+	net->pushSlotMessage( m_network_slot,tmp,len);
+	*/
+
+	sendGameData();
+
+
+
+
+	m_save_timer -= time;
+	if (m_save_timer <=0)
+	{
+		m_save_timer = 10000;
+		sendSavegame();
+	}
+
+	return true;
+}
+
+void Player::performActionCritPart(float goalx, float goaly, ServerWObject* goal)
+{
+	if (getAction()->m_type == Action::TAKE_ITEM)
+	{
+		Item* itm = getRegion()->getItem(getCommand()->m_goal_object_id);
+
+		if (itm !=0)
+		{
+			bool ret = getEquipement()->insertItem(itm);
+
+			if (ret ==true)
+			{
+				getRegion()->deleteItem(getCommand()->m_goal_object_id);
+			}
+		}
+		else
+		{
+			DEBUG("no item found at %f %f",goalx,goaly);
+		}
+	}
+	else
+	{
+		Creature::performActionCritPart(goalx,goaly,goal);
+	}
+}
+
+void Player::sendGameData()
+{
+	
+	// handle inputs form network
+	ServerNetwork* net = getWorld()->getNetwork();
+
+	Trade* trade = 0;
+	WorldObject* obj=0;
+	int len;
+
+	ServerHeader header;
+
+	header.m_content=PTYPE_S2C_DATA;
+	header.m_objects = 0;
+	header.m_items=0;
+	header.m_drop_items=0;
+	header.m_projectiles =0;
+	header.m_chatmessage=false;
+	header.m_trade= false;
+	if (getTradeId()!=0 && trade != 0 )
+		header.m_trade = true;
+	header.m_detailed_item = 0;
+
+	CharConv cv;
+	//DEBUG5("packed bytes: %i bytes",cv.getBitStream()->GetNumberOfBitsUsed());
+	
+	list<ServerWObject*> wobjs;
+	wobjs.clear();
+
+	// Ausschnitt der Welt, der fuer den Spieler sichtbar ist
+	Shape* sh = &(getGeometry()->m_shape);
+	Shape shs;
+
+	shs.m_coordinate_x = sh->m_coordinate_x;
+	shs.m_coordinate_y = sh->m_coordinate_y;
+	shs.m_type = Shape::RECT;
+	shs.m_extent_x = 12;
+	shs.m_extent_y = 12;
+
+	// alle sichtbaren Objekte holen
+	if( !getWorld()->getSWObjectsInShape(&shs,getGridLocation()->m_region,&wobjs ) )
+		return;
+	
+	
+	
+	// Objekte einpacken
+	for( list<ServerWObject*>::iterator i=wobjs.begin() ; i!=wobjs.end() ; )
+	{
+		// Objekt in das Paket packen
+		obj = (WorldObject*) (*i);
+
+		// Objekte die statisch sind nicht übertragen
+		if (obj->getState() == STATE_STATIC)
+		{
+			i = wobjs.erase(i);
+		}
+		else if (obj->getId() == getId())
+		{
+			i = wobjs.erase(i);
+		}
+		else
+		{
+			++i;
+		}
+
+	}
+	header.m_objects= wobjs.size();
+	
+	list<DmgProjectile*> res2;
+	list<DmgProjectile*>::iterator i2;
+	// Liste der sichtbaren Projektile
+	getWorld()->getProjectilesOnScreen(sh->m_coordinate_x,sh->m_coordinate_y,getGridLocation()->m_region,&res2);
+	header.m_projectiles = res2.size();
+	
+	header.m_items = m_equipement->getNumberItems(m_secondary_equip);
+	
+	// am Boden liegende Gegenstaende
+	list<DropItem*> res3;
+	list<DropItem*>::iterator it3;
+	getRegion()->getItemsOnScreen(sh->m_coordinate_x,sh->m_coordinate_y,&res3);
+	header.m_drop_items = res3.size();
+	header.toString(&cv);
+		
+	// Begin packet erstellen
+	toStringComplete(&cv);
+
+	//DEBUG("bits written %i",cv.getBitStream()->GetNumberOfBitsUsed());
+	
+	
+
+
+	// Objekte einpacken
+	for( list<ServerWObject*>::iterator i=wobjs.begin() ; i!=wobjs.end() ; ++i)
+	{
+		// Objekt in das Paket packen
+		obj = (WorldObject*) (*i);
+
+		obj->toString(&cv);
+		DEBUG5("packed object %i",obj->getId());
+
+
+	}
+
+
+	// Projektile einpacken
+	for( i2=res2.begin() ; i2!=res2.end() ; ++i2)
+	{
+		(*i2)->toString(&cv);
+	}
+	DEBUG5("anzahl projektile %i",header.m_projectiles);
+
+	// Gegenstaende senden
+	// Inventar
+	int nr;
+	m_equipement->toString(&cv,nr,m_secondary_equip);
+	
+	
+	
+	// Gegenstaende am Boden senden
+	for (it3 = res3.begin(); it3 != res3.end(); ++it3)
+	{
+		(*it3)->toString(&cv);
+	}
+
+	DEBUG5("anzahl gedroppter items %i",header.m_drop_items);
+/*
+	int len = ch.getBitStream()->GetNumberOfBytesUsed();
+	cv.backToStart();
+	header.toString(&cv);
+	ch.getBitStream()->
+*/
+	//DEBUG5("sending %i byte of data",len);
+	//DEBUG5("objects %i projectiles %i",header.m_objects,header.m_projectiles);
+
+	/*
+	for (int j=0;buf+j< bp;j++)
+	{
+	cp = (unsigned char*) buf+j;
+		 //if (i%10==8)
+		//	 printf("\n %p\n",cp);
+
+	printf("%c%c ",hex(*cp/16),hex(*cp%16));
+}
+	printf("\n\n");
+	*/
+	
+	DEBUG5("sending %i bytes",cv.getBitStream()->GetNumberOfBytesUsed());
+	net->pushSlotMessage(m_network_slot, cv.getBitStream(),HIGH_PRIORITY, UNRELIABLE_SEQUENCED);
+
+}
+
+void Player::sendDetailedItem(short pos)
+{
+	ServerItem* it = static_cast<ServerItem*>(m_equipement->getItem(pos));
+
+	if (it!=0)
+	{
+		ServerNetwork* net = getWorld()->getNetwork();
+		int len;
+
+		// Puffer fuer Item
+		CharConv cv;
+		ServerHeader header;
+
+		memset(&header,0,sizeof(header));
+		header.m_content = PTYPE_S2C_ITEM;
+		header.m_detailed_item = pos;
+		header.toString(&cv);
+		it->toStringComplete(&cv,pos);
+		net->pushSlotMessage(m_network_slot, cv.getBitStream());
+
+	}
+}
+
+
+void Player::sendAbilityDamage(Action::ActionType act)
+{
+	// Wertebereich fuer Aktionen pruefen
+	if (act<0 || act >=192)
+		return;
+
+	ServerNetwork* net = getWorld()->getNetwork();
+	int len;
+
+	// Puffer
+	CharConv cv;
+	ServerHeader header;
+
+	// Header erstellen
+	memset(&header,0,sizeof(header));
+	header.m_content = PTYPE_S2C_DAMAGE;
+	// Typ der Aktion wird im Feld fuer Item untergebracht...
+	header.m_detailed_item = act;
+	header.toString(&cv);
+
+	// Damage berechnen
+	Damage dmg;
+	calcDamage(act,dmg);
+
+	// Daten in den Puffer schreiben
+	dmg.toString(&cv);
+	net->pushSlotMessage(m_network_slot, cv.getBitStream());
+
+
+}
+
+void Player::sendSavegame()
+{
+	ServerNetwork* net = getWorld()->getNetwork();
+	int len;
+
+	// Puffer fuer Savegame
+	CharConv cv;
+	ServerHeader header;
+
+	memset(&header,0,sizeof(header));
+	header.m_content = PTYPE_S2C_SAVEGAME;
+	header.toString(&cv);
+	toSavegame(&cv);
+	net->pushSlotMessage(m_network_slot,  cv.getBitStream());
+
+	
+}
+
+void Player::calcBaseDamage(Action::ActionType act,Damage& dmg)
+{
+	Creature::calcBaseDamage(act,dmg);
+
+
+	ServerItem* weapon = getWeapon();
+
+	if (weapon!=0)
+	{
+		// Schaden der Waffe
+		Damage& wdmg=weapon->m_weapon_attr->m_damage;
+
+		int i;
+		// Schaden uebernehmen
+		for (i=0;i<4;i++)
+		{
+			dmg.m_min_damage[i] += wdmg.m_min_damage[i];
+			dmg.m_max_damage[i] += wdmg.m_max_damage[i];
+			dmg.m_multiplier[i] *= wdmg.m_multiplier[i];
+		}
+
+		// Statusmods uebernehmen
+		for (i=0;i<NR_STATUS_MODS;i++)
+		{
+			dmg.m_status_mod_power[i] += wdmg.m_status_mod_power[i];
+		}
+
+		// weitere Attribute
+		dmg.m_power += wdmg.m_power;
+		dmg.m_attack += wdmg.m_attack;
+		dmg.m_crit_perc += wdmg.m_crit_perc;
+		dmg.m_special_flags |= wdmg.m_special_flags;
+
+	}
+}
+
+void Player::calcBaseAttrMod()
+{
+	Creature::calcBaseAttrMod();
+	ServerItem* si;
+
+	// Wirkung der Ausruestungsgegenstaende einfuegen
+
+	// Waffe
+	si = getWeapon();
+	if (si!=0)
+	{
+		if (si->m_equip_effect !=0)
+		{
+			applyBaseAttrMod(si->m_equip_effect,false);
+		}
+
+		if (si->m_weapon_attr !=0)
+		{
+			getBaseAttrMod()->m_attack_speed += si->m_weapon_attr ->m_dattack_speed;
+			getBaseAttrMod()->m_attack_range = si->m_weapon_attr ->m_attack_range;
+		}
+	}
+
+
+
+	// Ruestung
+	si = static_cast<ServerItem*>(m_equipement->getItem(Equipement::ARMOR));
+	if (si!=0 && si->m_equip_effect !=0)
+	{
+		applyBaseAttrMod(si->m_equip_effect,false);
+	}
+
+	// Helm
+	si = static_cast<ServerItem*>(m_equipement->getItem(Equipement::HELMET));
+	if (si!=0 && si->m_equip_effect !=0)
+	{
+		applyBaseAttrMod(si->m_equip_effect,false);
+	}
+
+	// Schild
+	si = getShield();
+	if (si!=0 && si->m_equip_effect !=0)
+	{
+		applyBaseAttrMod(si->m_equip_effect,false);
+	}
+
+	// Handschuhe
+	si = static_cast<ServerItem*>(m_equipement->getItem(Equipement::GLOVES));
+	if (si!=0 && si->m_equip_effect !=0)
+	{
+		applyBaseAttrMod(si->m_equip_effect,false);
+	}
+
+	// Ring links
+	si = static_cast<ServerItem*>(m_equipement->getItem(Equipement::RING_LEFT));
+	if (si!=0 && si->m_equip_effect !=0)
+	{
+		applyBaseAttrMod(si->m_equip_effect,false);
+	}
+
+	// Ring rechts
+	si = static_cast<ServerItem*>(m_equipement->getItem(Equipement::RING_RIGHT));
+	if (si!=0 && si->m_equip_effect !=0)
+	{
+		applyBaseAttrMod(si->m_equip_effect,false);
+	}
+
+	// Amulett
+	si = static_cast<ServerItem*>(m_equipement->getItem(Equipement::AMULET));
+	if (si!=0 && si->m_equip_effect !=0)
+	{
+		applyBaseAttrMod(si->m_equip_effect,false);
+	}
+
+	// Faehigkeiten anwenden
+
+	// Faehigkeit ausweichen
+	if (checkAbility(Action::EVADE))
+	{
+		getBaseAttrMod()->m_block += getBaseAttrMod()->m_dexterity/ 2;
+	}
+
+		// Faehigkeit Windwandern
+	if (getBaseAttrMod()->m_special_flags & WIND_WALK)
+	{
+		getBaseAttrMod()->m_block += getBaseAttrMod()->m_dexterity/ 4;
+	}
+
+
+	// Blockbonus durch Geschick (nur wenn schon ein Blockwert vorhanden ist)
+	if (getBaseAttrMod()->m_block!=0 || getTypeInfo()->m_subtype == "archer")
+	{
+		getBaseAttrMod()->m_block += getBaseAttrMod()->m_dexterity/ 4;
+	}
+
+	// Faehigkeit Blocken
+	if (checkAbility(Action::BLOCK))
+	{
+		getBaseAttrMod()->m_block += (short) (0.3f*getBaseAttrMod()->m_block);
+	}
+
+
+
+
+	// Schaden neu berechnen
+	recalcDamage();
+
+
+}
+
+void Player::toString(CharConv* cv)
+{
+	DEBUG5("Player::tostring");
+	Creature::toString(cv);
+
+	cv->toBuffer((char*) m_name.c_str(),32);
+
+	/*
+#define hex(a) ((a)>=10) ? (a)-10+'a' : (a)+'0'
+	unsigned char* cp;
+	for (int i=-12;i<25;i++)
+	{
+		cp = (unsigned char*) buf+i;
+		//if (i%10==8)
+		//	printf("\n %p\n",cp);
+
+		printf("%c%c ",hex(*cp/16),hex(*cp%16));
+
+	}
+	printf("\n\n");
+*/
+
+}
+
+void Player::toStringComplete(CharConv* cv)
+{
+	this->toString(cv);
+	cv->toBuffer(getBaseAttr()->m_level);
+	cv->toBuffer(getBaseAttrMod()->m_max_health);
+	cv->toBuffer(getDynAttr()->m_health);
+	cv->toBuffer(getBaseAttrMod()->m_strength);
+	cv->toBuffer(getBaseAttrMod()->m_dexterity);
+	cv->toBuffer(getBaseAttrMod()->m_magic_power);
+	cv->toBuffer(getBaseAttrMod()->m_willpower);
+	cv->toBuffer(m_attribute_points);
+	
+	
+	int i;
+	for (i=0;i<4;i++)
+		cv->toBuffer(getBaseAttrMod()->m_resistances[i]);
+	for (i=0;i<4;i++)
+		cv->toBuffer(getBaseAttrMod()->m_resistances_cap[i]);
+
+
+	cv->toBuffer(getBaseAttr()->m_max_experience);
+	cv->toBuffer(getDynAttr()->m_experience);
+	cv->toBuffer(getBaseAttrMod()->m_armor);
+	cv->toBuffer(getBaseAttrMod()->m_block);
+	cv->toBuffer(getBaseAttrMod()->m_attack);
+	cv->toBuffer(getBaseAttrMod()->m_attack_speed);
+	cv->toBuffer(getBaseAttr()->m_attack_range);
+	cv->toBuffer(m_base_damage.m_power);
+	m_base_damage.toString(cv);
+	m_left_damage.toString(cv);
+	m_right_damage.toString(cv);
+
+	/*
+	for (i=0;i<4;i++)
+	{
+		printf("%s %f - %f\n",Damage::getDamageTypeName((Damage::DamageType) i).c_str(),m_left_damage.m_min_damage[i],m_left_damage.m_max_damage[i]);
+		printf("%s %f - %f\n",Damage::getDamageTypeName((Damage::DamageType) i).c_str(),m_right_damage.m_min_damage[i],m_right_damage.m_max_damage[i]);
+	}
+	*/
+
+	for (i=0;i<6;i++)
+		cv->toBuffer(getBaseAttrMod()->m_abilities[i]);
+
+	float trel1=0,trel2=0;
+	if (m_timer1_max>0)
+	{
+		trel1 = m_timer1 / m_timer1_max;
+	}
+
+	if (m_timer2_max>0)
+	{
+		trel2 = m_timer2 / m_timer2_max;
+	}
+
+	DEBUG5("trel %f %f",trel1,trel2);
+	cv->toBuffer(trel1);
+	cv->toBuffer(trel2);
+	// TODO: Questinformationen
+	
+	
+	
+	
+	// Party Informationen
+	getWorld()->getParty(getTypeInfo()->m_fraction)->toString(cv);
+
+}
+
+void Player::recalcDamage()
+{
+	calcDamage(m_base_action,m_base_damage);
+	calcDamage(m_left_action,m_left_damage);
+	calcDamage(m_right_action,m_right_damage);
+
+	/*
+	for (int i=0;i<4;i++)
+	{
+		printf("%s %f - %f\n",Damage::getDamageTypeName((Damage::DamageType) i).c_str(),m_left_damage.m_min_damage[i],m_left_damage.m_max_damage[i]);
+	}
+
+	for (int i=0;i<4;i++)
+	{
+		printf("%s %f - %f\n",Damage::getDamageTypeName((Damage::DamageType) i).c_str(),m_right_damage.m_min_damage[i],m_right_damage.m_max_damage[i]);
+	}
+*/
+
+}
+
+void Player::toSavegame(CharConv* cvin)
+{
+	
+	int i;
+	// immer binaere Speicherung
+	cvin->toBuffer((char) 1);
+	// TODO Version richtig setzen
+	cvin->toBuffer((short) 1);
+	// Laenge der Datei
+	
+	CharConv* cv = new CharConv;
+	char stmp[11];
+	stmp[10] = '\0';
+	strncpy(stmp,getTypeInfo()->m_subtype.c_str(),10);
+	cv->toBuffer(stmp,10);
+	char ntmp[32];
+	strncpy(ntmp,m_name.c_str(),32);
+	cv->toBuffer(ntmp,32);
+	cv->toBuffer(getBaseAttr()->m_level);
+	cv->toBuffer(getBaseAttr()->m_max_health);
+
+	cv->toBuffer(getBaseAttr()->m_strength);
+	cv->toBuffer(getBaseAttr()->m_dexterity);
+	cv->toBuffer(getBaseAttr()->m_magic_power);
+	cv->toBuffer(getBaseAttr()->m_willpower);
+
+	cv->toBuffer(m_attribute_points);
+	cv->toBuffer(m_skill_points);
+
+	cv->toBuffer(getBaseAttr()->m_resistances[0]);
+	cv->toBuffer(getBaseAttr()->m_resistances[1]);
+	cv->toBuffer(getBaseAttr()->m_resistances[2]);
+	cv->toBuffer(getBaseAttr()->m_resistances[3]);
+
+	cv->toBuffer(getBaseAttr()->m_max_experience);
+	cv->toBuffer(getDynAttr()->m_experience);
+	for (i=0;i<6;i++)
+	{
+		cv->toBuffer(getBaseAttr()->m_abilities[i]);
+	}
+	// TODO: letzte Stadt eintragen
+	cv->toBuffer((short) 1);
+
+	cv->toBuffer((short) m_base_action);
+	cv->toBuffer((short) m_left_action);
+	cv->toBuffer((short) m_right_action);
+
+	
+	// TODO: Questinformationen
+
+	// Items
+	writeEquipement(cv);
+	
+	int len = cv->getBitStream()->GetNumberOfBytesUsed();
+	DEBUG5("length of savegame %i",len+7);
+	cvin->toBuffer(len+7);
+	
+	cvin->toBuffer((char*) cv->getBitStream()->GetData() , len);
+	
+	delete cv;
+	
+	//int len = bp - buf;
+	//cv->toBuffer(bp2,len);
+	
+	
+}
+
+
+void Player::fromSavegame(CharConv* cv)
+{
+	
+	char binsave;
+	cv->fromBuffer<char>(binsave);
+	short version;
+	cv->fromBuffer<short>(version);
+	int len;
+	cv->fromBuffer<int>(len);
+	int i;
+
+	char ctmp[11];;
+	// Typ (schon eher gesetzt)
+	cv->fromBuffer(ctmp,10);
+
+	char name[32];
+	cv->fromBuffer(name,32);
+	name[31]=0;
+	m_name.assign(name);
+	cv->fromBuffer<char>(getBaseAttr()->m_level);
+	cv->fromBuffer<float>(getBaseAttr()->m_max_health);
+	getDynAttr()->m_health = getBaseAttr()->m_max_health;
+
+	cv->fromBuffer<short>(getBaseAttr()->m_strength);
+	cv->fromBuffer<short>(getBaseAttr()->m_dexterity);
+	cv->fromBuffer<short>(getBaseAttr()->m_magic_power);
+	cv->fromBuffer<short>(getBaseAttr()->m_willpower);
+
+	cv->fromBuffer<short>(m_attribute_points);
+	cv->fromBuffer<short>(m_skill_points );
+
+
+	cv->fromBuffer<short>(getBaseAttr()->m_resistances[0]);
+	cv->fromBuffer<short>(getBaseAttr()->m_resistances[1]);
+	cv->fromBuffer<short>(getBaseAttr()->m_resistances[2]);
+	cv->fromBuffer<short>(getBaseAttr()->m_resistances[3]);
+	
+	cv->fromBuffer<float>(getBaseAttr()->m_max_experience);
+	cv->fromBuffer<float>(getDynAttr()->m_experience);
+
+	for (i=0;i<6;i++)
+	{
+		cv->fromBuffer<int>(getBaseAttr()->m_abilities[i]);
+	}
+
+	// TODO: letzte Stadt auslesen
+	short tmp;
+	cv->fromBuffer<short>(tmp);
+
+	cv->fromBuffer<short>(tmp);
+	m_base_action = (Action::ActionType) tmp;
+	cv->fromBuffer<short>(tmp);
+	m_left_action = (Action::ActionType) tmp;
+	cv->fromBuffer<short>(tmp);
+	m_right_action = (Action::ActionType) tmp;
+
+
+	// TODO: Questinformationen
+
+	// Items
+	loadEquipement(cv);
+
+	
+	//DEBUG("size of savegame %i",len);
+
+	calcBaseAttrMod();
+
+}
+
+void Player::writeEquipement(CharConv* cv)
+{
+	ServerItem* it;
+
+	short nr=0;
+	short i;
+	for (i=1;i<=Equipement::SMALL_ITEMS+30;i++)
+	{
+		if (m_equipement->getItem(i)!=0)
+			nr++;
+	}
+	
+	// Platz fuer die Anzahl
+	cv->toBuffer(nr);
+	
+
+	for (i=1;i<=Equipement::SMALL_ITEMS+30;i++)
+	{
+		it = static_cast<ServerItem*>(m_equipement->getItem(i));
+		if (it!=0)
+		{
+			DEBUG5("saving item at pos %i",i);
+			it->toStringComplete(cv,i);
+		}
+	}
+
+	DEBUG5("written %i items",nr);
+
+}
+
+void Player::loadEquipement(CharConv* cv)
+{
+	m_equipement->clear();
+	ServerItem* it;
+	Item* itm;
+	short pos;
+
+	int i;
+	short nr;
+	cv->fromBuffer<short>(nr);
+
+	DEBUG5("reading %i items",nr);
+	for (i=0;i<nr;i++)
+	{
+		it = new ServerItem();
+		it->fromStringComplete(cv,pos);
+		DEBUG5("loaded Item at pos %i",pos);
+		itm  = it;
+		m_equipement->swapItem(itm,pos);
+	}
+
+}
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/player.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,393 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf, Alexander Boehm
+
+	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.
+*/
+
+/**
+ * \file player.h
+ * \defgroup Player \ Menschlicher Nutzer
+ * \ingroup Player
+ * \brief Steuerung eines nutzerkontrollierten Spielers
+ * \author Hans Wulf
+ * \version 1.0
+ * \date 2007/05/30
+ * \note Beinhaltet die Klasse Player
+ */
+#ifndef PLAYER_H
+#define PLAYER_H
+#include <string>
+#include "creature.h"
+//#include "trade.h"
+#include "itemlist.h"
+#include "dropitem.h"
+#include "networkstruct.h"
+#include "servernetwork.h"
+#include "serveritem.h"
+
+/**
+ * \class Player
+ * \brief Klasse fuer Spielercharactere
+ */
+class Player : public Creature {
+//Public stuff
+public:
+	//Fields
+	//Constructors
+	/**
+	 * \fn Player(World* world, unsigned int id)
+	 * \brief Konstruktor
+	 * \param world Welt
+	 * \param id Objekt-ID
+	 *
+	 * Legt ein neues Player Objekt an.
+	 */
+	Player(World* world, int id);
+	
+	
+	
+	/**
+	 * \fn ~Player()
+	 * \brief Destruktor
+	 *
+	 * Gibt den Allokierten Speicher wieder frei
+	 */
+	~Player();
+	
+	
+	//Accessor Methods
+	/**
+	 * \fn int getNetworkSlot()
+	 * \brief Gibt die Nummer des Netzwerkslots zum Senden von Datenpaketen zur&uuml;ck
+	 * \return int Nummer des Netzwerkslots
+	 */
+	int getNetworkSlot()
+	{
+		return m_network_slot;
+	}
+	
+	
+	/**
+	 * \fn void setNetworkSlot(int value)
+	 * \brief Setzt die Nummer des Netzwerkslots zum Senden von Datenpaketen
+	 * \param value Nummer des Netzwerkslots
+	 */
+	void setNetworkSlot(int value)
+	{
+		m_network_slot = value;
+	}
+	
+	
+	/**
+	 * fn Equipement* getEquipement()
+	 * \brief Gibt einen Zeiger auf die Ausruestung des Spielers zurück
+	 * \return Zeiger auf die Ausruestung
+	 */
+	Equipement* getEquipement()
+	{
+		return m_equipement;
+	}
+	
+	//Operations
+	/**
+	 * \fn virtual bool init()
+	 * \brief Initialisierung des Nutzergesteuerten Spielers
+	 * \return bool Gibt an ob die Initialisierung erfolgreich war
+	 */
+	virtual bool init();
+	
+	/**
+	 * \fn virtual bool destroy()
+	 * \brief Zerstoert das Objekt
+	 * \return bool der angibt, ob die Zerst&ouml;rung erfolgreich war
+	 */
+	virtual  bool  destroy();
+	
+	/**
+	 * \fn virtual bool update (float time)
+	 * \brief Updatefunktion des Players
+	 * \param time Verstrichene Zeit
+	 * \return bool, Erfolgreiches Update?
+	 *
+	 * Die Updatefunktion des Players wird in regelm&auml;ssigen Abst&auml;nden von der World aufgerufen und ben&ouml;tigt die Angabe, wie viel Zeit f&uuml;r das Update zur Verf&uuml;gung gestellt wird. Der R&uuml;ckgabewert gibt an ob die Funktion erfolgreich ausgef&uuml;hrt wurde. Da die Funktion hier virtuell definiert wird, wird sie erst in den abgeleiteten Klassen implementiert.
+	 */
+	virtual bool update(float time);
+	
+	/**
+	 * \fn virtual void recalcDamage();
+	 * \brief Berechnet den Schaden, der in internen Damage Objekten angezeigt wird neu
+	 */
+	virtual void recalcDamage();
+	
+	/**
+	 * \fn virtual void calcDamage(ActionType type,Damage& dmg)
+	 * \brief Berechnet den Basisschaden einer Aktion
+	 */
+	virtual void calcBaseDamage(Action::ActionType act,Damage& dmg);
+	
+	/**
+	 * \fn virtual void calcBaseAttrMod()
+	 * \brief Die modifizierten Basisattribute werden neu berechnet. Verwendet die Basisattribute, verwendete Items, sowie temporaere Modifikationen.
+	 */
+	virtual void calcBaseAttrMod();
+	
+	/**
+	 * \fn ServerItem* getWeapon()
+	 * \brief Gibt die aktuell genutzte Waffe zurueck
+	 */
+	ServerItem* getWeapon();
+	
+	/**
+	 * \fn ServerItem* getShield()
+	 * \brief Gibt das aktuell genutzte Schild zurueck
+	 */
+	ServerItem* getShield();
+	
+	
+	/**
+	 * \fn bool onClientCommand( ClientCommand* command)
+	 * \brief  Reaktion auf eine Anweisung des Nutzers
+	 * \param command Kommando des Nutzers
+	 * \return bool gibt an, ob die Behandlung fehlerfrei verlaufen ist
+	 */
+	bool onClientCommand( ClientCommand* command);
+	
+	/**
+	 * \fn bool onGamefieldClick(ClientCommand* command)
+	 * \brief Reaktion auf einen Klick ins das Spielfeld
+	 * \param command Kommando des Nutzers
+	 * \return gibt an, ob die Behandlung fehlerfrei verlaufen ist
+	 */
+	bool onGamefieldClick(ClientCommand* command);
+	
+	/**
+	 * \fn bool onItemClick(ClientCommand* command)
+	 * \brief Reaktion auf einen Klick auf ein Item
+	 * \param command Kommando des Nutzers
+	 * \return gibt an, ob die Behandlung fehlerfrei verlaufen ist
+	 */
+	bool onItemClick(ClientCommand* command);
+	
+	
+	/**
+	 * \fn void sendSavegame()
+	 * \brief Sendet ein Savegame an den Client
+	 */
+	void sendSavegame();
+	
+	/**
+	 * \fn void sendGameDate()
+	 * \brief Sendet ein Datenpaket an den Client
+	 */
+	void sendGameData();
+	
+	/**
+	 * \fn void sendDetailedItem(short pos)
+	 * \brief Sendet detaillierte Informationen ueber ein Item
+	 * \param pos Position des Items
+	 */
+	void sendDetailedItem(short pos);
+	
+	
+	/**
+	 * \fn sendAbilityDamage((Action::ActionType act)
+	 * \brief Sendet den Schaden einer Aktion
+	 * \param act Aktionstyp
+	 */
+	void sendAbilityDamage(Action::ActionType act);
+	
+	/**
+	 * \fn void toString(CharConv* cv)
+	 * \brief Konvertiert das Objekt in einen String und schreibt ihn in der Puffer
+	 * \param buf Ausgabepuffer
+	 * \return Zeiger hinter den beschriebenen Datenbereich
+		 */
+	virtual void toString(CharConv* cv);
+	
+	/**
+	 * \fn void toString(v oi buf)
+	 * \brief Konvertiert das Objekt in einen String und schreibt ihn in der Puffer
+	 * \param buf Ausgabepuffer
+	 * \return Zeiger hinter den beschriebenen Datenbereich
+	 */
+	virtual void toStringComplete(CharConv* cv);
+	
+	/**
+	 * \fn void writeEquipement(CharConv* cv)
+	 * \brief Schreibt des Inventar in den Puffer
+	 * \param buf Ausgabepuffer
+	 * \return Zeiger hinter den beschriebenen Datenbereich
+	 */
+	void writeEquipement(CharConv* cv);
+	
+	/**
+	 * \fn void loadEquipement(CharConv* cv)
+	 * \brief Laedt das Inventar aus dem Puffer
+	 * \param buf Ausgabepuffer
+	 * \return Zeiger hinter den beschriebenen Datenbereich
+	 */
+	void loadEquipement(CharConv* cv);
+	
+	/**
+	 * \fn char* toSavegame(char* buf)
+	 * \brief Erzeugt ein binaeres Savegame und schreibt es in den Puffer
+	 * \param buf Ausgabepuffer
+	 * \return Zeiger hinter den beschriebenen Datenbereich
+	 */	 
+	void toSavegame(CharConv* cv);
+	
+	
+	/**
+	 * \fn void fromSavegame(char* buf)
+	 * \brief Laedt die Daten aus einem Savegame
+	 * \param buf Zeiger auf Savegame
+	 * \return Zeiger hinter den Datenbereich
+	 */
+	void fromSavegame(CharConv* cv);
+	
+	/**
+	 * \fn void increaseAttribute(CreatureBaseAttr::Attribute attr)
+	 * \brief Erhoeht das angegebene Attribut
+	 */
+	void increaseAttribute(CreatureBaseAttr::Attribute attr);
+
+	/**
+	 * \fn virtual Action::ActionEquip getActionEquip()
+	 * \brief Gibt aus, ob die Aktion einhaendig oder zweihaendig ausgefuehrt wird
+	 */
+	virtual Action::ActionEquip getActionEquip();
+
+//Protected stuff
+protected:
+	//Fields
+	//Constructors
+	//Accessor Methods
+	//Operations
+
+	/**
+ * \fn virtual void gainLevel()
+ * \brief Wird aufgerufen, wenn das Lebewesen ein Levelup erhält. Passt Erfahrung und alle Basisattribute an.
+	 */
+	virtual void gainLevel();
+	
+//Private stuff
+private:
+	//Fields
+	/**
+	 * \var m_network_slot
+	 * \brief Nummer des Netzwerkslots zum Senden der Datenpakete
+	 */
+	int m_network_slot;
+	
+	/**
+	 * \var m_package_number
+	 * \brief Gibt Anzahl der gesendeten Datenpakete an
+	 */
+	int m_package_number;
+	
+	/**
+	 * \var float m_save_timer
+	 * \brief Timer bei dessen Ablauf ein Savegame gesendet wird
+	 */
+	float m_save_timer;
+	
+	
+	
+	
+	/**
+	 * \var m_equipement
+	 * \brief Enthaelt die Ausruestung des Spielers
+	 */
+	Equipement* m_equipement;
+	
+protected:
+	
+	
+	/**
+ * \fn virtual void performActionCritPart(float dtime, float goalx, float goaly, Creature* cgoal)
+ * \brief Fuehrt den entscheidenden Part einer Action (Schaden austeilen, Status veraendern usw aus
+ * \param goalx x-Koordinate des Zieles
+ * \param goaly x-Koordinate des Zieles
+ * \param goal Zeiger auf der Zielobjekt, ist NULL wenn kein Zielobjekt existiert
+	 */
+	virtual void performActionCritPart(float goalx, float goaly, ServerWObject* goal);
+	
+	/**
+	 * \var std::string m_name
+	 * \brief Name des Spielers
+	 */
+	std::string m_name;
+	
+	
+	/**
+	 * \var short m_attribute_points
+	 * \brief Anzahl noch zu verteilender Attributspunkte
+	 */
+	short m_attribute_points;
+	
+	/**
+	 * \var short m_skill_points
+	 * \brief Anzahl noch zu verteilender Skillpunkte
+	 */
+	short m_skill_points;
+	
+	/**
+	 * \var bool m_secondary_equip
+	 * \brief Zeigt an, ob die zweite Ausruestung benutzt wird
+	 */
+	bool m_secondary_equip;
+	
+	/**
+	 * \var Damage m_base_damage
+	 * \brief Schaden der mit der Basisattacke ausgeteilt wird
+	 */
+	Damage m_base_damage;
+
+	/**
+	 * \var Damage m_left_damage
+	 * \brief Schaden der mit der Attacke auf der linken Maustaste ausgeteilt wird
+	 */
+	Damage m_left_damage;
+
+	/**
+	 * \var Damage m_right_damage
+	 * \brief Schaden der mit der Attacke auf der rechten Maustaste ausgeteilt wird
+	 */
+	Damage m_right_damage;
+	
+	/**
+	 * \var Action::ActionType m_base_action
+	 * \brief Basisaktion des Spielers
+	 */
+	Action::ActionType m_base_action;
+	
+	/**
+	 * \var Action::ActionType m_left_action
+	 * \brief Aktion die auf mit linke Maustaste ausgeloest wird
+	 */
+	Action::ActionType m_left_action;
+	
+	/**
+	 * \var Action::ActionType m_right_action
+	 * \brief Aktion die auf mit rechten Maustaste ausgeloest wird
+	 */
+	Action::ActionType m_right_action;
+	
+	//Constructors
+	//Accessor Methods
+	//Operations
+};
+#endif //PLAYER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/priest.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,103 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf
+
+	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.
+*/
+
+#include <string>
+#include "priest.h"
+
+Priest::Priest(World* world, int id) : Player(world, id)
+{
+	bool tmp = init();
+}
+	
+
+
+Priest::~Priest()
+{
+}
+
+bool Priest::init ()
+{
+	getTypeInfo()->m_subtype = "priest";
+
+	CreatureBaseAttr* bas = getBaseAttr();
+	CreatureDynAttr* dyn = getDynAttr();
+	
+	
+	dyn->m_experience=0;
+	dyn->m_health = 200;
+	dyn->m_health = 1000;
+	
+	bas->m_max_experience = 100;
+//	bas->m_level =1;
+	bas->m_level =61;
+	bas->m_max_health = 200;
+	bas->m_armor = 20;
+	bas->m_block=0;
+	bas->m_attack = 10;
+	bas->m_strength = 25;
+	bas->m_dexterity = 15;
+	bas->m_magic_power = 15;
+	//bas->m_willpower = 45;
+	bas->m_willpower = 450;
+	bas->m_resistances[0] =0;
+	bas->m_resistances[1] =0;
+	bas->m_resistances[2] =0;
+	bas->m_resistances[3] =0;
+	bas->m_resistances_cap[0] =50;
+	bas->m_resistances_cap[1] =50;
+	bas->m_resistances_cap[2] =50;
+	bas->m_resistances_cap[3] =50;
+	bas->m_walk_speed = 3000;
+	bas->m_attack_speed=2000;
+	
+	m_base_action = Action::HOLY_ATTACK;
+	m_left_action = Action::HOLY_ATTACK;
+	m_right_action = Action::HOLY_ATTACK;
+	
+
+	
+	int i;
+	for (i=1;i<6;i++)
+		bas->m_abilities[i]=0;
+	
+	// Debugging
+	bas->m_abilities[4] = 0xffffff;
+	
+	
+	bas->m_abilities[0] = 0x3f8f;
+	bas->m_attack_range =1;
+	
+	bas->m_special_flags=0;
+
+	m_name.assign("Elrond");
+	calcBaseAttrMod();
+	
+	return true;
+}
+
+
+bool Priest::update(float time)
+{
+	// Priestspezifische update Routine
+	
+	// update von User aufrufen
+	Player::update(time);
+	return true;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/priest.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,90 @@
+#ifndef PRIEST_H
+#define PRIEST_H
+
+#include "player.h"
+
+/**
+ * \class Priest
+ * \brief Spieler der Klasse Priester
+ */
+class Priest : public Player {
+//Public stuff
+	public:
+	//Fields
+	//Constructors
+	/**
+	 * \fn Priest(World* world, unsigned int id)
+	 * \brief Konstruktor
+	 * \param world Welt
+	 * \param id Objekt-ID
+	 *
+	 * Legt ein neues Priest Objekt an.
+	 */
+		Priest(World* world, int id);
+	
+	
+	/**
+		 * \fn ~Priest()
+		 * \brief Destruktor
+		 *
+		 * Gibt den Allokierten Speicher wieder frei
+	 */
+		~Priest();
+	//Accessor Methods
+	//Operations
+	/**
+		 * \fn virtual bool init ()
+		 * \brief Initialisiert den Priester 
+		 * \return bool, der angibt ob die initialisierung erfolgreich war
+	 */
+		virtual bool init ();
+	
+		/**
+		 * \fn virtual bool destroy ()
+		 * \brief Zerstoert das Objekt. Die Funktion ist virtuell und wird durch die abgeleiteten Klassen &uuml;berschrieben.
+		 * \return bool, der angibt ob die Zerstoerung erfolgreich war
+		 */
+		virtual bool destroy()
+		{
+			Player::destroy();
+		}
+		
+		/**
+		 * \fn virtual void calcDamage(ActionType type,Damage& dmg)
+		 * \brief Berechnet den Basisschaden einer Aktion
+		 */
+		virtual void calcBaseDamage(Action::ActionType act,Damage& dmg)
+		{
+			Player::calcBaseDamage(act,dmg);
+		}
+		
+		/**
+		 * \fn virtual void calcBaseAttrMod()
+		 * \brief Die modifizierten Basisattribute werden neu berechnet. Verwendet die Basisattribute, verwendete Items, sowie temporaere Modifikationen.
+		 */
+		virtual void calcBaseAttrMod()
+		{
+			Player::calcBaseAttrMod();
+		}
+	
+		/**
+		 * \fn bool update (float time)
+		 * \brief Updatefunktion des Priesters
+		 * \param time Verstrichene Zeit
+		 * \return bool, Erfolgreiches Update?
+		 *
+		 **/
+		bool update(float time);
+		
+	protected:
+	
+	/**
+	 * \fn virtual void gainLevel()
+	 * \brief Wird aufgerufen, wenn das Lebewesen ein Levelup erhält. Passt Erfahrung und alle Basisattribute an.
+	 */
+		virtual void gainLevel()
+		{
+			Player::gainLevel();
+		}
+};
+#endif //PRIEST_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/projectile.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,55 @@
+#include "projectile.h"
+
+Projectile::Projectile( ProjectileType type, int id)
+{
+	m_id = id;
+	m_type = type;
+	m_timer =0;
+	m_timer_limit =0;
+	m_counter =0;
+	m_geometry.m_layer = WorldObject::Geometry::LAYER_AIR;
+
+}
+
+Projectile::Projectile(int id)
+{
+	m_id = id;
+}
+
+void Projectile::toString(CharConv* cv)
+{
+
+	cv->toBuffer((char) m_type);
+	cv->toBuffer((char) m_state);
+	cv->toBuffer( m_id);
+	cv->toBuffer(m_geometry.m_coordinate_x);
+	cv->toBuffer(m_geometry.m_coordinate_y);
+	cv->toBuffer(m_geometry.m_radius);
+	cv->toBuffer(m_geometry.m_angle);
+	cv->toBuffer(m_geometry.m_layer);
+	cv->toBuffer(m_timer);
+	cv->toBuffer(m_timer_limit);
+
+}
+
+void Projectile::fromString(CharConv* cv)
+{
+	
+	char tmp;
+	cv->fromBuffer<char>(tmp);
+	m_type = (ProjectileType) tmp;
+	cv->fromBuffer<char>(tmp);
+	m_state = (ProjectileState) tmp;
+	cv->fromBuffer<int>(m_id);
+	cv->fromBuffer<float>(m_geometry.m_coordinate_x);
+	cv->fromBuffer<float>(m_geometry.m_coordinate_y);
+	cv->fromBuffer<float>(m_geometry.m_radius);
+	cv->fromBuffer<float>(m_geometry.m_angle);
+	cv->fromBuffer<short>(m_geometry.m_layer);
+	cv->fromBuffer<float>(m_timer);
+	cv->fromBuffer<float>(m_timer_limit);
+		
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/projectile.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,249 @@
+#ifndef PROJECTILE_H
+#define PROJECTILE_H
+
+#include "debug.h"
+#include "charconv.h"
+#include "worldobject.h"
+
+/**
+ * \class Projectile
+ * \brief Klasse fuer bewegliche Gegenstaende und Erscheinungen
+ */
+class Projectile
+{
+	public:
+		
+	/**
+	 * \struct Geometry
+	 * \brief Struktur zum Speichern des Ortes bzw der Lage eines Projektils
+	 */
+	struct Geometry
+	{
+		/**
+		 * \var m_coordinate_x
+		 * \brief x-Koordinate des Objekts (Mittelpunkt)
+		 */
+		float m_coordinate_x;
+	
+	/**
+		 * \var m_coordinate_y
+		 * \brief x-Koordinate des Objekts (Mittelpunkt)
+	 */
+		float m_coordinate_y;
+		
+		/**
+		 * \var float m_radius
+		 * \brief Radius in dem der Effekt sichtbar ist
+		 */
+		float m_radius;
+		
+		/**
+		 * \var m_angle
+		 * \brief Winkel um den das Objekt gegenueber dem Koordinatensystem gedreht ist
+		 */
+		float m_angle;
+		
+		/**
+		 * \var m_layer
+		 * \brief Ebene in der sich das Objekt befindet
+		 */
+		short m_layer;
+	};
+	
+	/**
+	 * \enum ProjectileType
+	 * \brief Aufzaehlung verschiedener Typen von Projektilen
+	 */
+	enum ProjectileType
+	{
+		ARROW=1,
+		MAGIC_ARROW=2,
+		FIRE_BOLT=3,
+		FIRE_BALL=4,
+		FIRE_WALL=5,
+  		FIRE_WAVE=6,
+		ICE_BOLT = 10,
+		BLIZZARD = 11,
+		ICE_RING= 12,
+		FREEZE =13,
+		LIGHTNING = 20,
+		THUNDERSTORM = 21,
+		CHAIN_LIGHTNING = 23,
+		STATIC_SHIELD,
+		FIRE_ARROW = 30,
+		ICE_ARROW = 31,
+		WIND_ARROW = 32,
+  		GUIDED_ARROW=34,
+		EXPLOSION = 40,
+		FIRE_EXPLOSION = 41,
+		ICE_EXPLOSION = 42,
+		WIND_EXPLOSION = 43,
+		LIGHT_BEAM = 50,
+		ELEM_EXPLOSION = 51,
+		ACID = 52,
+		DIVINE_BEAM = 53,
+		HYPNOSIS = 54
+
+	};
+	 
+	/**
+	 * \enum ProjectileState
+	 * \brief Aufzaehlung der Zustaende die ein Projektil annehmen kann
+	 */
+	enum ProjectileState
+	{
+		FLYING = 1,
+		EXPLODING = 2,
+		GROWING = 3,
+		STABLE = 4,
+		VANISHING =5,
+		DESTROYED= 6
+	};
+
+	
+	/**
+	 * \fn Projectile(ProjectileType type, int id =0)
+	 * \param type Typ des Projektils
+	 * \brief Konstruktor
+	 */
+	Projectile( ProjectileType type, int id =0);
+	
+	/**
+	 * \fn Projectile(int id=0)
+	 * \brief Konstruktor
+	 */
+	Projectile(int id=0);
+
+	
+	/**
+	 * \fn Geometry* getGeometry()
+	 * \brief gibt Informationen zur Geometrie aus
+	 */
+	Geometry* getGeometry()
+	{
+		return &m_geometry;
+	}
+	
+	/**
+	 * \fn ProjectileType getType()
+	 * \brief Gibt Typ des Projektils aus
+	 */
+	ProjectileType getType()
+	{
+		return m_type;
+	}
+	
+	/**
+	 * \fn ProjectileState getState()
+	 * \brief Gibt Status des Projektils aus
+	 */
+	ProjectileState getState()
+	{	
+		return m_state;
+	}
+	
+	/**
+	 * \fn float getTimer()
+	 * \brief Gibt Wert des Timers aus
+	 */
+	float getTimer()
+	{
+		return m_timer;
+	}
+	
+	/**
+	 * \fn float getTimerLimit()
+	 * \brief Gibt Wert des Timerlimits aus
+	 */
+	float getTimerLimit()
+	{
+		return m_timer_limit;
+	}
+	
+	
+	/**
+	 * \fn void toString(CharConv* cv)
+	 * \brief Konvertiert das Objekt in einen String und schreibt ihn in der Puffer
+	 * \param buf Ausgabepuffer
+	 * \return Zeiger hinter den beschriebenen Datenbereich
+	 */
+	virtual void toString(CharConv* cv);
+			
+			
+	/**
+	 * \fn void fromString(CharConv* cv)
+	 * \brief Erzeugt das Objekt aus einem String
+	 * \param buf Objekt als String
+	 * \return Zeiger hinter den gelesenen Datenbereich
+	 */
+	virtual void fromString(CharConv* cv);
+	
+	/**
+	 * \fn int getId()
+	 * \brief Gibt die ID aus
+	 */
+	int getId()
+	{
+		return m_id;
+	}
+	
+	
+	/**
+	 * \fn virtual void update()
+	 * \brief Berechnet die Veraenderungen am Object waerend der letzten time Millisekunden
+	 * \param time vergangene Zeit in Millisekunden
+	 */
+	//virtual void update(float& time) =0;
+	
+	protected:
+		
+	/**
+	 * \fn Geometry m_geometry
+	 * \brief Beschreibung der Geometrie
+	 */	
+	Geometry m_geometry;
+	
+	/**
+	 * \fn ProjectileType m_type
+	 * \brief Typ des Projektils
+	 */
+	ProjectileType m_type;
+			
+	/**
+	 * \fn ProjectileState m_state
+	 * \brief Status des Projektils
+	 */
+	ProjectileState m_state;
+			 
+	/**
+	 * \fn float m_timer
+	 * \brief Timer, Verwendung je nach Art des Projektils und aktuellem Zustand
+	 */
+	float m_timer;
+	
+	/**
+	 * \fn float m_timer_limit
+	 * \brief Wert, bei dessen Erreichen durch den Timer eine Statusveraenderung eintritt
+	 */
+	float m_timer_limit;
+	
+	/**
+	 * \fn m_counter
+	 * \brief Zaehler, Verwendung je Art des Projektils und aktuellem Zustand
+	 */
+	 int m_counter;
+	 
+	 /**
+	  * \var int m_id
+	  * \brief ID des Projektils
+	  */
+	 int m_id;
+	 
+
+};
+
+
+
+
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/random.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,38 @@
+#include "random.h"
+
+int Random::randDiscrete(float* distribution,int nr, float sum)
+{
+	float x = randf(sum);
+	for (int i=0;i<nr;i++)
+	{
+		x-= distribution[i];
+		if (x<=0)
+		{
+			return i;
+		}
+	}
+}
+
+
+int Random::randDiscrete(vector<float> distribution)
+{
+	vector<float>::iterator i;
+	float sum =0;
+	for (i= distribution.begin(); i!=distribution.end(); ++i)
+	{
+		sum += *i;
+	}
+	float x = randf(sum);
+	int res =0;
+	for (i=distribution.begin();i!=distribution.end();++i)
+	{
+		x-= *i;
+		if (x<=0)
+		{
+			return res;
+		}
+		res++;
+	}
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/random.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,88 @@
+#ifndef RANDOM_H
+#define RANDOM_H
+
+#include <math.h>
+#include <stdlib.h>
+#include "debug.h"
+#include <vector>
+
+using namespace std;
+
+/**
+ * \class Random
+ * \brief Klasse fuer die Erzeugung von Zufallszahlen
+ */
+class Random
+{
+#define rez_rand_max  1.0 / RAND_MAX
+	
+	public:
+		
+	/**
+	 * \fn static float random()
+	 * \return Zufallszahl zwischen 0 und 1
+	 */
+	static float random()
+	{
+		return rand() *rez_rand_max;
+	}
+	
+	/**
+	 * \fn static float randf(float f)
+	 * \return Zufallszahl zwischen 0 und f
+	 */
+	static float randf(float f)
+	{
+		return random()*f;
+	}
+	
+	/**
+	 * \fn static int randi(int i)
+	 * \return Zufallszahl zwischen 0 und i-1
+	 */
+	static int randi(int i)
+	{
+		return (int) random()*i;
+	}
+	
+	/**
+	 * \fn static float randrangef(float f1, float f2)
+	 * \return Zufallszahl zwischen f1 und f2
+	 */
+	static float randrangef(float f1, float f2)
+	{
+		return f1 + randf(f2-f1);
+	}
+	
+	/**
+	 * \fn static int randrangei(int i1, int i2)
+	 * \return Zufallszahl zwischen i2 und i2
+	 */
+	static int randrangei(int i1, int i2)
+	{
+		return i1 + randi(i2-i1+1);
+	}
+	
+	/**
+	 * \fn 	int randDiscrete(float* distribution,int nr, float sum)
+	 * \brief Sucht unter eine Menge von Ereignissen mit einer gewissen Wahrscheinlichkeit eines aus
+	 * \param distribution Liste der Wahrscheinlichkeiten der Ereignisse
+	 * \param nr Anzahl der Ereignisse
+	 * \param sum Summe der Einzelwahrscheinlichkeiten (erspart normieren)
+	 * \return Nummer des eingetreteten Ereignisses
+	 */
+	static int randDiscrete(float* distribution,int nr, float sum=1);
+	
+	/**
+	 * \fn static int randDiscrete(vector<float> distribution)
+	 * \brief Sucht unter eine Menge von Ereignissen mit einer gewissen Wahrscheinlichkeit eines aus
+	 * \param distribution Liste der Wahrscheinlichkeiten der Ereignisse
+	 * \return Nummer des eingetreteten Ereignisses
+	 */
+	static int randDiscrete(vector<float> distribution);
+};
+
+//float Random::rez_rand_max = 1.0 / RAND_MAX;
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/region.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,1034 @@
+#include "region.h"
+#include "world.h"
+
+
+Region::Region(short dimx, short dimy)
+{
+	DEBUG5("creating region");
+	m_data_grid = new Matrix2d<Gridunit>(dimx,dimy);
+	m_dimx = dimx;
+	m_dimy = dimy;
+	
+	m_tiles = new Matrix2d<char>(dimx*2,dimy*2);
+	m_tiles->clear();
+	
+	// Binärbaum fuer ServerWObjects anlegen
+	m_objects = new map<int,ServerWObject*>;
+	m_static_objects = new map<int,ServerWObject*>;
+	
+	m_players = new map<int,ServerWObject*>;
+	
+	// Baum fuer Projektile anlegen
+	m_projectiles = new list<DmgProjectile*>;
+	
+	// Liste der Gegenstaende
+	m_drop_items = new map<int,DropItem*>;
+	
+	
+}
+
+Region::~Region()
+{
+	map<int,ServerWObject*>::iterator i;
+	for (i=m_objects->begin(); i!=m_objects->end();i++)
+	{
+		delete i->second;
+	}
+	
+	for (i=m_static_objects->begin(); i!=m_static_objects->end();i++)
+	{
+		delete i->second;
+	}
+	
+	list<DmgProjectile*>::iterator j;
+	for (j =  m_projectiles->begin(); j != m_projectiles->end(); j++)
+	{
+		delete (*j);
+	}
+	
+	
+	map<int,DropItem*>::iterator k;
+			for (k =  m_drop_items->begin(); k != m_drop_items->end(); k++)
+	{
+		delete k->second;
+	}
+	
+	delete m_objects;
+	delete m_static_objects;
+	delete m_players;
+	delete m_projectiles;
+	
+	delete m_data_grid;
+	delete m_tiles;
+	delete m_drop_items;
+}
+
+ServerWObject* Region::getSWObject ( int id)
+{
+	map<int,ServerWObject*>::iterator iter;
+	
+	// Objekt im Binärbaum suchen
+	iter = m_objects->find(id);
+	
+	// Testen ob ein Objekt gefunden wurde
+	if (iter == m_objects->end())
+	{
+		// keins gefunden, NULL ausgeben
+		return 0;
+	}
+	else
+	{
+		// Zeiger auf Objekt ausgeben
+		return iter->second;
+	}
+}
+
+bool Region::getFreePlace(Shape* shape, short layer, float& x, float&y)
+{
+	// Menge der bereits getesteten Felder
+	set<int> tfields;
+	
+	// Schlange mit zu testenden Feldern
+	queue<int> fields;
+	
+	float c = 1.1;
+	// Position in 0.5 x 0.5 Feldern
+	int sx = (int) (x/c);
+	int sy = (int) (y/c);
+	int i;
+	fields.push(sx*10000+sy);
+	
+	// Kopie der Form
+	Shape s;
+	memcpy(&s,shape,sizeof(Shape));
+	
+	list<ServerWObject*> res;
+	res.clear();
+	
+	// eine Stelle suchen an der das Objekt passt
+	while (!fields.empty())
+	{
+		// erstes Feld aus der Queue nehmen
+		i = fields.front();
+		sx = i /10000;
+		sy = i %10000;
+		fields.pop();
+		
+		DEBUG5("testing field %f %f",sx*c,sy*c);
+		
+		// Testen ob dort keine festen Objekte sind
+		s.m_coordinate_x = sx*c;
+		s.m_coordinate_y = sy*c;
+		
+		res.clear();
+		getSWObjectsInShape(&s,&res,layer,WorldObject::FIXED,0,true);
+		
+		if (!res.empty())
+		{
+			// Objekt im Weg
+			res.clear();
+			continue;
+		}
+		
+		DEBUG5("no fixed obstacle");
+		// Testen, ob dort nicht gerade eine Kreatur steht
+		getSWObjectsInShape(&s,&res,layer,WorldObject::CREATURE,0,true);
+		if (res.empty())
+		{
+			DEBUG5("field is free");
+			// Stelle ist frei
+			x = sx*c ;
+			y = sy*c ;
+			
+			
+			return true;
+			
+		}
+		else
+		{
+			ServerWObject* obs = *(res.begin());
+			DEBUG5("obstacle is %s at %f %f",obs->getNameId().c_str(), obs->getGeometry()->m_shape.m_coordinate_x,obs->getGeometry()->m_shape.m_coordinate_y);
+			// Stelle ist besetzt
+			tfields.insert(i);
+			
+			// Nachbarfelder in die Liste der zu untersuchenden Felder einfuegen
+			if (sx>0)
+			{
+				i = (sx-1)*10000+sy;
+				if (tfields.find(i)==tfields.end())
+				{
+					fields.push(i);
+				}
+			}
+			
+			if (sy>0)
+			{
+				i = (sx)*10000+sy-1;
+				if (tfields.find(i)==tfields.end())
+				{
+					fields.push(i);
+				}
+			}
+			
+			if (sx<m_dimx*4-1)
+			{
+				i = (sx+1)*10000+sy;
+				if (tfields.find(i)==tfields.end())
+				{
+					fields.push(i);
+				}
+			}
+			
+			if (sy<m_dimy*4-1)
+			{
+				i = (sx)*10000+sy+1;
+				if (tfields.find(i)==tfields.end())
+				{
+					fields.push(i);
+				}
+			}
+			
+		}
+			
+	}
+	
+	// keine Stelle gefunden um das Item zu droppen
+	return false;
+	
+}
+
+bool  Region::addObjectsInShapeFromGridunit(Shape* shape, Gridunit* gu, list<ServerWObject*>* result, short layer, short group,ServerWObject* omit, bool empty_test )
+{
+	ServerWObject* wo=0;
+	ServerWObject** arr=0;
+	WorldObject::Geometry* wob=0;
+	Shape* s=0;
+	arr = gu->getObjects((WorldObject::Group) group);
+	
+	int n = gu->getObjectsNr((WorldObject::Group) group);
+	
+	DEBUG5("%i objects in layer %i, group %i",n,layer,group);
+	for (int k=0;k< n;k++)
+	{
+			
+		wo = arr[k];
+		wob = wo->getGeometry();
+		if (shape->m_type == Shape::CIRCLE)
+		{
+			DEBUG5("testing object %s at %f %f",wo->getNameId().c_str(),wob->m_shape.m_coordinate_x,wob->m_shape.m_coordinate_y);
+		}
+		s = &(wo->getGeometry()->m_shape);
+	
+		if (wob->m_layer & layer)
+		{
+			if (((shape ==0) || World::intersect(shape,s )))
+			{
+				if (wo != omit)
+				{
+					result->push_back(wo);
+									
+					if (empty_test)
+						return true;
+				}
+			}
+		}
+	}
+	return true;
+}
+
+bool Region::addObjectsOnLineFromGridunit(float xstart, float ystart, float xend,float yend, Gridunit* gu, list<ServerWObject*>* result, short layer, short group ,ServerWObject* omit, bool empty_test )
+{
+	ServerWObject* wo=0;
+	ServerWObject** arr=0;
+	WorldObject::Geometry* wob=0;
+	Shape* s=0;
+	arr = gu->getObjects((WorldObject::Group) group);
+	
+	int n = gu->getObjectsNr((WorldObject::Group) group);
+	
+	DEBUG5("%i objects in layer %i, group %i",n,layer,group);
+	float  dir[2];
+	dir[0] = xstart-xend;
+	dir[1] = ystart-yend;
+	
+	for (int k=0;k< n;k++)
+	{
+			
+		wo = arr[k];
+		DEBUG5("testing %s %p",wo->getNameId().c_str(),wo->getNameId().c_str())
+		DEBUG5("testing %p",wo);
+		wob = wo->getGeometry();
+		s = &(wo->getGeometry()->m_shape);
+		if (wob->m_layer & layer)
+		{
+			if (World::lineIntersect(xstart, ystart,  xend,yend ,dir, s))
+			{
+				if (wo != omit)
+				{
+					result->push_back(wo);
+									
+					if (empty_test)
+						return true;
+				}
+			}
+		}
+	}
+}
+
+
+bool Region::getSWObjectsInShape( Shape* shape,  list<ServerWObject*>* result,short layer, short group, ServerWObject* omit, bool empty_test)
+{
+	
+	DEBUG5("shape %f %f %f",shape->m_coordinate_x,shape->m_coordinate_y,shape->m_radius);
+	
+	 // Wenn der Resultat Zeiger 0 ist: Fehler ausgeben
+	if (result == 0)
+	{
+		ERRORMSG("no result list given");
+		return false;
+	}
+	 
+	if (shape == 0)
+	{
+		DEBUG("no shape given");
+		return false;
+	}
+	
+	
+	DEBUG5("layer %i group %i",layer,group);
+	
+	
+	if (group == WorldObject::PLAYER)
+	{
+		// Wenn nur nach Spielern gesucht ist, dann nur die Liste der Spieler durchsuchen
+		/*list<Player*>::iterator i;
+		// TODO: Player umbenennen, einbauen
+		for (i=m_players->begin();i!=m_player->end();++i)
+		{
+		wo= (ServerWObject*) *i;
+		s = &(wo->getGeometry()->m_shape);
+		if (World::intersect(shape,s ))
+		{
+		result->push_back(wo);
+	}
+	}
+		*/
+	}
+	else
+	{
+		int i,j,k,l,o;
+		Gridunit* gu=0;
+		// durchmustere alle 4*4 Felder die von dem Suchrechteck plus 4 Felder bedeckt werden
+		float xe,ye;
+		if (shape->m_type == Shape::CIRCLE)
+		{
+			xe = shape->m_radius;
+			ye = shape->m_radius;
+		}
+		else
+		{
+			xe = shape->m_extent_x;
+			ye = shape->m_extent_y;
+		}
+		
+		int xmin = (int) floor(0.25*(shape->m_coordinate_x-xe-2));
+		int ymin = (int) floor(0.25*(shape->m_coordinate_y-ye-2));
+		int xmax = (int) floor(0.25*(shape->m_coordinate_x+xe+2));
+		int ymax = (int) floor(0.25*(shape->m_coordinate_y+ye+2));
+		
+		DEBUG5("searching square (%i %i) (%i %i)",xmin,ymin,xmax,ymax);
+		// Pruefen ob die Suchanfrage nicht aus der Region herauslaeuft
+		bool ret = false;
+		int is = max (xmin,0);
+		int ie = min(xmax,m_dimx-1);
+		int js = max(ymin,0);
+		int je = min(ymax,m_dimy-1);
+		
+		// Alle 4x4 Felder durchmustern
+		for (i = is;i<=ie;i++)
+		{
+			for (j=js;j<=je;j++)
+			{
+				
+				DEBUG5("searching in Grid Tile %i %i",i,j);
+				// Durchmustern der Listen im 4x4-Feld
+				gu = (m_data_grid->ind(i,j));
+				
+				// Totenebene
+				if (group & WorldObject::DEAD)
+				{
+					DEBUG5("searching dead layer");
+					
+					ret =  addObjectsInShapeFromGridunit(shape, gu, result, layer,WorldObject::DEAD, omit, empty_test);
+					if (!result->empty() && empty_test)
+						return true;
+					
+				}
+				
+				// feste Objekte 
+				if (group & WorldObject::FIXED )
+				{
+					DEBUG5("searching fixed layer");
+					
+					ret =  addObjectsInShapeFromGridunit(shape, gu, result, layer,WorldObject::FIXED, omit, empty_test);
+					if (!result->empty() && empty_test)
+						return true;
+					
+				}
+				
+				// lebende Objekte
+				if (group & WorldObject::CREATURE)
+				{
+					
+					ret =  addObjectsInShapeFromGridunit(shape, gu, result, layer,group & WorldObject::CREATURE, omit, empty_test);
+					if (!result->empty() && empty_test)
+						return true;
+					
+				}
+			
+			}
+			
+		}
+	} 
+	return true;
+}
+
+
+ServerWObject* Region::getSWObjectAt(float x_coordinate, float y_coordinate, short layer, short group)
+{
+	Shape s;
+	s.m_type = Shape::CIRCLE;
+	s.m_radius =0;
+	s.m_coordinate_x=x_coordinate;
+	s.m_coordinate_y=y_coordinate;
+	
+	list<ServerWObject*> l;
+	l.clear();
+	getSWObjectsInShape ( &s, &l,layer,group );
+	if (l.empty())
+	{
+		return 0;
+	}
+	else
+	{
+		return *(l.begin());
+	}
+}
+
+
+
+void Region::getSWObjectsOnLine( float xstart, float ystart, float xend, float yend,  list<ServerWObject*>* result,short layer, short group , ServerWObject* omit)
+{
+	Gridunit* gu=0;
+	ServerWObject* wo=0;
+	ServerWObject** arr=0;
+	WorldObject::Geometry* wob=0;
+	Shape* s=0;
+	int k;
+	
+	int xmin = (short) floor(0.25*(min(xstart,xend)-2));
+	int ymin = (short) floor(0.25*(min(ystart,yend)-2));
+	int xmax = (short) floor(0.25*(max(xstart,xend)+2));
+	int ymax = (short) floor(0.25*(max(ystart,yend)+2));
+	int i,j;
+	float p[2];
+	float proj[2];
+	float d;
+	float dir[2];
+	
+	// Richtung der Linie
+	dir[0] = xend-xstart;
+	dir[1] = yend-ystart;
+	d = sqr(dir[0])+sqr(dir[1]);
+	if (d<=0)
+		return;
+	
+	d = 1/sqrt(d);
+	dir[0] *=d;
+	dir[1] *=d;
+	
+	
+	
+	for (i = max (xmin,0);i<=min(xmax,m_dimx-1);i++)
+	{
+		for (j=max(ymin,0);j<=min(ymax,m_dimy-1);j++)
+		{
+			DEBUG5("searching in Grid Tile %i %i",i,j);
+			
+			// Herausfiltern jener Felder die zu weit von der Linie entfernt sind
+			p[0] = i*4.0+2;
+			p[1] = j*4.0+2;
+			p[0] -= xstart;
+			p[1] -= ystart;
+			
+			d=p[0]*dir[0]+p[1]*dir[1];
+			proj[0] = dir[0]*d;
+			proj[1] = dir[1]*d;
+			
+			d = sqr(p[0]-proj[0])+sqr(p[1]-proj[1]);
+			if (d>32)
+			{
+				DEBUG5("aborted");
+				continue;
+			}
+
+				// Durchmustern der Listen im 4x4-Feld
+			gu = (m_data_grid->ind(i,j));
+				
+			// Totenebene
+			// Totenebene
+			if (group & WorldObject::DEAD)
+			{
+				DEBUG5("searching dead layer");
+					
+				addObjectsOnLineFromGridunit(xstart,ystart,xend,yend, gu, result, layer,WorldObject::DEAD, omit);
+			}
+				
+				// feste Objekte 
+			if (group & WorldObject::FIXED )
+			{
+				DEBUG5("searching fixed layer");
+					
+				
+				addObjectsOnLineFromGridunit(xstart,ystart,xend,yend, gu, result, layer,WorldObject::FIXED, omit);
+			}
+				
+				// lebende Objekte
+			if (group & WorldObject::CREATURE)
+			{
+					
+				
+				addObjectsOnLineFromGridunit(xstart,ystart,xend,yend, gu, result, layer,WorldObject::CREATURE, omit);
+			}
+			
+			
+		}
+			
+	}
+}
+
+void Region::getProjectilesOnScreen(float center_x,float center_y, list<DmgProjectile*>* result)
+{
+	list<DmgProjectile*>::iterator i;
+	float dx,dy,r;
+	DmgProjectile* pr;
+	for (i=m_projectiles->begin();i!=m_projectiles->end();++i)
+	{
+		pr = (*i);
+		
+		r=pr->getGeometry()->m_radius;
+		// Abstaende, in dem die Effekte von ihrem Zentrum entfernt sichtbar sind
+
+		dx = fabs(pr->getGeometry()->m_coordinate_x-center_x)-r;
+		dy = fabs(pr->getGeometry()->m_coordinate_y-center_y)-r;
+		
+		if (dx<=12 && dy <=12)
+		{
+			result->push_back(pr);
+		}
+		else
+		{
+			DEBUG5("out of screen");
+		}
+			
+	}
+}
+
+bool Region::insertSWObject (ServerWObject* object, float x, float y)
+{
+	bool result = true;
+	if (object->getTypeInfo()->m_type == WorldObject::TypeInfo::TYPE_PLAYER)
+	{
+		DEBUG("player entered Region");
+		result &= (m_players->insert(make_pair(object->getId(),object))).second;
+		
+		// Daten der Region zum Server senden
+		object->setState(WorldObject::STATE_REGION_ENTERED);
+	}
+	 
+	 // Einfügen in den Binärbaum
+	if (object->getState() != WorldObject::STATE_STATIC)
+	{
+		result &= (m_objects->insert(make_pair(object->getId(),object))).second;
+	}
+	else
+	{
+		result &= (m_static_objects->insert(make_pair(object->getId(),object))).second;
+	}
+	 
+	 
+	 // Wenn das Element bereits existiert ist die Antwort false
+	if (result==false)
+		return result;
+	 
+	 // Koordinaten setzen
+	object->getGeometry()->m_shape.m_coordinate_x=x;
+	object->getGeometry()->m_shape.m_coordinate_y=y;
+	 
+	 // Einfuegen in das Grid
+	int x_g = (int) floor(0.25*x);
+	int y_g = (int) floor(0.25*y);
+	object->getGridLocation()->m_grid_x = x_g;
+	object->getGridLocation()->m_grid_y = y_g;
+	
+	 
+	 // Testen ob das Objekt in der Region liegt
+	if (x_g<0 || y_g<0 || x_g>=m_dimx || y_g>=m_dimy)
+	{
+		 // TODO
+		 // Region neu setzen
+	}
+	else
+	{
+		if (object->getGeometry()->m_layer != WorldObject::Geometry::LAYER_SPECIAL)
+		{
+			Gridunit *gu = (m_data_grid->ind(x_g,y_g));
+
+			result = gu->insertObject(object);
+		}
+
+	}
+	
+	return result;
+}
+
+
+bool  Region::insertProjectile(DmgProjectile* object, float x, float y)
+{
+	m_projectiles->push_back(object);
+	object->getGeometry()->m_coordinate_x = x;
+	object->getGeometry()->m_coordinate_y = y;
+	return true;
+}
+
+bool  Region::deleteSWObject (ServerWObject* object)
+{
+	bool result = true;
+	 
+	 // aus dem Grid loeschen
+	int x = object->getGridLocation()->m_grid_x;
+	int y = object->getGridLocation()->m_grid_y;
+	DEBUG5("deleting object in grid tile %i %i",x,y);
+	
+	if (object->getGeometry()->m_layer != WorldObject::Geometry::LAYER_SPECIAL)
+	{
+		Gridunit *gu = (m_data_grid->ind(x,y));
+		result = gu->deleteObject(object);
+	}
+	 
+	if (result==false)
+	{
+		return result;
+	}
+	 
+	 // Aus dem Binärbaum loeschen
+	if (object->getState() != WorldObject::STATE_STATIC)
+	{
+		m_objects->erase(object->getId());
+	}
+	else
+	{
+		m_static_objects->erase(object->getId());
+	}
+	 
+	if (object->getTypeInfo()->m_type == WorldObject::TypeInfo::TYPE_PLAYER)
+	{
+		DEBUG("Player deleted");
+		m_players->erase(object->getId());
+		
+	}
+	
+	return result;
+}
+
+bool Region::moveSWObject(ServerWObject* object, float x, float y)
+{
+	bool result = true;
+	// Wenn NULL Zeiger übergeben -> Fehler anzeigen
+	if (object == 0)
+		return false;
+	
+	// Testen ob das Objekt innerhalb des 4*4 Grid in ein neues Feld kommt
+	int x_old = object->getGridLocation()->m_grid_x;
+	int y_old = object->getGridLocation()->m_grid_y;
+	int x_new = (int) floor(0.25*x);
+	int y_new = (int) floor(0.25*y);
+
+	if (x_old == x_new && y_old == y_new)
+	{
+		object->getGeometry()->m_shape.m_coordinate_x=x;
+		object->getGeometry()->m_shape.m_coordinate_y=y;
+		return true;
+	}
+	// Testen ob das Objekt in der Region liegt
+	if (x_new<0 || y_new<0 || x_new>=m_dimx || y_new>=m_dimy)
+	{
+		 // TODO
+		 // Region neu setzen
+	}
+	else
+	{
+		Gridunit *gu = (m_data_grid->ind(x_old,y_old));
+		result =gu->deleteObject(object);
+		gu = (m_data_grid->ind(x_new,y_new));
+		result = gu->insertObject(object);
+		
+		object->getGridLocation()->m_grid_x=x_new;
+		object->getGridLocation()->m_grid_y=y_new;
+		
+		object->getGeometry()->m_shape.m_coordinate_x=x;
+		object->getGeometry()->m_shape.m_coordinate_y=y;
+	}
+
+	return result;
+}
+
+
+bool Region::changeObjectGroup(ServerWObject* object,WorldObject::Group group )
+{
+	bool result = true;
+	 
+	int x = object->getGridLocation()->m_grid_x;
+	int y = object->getGridLocation()->m_grid_y;
+	DEBUG("changing object in grid tile %i %i",x,y);
+	 
+	Gridunit *gu = (m_data_grid->ind(x,y));
+	result = gu->moveObject(object,group);
+	 
+	
+	return result;
+	
+}
+
+void Region::update(float time)
+{
+	DEBUG5("\nUpdate aller WeltObjekte starten\n");
+	//DEBUG("m_players %p",m_players);
+	// Iterator zum durchmustern einer solchen Liste
+	map<int,ServerWObject*>::iterator iter;
+	ServerWObject* object;
+	WorldObject::Geometry* wob;
+		 
+	// Durchmustern aller ServerWObjects
+	for (iter =m_objects->begin(); iter!=m_objects->end(); )
+	{
+		object = iter->second;
+		wob = object->getGeometry();
+		DEBUG5("\nObjekt: %f %f key: %i layer %x",wob->m_shape.m_coordinate_x,wob->m_shape.m_coordinate_y ,object->getId(),object->getGeometry()->m_layer);	
+		if (object->getDestroyed()==true)
+		{
+			++iter;
+			DEBUG5("Objekt gelöscht: %i \n",object->getId());
+			object->destroy();
+			deleteSWObject(object);
+			delete object;
+			continue;
+		}
+		else
+		{
+			// Polymorpher Funktionsaufruf
+			object->update(time);
+		}
+		++iter;
+		
+	}
+	DEBUG5("Update aller WeltObjekte abgeschlossen\n\n");
+	
+	// alle Projektile updaten
+	list<DmgProjectile*>::iterator it3;
+	DmgProjectile* pr =0;
+	
+	for (it3 = m_projectiles->begin(); it3 !=m_projectiles->end();)
+	{
+		pr = (*it3);
+		if (pr->getState() == Projectile::DESTROYED)
+		{
+			DEBUG5("deleting projectile %p",pr);
+			it3 = m_projectiles->erase(it3);
+			delete pr;
+			DEBUG5("loesche projektil");
+			
+		}
+		else
+		{
+			pr->update(time);
+			++it3;
+		}
+	}
+	DEBUG5("update projektile abgeschlossen");
+}
+
+void Region::getRegionDataString(CharConv* cv)
+{
+	// Dimension des Feldes angeben
+	cv->toBuffer((short) m_dimx);
+	cv->toBuffer((short) m_dimy);
+	
+	// Anzahl der Objekte eintragen
+	DEBUG("static objects: %i",m_static_objects->size());
+	cv->toBuffer<short>((short) m_static_objects->size());
+	
+	// statische Objekte in den Puffer eintragen
+	map<int,ServerWObject*>::iterator it;
+	for (it = m_static_objects->begin();it!=m_static_objects->end();++it)
+	{
+		(it->second)->toString(cv);
+		DEBUG("static object: %s",(it->second)->getNameId().c_str());
+	}
+	
+	// Tiles eintragen
+	int i,j;
+	for (i =0;i<m_dimx*2;i++)
+	{
+		for (j=0;j<m_dimy*2;j++)
+		{
+			cv->toBuffer(*(m_tiles->ind(i,j)));
+		}
+	}
+	
+}
+
+void Region::setTile(Tile tile,short x, short y)
+{
+	*(m_tiles->ind(x,y)) = (char) tile;
+}
+
+bool  Region::dropItem(Item* item, float x, float y)
+{
+	// Menge der bereits getesteten Felder
+	set<int> tfields;
+	
+	// Schlange mit zu testenden Feldern
+	queue<int> fields;
+	
+	// Position in 0.5 x 0.5 Feldern
+	int sx = (int) (x*2);
+	int sy = (int) (y*2);
+	int i;
+	fields.push(sx*10000+sy);
+	
+	
+	// Flaeche auf die das Item gedroppt wird
+	Shape s;
+	s.m_type= Shape::RECT;
+	s.m_extent_x = 0.5;
+	s.m_extent_y = 0.5;
+	
+	list<ServerWObject*> res;
+	
+	// eine Stelle suchen an der das Item fallen gelassen werden kann
+	while (!fields.empty())
+	{
+		// erstes Feld aus der Queue nehmen
+		i = fields.front();
+		sx = i /10000;
+		sy = i %10000;
+		fields.pop();
+		
+		DEBUG5("testing field %i %i",sx,sy);
+		
+		// Testen ob dort keine festen Objekte sind
+		s.m_coordinate_x = sx*0.5;
+		s.m_coordinate_y = sy*0.5;
+		
+		res.clear();
+		getSWObjectsInShape(&s,&res,WorldObject::Geometry::LAYER_BASE,WorldObject::FIXED,0,true);
+		
+		if (!res.empty())
+		{
+			// Objekt im Weg
+			res.clear();
+			continue;
+		}
+		
+		// Testen, ob dort nicht schon ein Item liegt
+		if (m_drop_items->find(i) == m_drop_items->end())
+		{
+			DEBUG5("field is free");
+			// Stelle ist frei
+			// Item einfuegen
+			DropItem* di = new DropItem;
+			di->m_item = item;
+			di->m_x = (short) sx;
+			di->m_y = (short) sy;
+			DEBUG5("dropped item %i", sx*10000+sy);
+			di->m_time = 0;
+			
+			Gridunit* gu = (m_data_grid->ind(sx/8,sy/8));
+			
+			gu->insertItem(di);
+			m_drop_items->insert(make_pair(i,di));
+			
+			DEBUG5("items dropped at %i %i",sx,sy);
+			
+			return true;
+			
+		}
+		else
+		{
+			// an der Stelle liegt bereits ein Item
+			tfields.insert(i);
+			
+			// Nachbarfelder in die Liste der zu untersuchenden Felder einfuegen
+			if (sx>0)
+			{
+				i = (sx-1)*10000+sy;
+				if (tfields.find(i)==tfields.end())
+				{
+					fields.push(i);
+				}
+			}
+			
+			if (sy>0)
+			{
+				i = (sx)*10000+sy-1;
+				if (tfields.find(i)==tfields.end())
+				{
+					fields.push(i);
+				}
+			}
+			
+			if (sx<m_dimx*8-1)
+			{
+				i = (sx+1)*10000+sy;
+				if (tfields.find(i)==tfields.end())
+				{
+					fields.push(i);
+				}
+			}
+			
+			if (sy<m_dimy*8-1)
+			{
+				i = (sx)*10000+sy+1;
+				if (tfields.find(i)==tfields.end())
+				{
+					fields.push(i);
+				}
+			}
+			
+		}
+			
+	}
+	
+	// keine Stelle gefunden um das Item zu droppen
+	return false;
+	
+}
+
+bool Region::deleteItemAt(float x, float y)
+{
+	map<int,DropItem*>::iterator it;
+	short sx = (int) (x*2);
+	short sy = (int) (y*2);
+	it = m_drop_items->find((sx)*10000 + sy);
+	if (it == m_drop_items->end())
+	{
+		return false;
+	}
+	else
+	{
+		Gridunit* gu = (m_data_grid->ind(sx/8,sy/8));
+		// Gegenstand aus der Gridunit entfernen
+		gu->deleteItem(it->second);
+		// Item Wrapper loeschen
+		delete (it->second);
+		
+		m_drop_items->erase(it);
+		
+		return true;
+	}
+}
+
+Item*  Region::getItemAt(float x, float y)
+{
+	map<int,DropItem*>::iterator it;
+	short sx = (int) (x*2);
+	short sy = (int) (y*2);
+	int id = sx*10000 + sy;
+	DEBUG("searching ID %i", id);
+	it = m_drop_items->find(id);
+	if (it == m_drop_items->end())
+	{
+		return 0;
+	}
+	else
+	{
+		return it->second->m_item;
+	}
+}
+
+Item* Region::getItem(int id)
+{
+	map<int,DropItem*>::iterator it;
+	it = m_drop_items->find(id);
+	if (it == m_drop_items->end())
+	{
+		return 0;
+	}
+	else
+	{
+		return it->second->m_item;
+	}
+}
+
+bool Region::deleteItem(int id)
+{
+	map<int,DropItem*>::iterator it;
+	short sx = id /10000;
+	short sy = id%10000;
+	it = m_drop_items->find(id);
+	if (it == m_drop_items->end())
+	{
+		return false;
+	}
+	else
+	{
+		Gridunit* gu = (m_data_grid->ind(sx/8,sy/8));
+		// Gegenstand aus der Gridunit entfernen
+		gu->deleteItem(it->second);
+		// Item Wrapper loeschen
+		delete (it->second);
+		
+		m_drop_items->erase(it);
+		
+		return true;
+	}
+}
+
+
+void Region::getItemsOnScreen(float center_x,float center_y, list<DropItem*>* result)
+{
+	// Grenzen des Bereichs in dem Items ausgegeben werden (in 4x4 Feldern)
+	int xmin = max(0,(int) floor(center_x/4-3));
+	int ymin = max(0,(int) floor(center_y/4-3));
+	int xmax = min(m_dimx-1,(int) ceil(center_x/4+3));
+	int ymax = min(m_dimy-1,(int) ceil(center_y/4+3));
+	
+	list<DropItem*>* lst;
+	list<DropItem*>::iterator it;
+	
+	DEBUG5("x %i %i y %i %i",xmin, xmax,ymin,ymax);
+	
+	int i,j;
+	Gridunit* gu;
+	// Schleifen ueber die betrachteten Gridunits
+	for (i=xmin; i<= xmax;i++)
+	{
+		for (j=ymin; j<= ymax; j++)
+		{
+			gu = m_data_grid->ind(i,j);
+			
+			// Schleife ueber die Items der Gridunit
+			lst = gu->getItems();
+			for (it = lst->begin(); it != lst->end(); ++it)
+			{
+				result->push_back((*it));
+			}
+			
+		}
+	}
+	
+}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/region.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,367 @@
+#ifndef REGION_H
+#define REGION_H
+
+#include "matrix2d.h"
+#include "serverwobject.h"
+#include "tiles.h"
+#include "dropitem.h"
+
+
+#include <string>
+#include <list>
+#include <map>
+#include <set>
+#include <math.h>
+#include <cstdlib>
+#include <algorithm>
+
+class Gridunit;
+
+
+using namespace std;
+
+struct NBRegion
+{
+	/**
+	 * \var m_region_id
+	 * \brief ID der Region
+	 */
+	short m_region_id;
+	
+	/**
+	 * \var m_dx
+	 * \brief Aenderung der x-Koordinate beim Uebertritt in diese Region
+	 */
+	float m_dx;
+	
+	/**
+	 * \var m_dy
+	 * \brief Aenderung der y-Koordinate beim Uebertritt in diese Region
+	 */
+	float m_dy;
+};
+
+/**
+ * \class Region
+ * \brief Eine Region ist ein rechteckiges Teilstueck der Spielwelt. Monster und Geschosse koennen nicht zwischen Regionen wechseln
+ */
+class Region
+{
+	public:
+		/**
+	 	 * \fn Region(short dimx, short dimy)
+		 * \brief Konstruktor
+		 * \param dimx Ausdehnung in x-Richtung
+	 	 * \param dimy Ausdehnung in y-Richtung
+	 	 */
+		Region(short dimx, short dimy);
+		
+		
+		/**
+		 * \fn ~Region()
+		 * \brief Destruktor
+		 */
+		~Region();
+		
+		/**
+		 * \fn insertSWObject (ServerWObject* object, float x, float y)
+		 * \brief F&uuml;gt ServerWObject ein
+		 * \param object Zeiger auf das Objekt, welches eingef&uuml;gt werden soll
+		 * \return bool, der angibt, ob die Operation erfolgreich war
+		 * 
+		 * F&uuml;gt das ServerWObject in die internen Datenstrukturen ein. Wenn das Einf&uuml;gen erfolgreich war, so wird true zur&uuml;ckgegeben, sonst false.
+		 * Wenn ein NULL-Zeiger &uuml;bergeben wird, so wird false ausgegeben.
+		 */
+		bool  insertSWObject (ServerWObject* object, float x, float y);
+		
+		/**
+		 * \fn bool getSWObjectsInShape( Shape* shape,  list<ServerWObject*>* result,short layer=WorldObject::Geometry::LAYER_ALL, short group = WorldObject::GROUP_ALL, ServerWObject* omit=0, bool empty_test = false );
+		 * \brief Sucht ServerWObjects innerhalb eines Gebietes
+		 * \param shape Form des Gebietes
+		 * \param layer Ebene in der gesucht wird
+		 * \param result Liste, an die die gefundenen Objekte angehangen werden
+		 * \param omit Objekt, das ausgelassen wird
+		 * \param empty_test wenn true, wird nach dem ersten gefundenen Objekt abgebrochen
+		 * \param group Gruppen die durchsucht werden sollen
+		 * \return bool, der angibt, ob die Operation erfolgreich war
+		 * 
+		 * Alle gefundenen Objekte werden an das Ende der Liste result angehangen.
+		 * Wenn f&uuml;r selector ein NULL-Zeiger &uuml;bergeben wird, so werden die Objekte nicht selektiert.
+		 * Wenn f&uuml;r result ein NULL-Zeiger &uuml;bergeben wird, oder ein anderer Fehler auftritt, so wird false zur&uuml;ckgegeben, sonst true.
+ 		 */
+		bool getSWObjectsInShape( Shape* shape,  list<ServerWObject*>* result,short layer=WorldObject::Geometry::LAYER_ALL, short group = WorldObject::GROUP_ALL, ServerWObject* omit=0, bool empty_test = false );
+		
+		/**
+		 * \fn bool getFreePlace(Shape* shape, short layer, float& x, float&y)
+		 * \brief Sucht nach einem freien Platz fuer ein Objekt moeglichst nahe an den angegebenen Koordinaten
+		 * \param shape Form des Objekts
+		 * \param layer Ebene des Objekts
+		 * \param x Eingabe: Zielpunkt, Ausgabe: tatsaechlich gefundener Ort
+		 * \param y Eingabe: Zielpunkt, Ausgabe: tatsaechlich gefundener Ort
+		 * \return true, wenn ein freier Platz gefunden wurde, sonst false
+		 */
+		bool getFreePlace(Shape* shape, short layer, float& x, float&y);
+		
+		/**
+		 * \fn bool addObjectsInShapeFromGridunit(Shape* shape, Gridunit* gu, list<ServerWObject*>* result, short layer=WorldObject::Geometry::LAYER_ALL, short group = WorldObject::GROUP_ALL,ServerWObject* omit=0, bool empty_test = false )
+		 * \brief Fuegt alle Objekte aus der Gridunit, die sich mit dem Gebiet befinden zu der Liste hinzu
+		 * \param layer Ebene in der gesucht wird
+		 * \param result Liste, an die die gefundenen Objekte angehangen werden
+		 * \param omit Objekt, das ausgelassen wird
+		 * \param empty_test wenn true, wird nach dem ersten gefundenen Objekt abgebrochen
+		 * \param group Gruppen die durchsucht werden sollen
+		 * \return bool, der angibt, ob die Operation erfolgreich war
+		 **/
+		bool addObjectsInShapeFromGridunit(Shape* shape, Gridunit* gu, list<ServerWObject*>* result, short layer=WorldObject::Geometry::LAYER_ALL, short group = WorldObject::GROUP_ALL,ServerWObject* omit=0, bool empty_test = false );
+		
+		/**
+		 * \fn bool addObjectsOnLineFromGridunit(float xstart, float ystart, float xend,float yend, Gridunit* gu, list<ServerWObject*>* result, short layer=WorldObject::Geometry::LAYER_ALL, short group = WorldObject::GROUP_ALL,ServerWObject* omit=0, bool empty_test = false )
+		 * \brief Fuegt alle Objekte aus der Gridunit, die sich auf der Linie befinden zu der Liste hinzu
+		 *  \param layer Ebene in der gesucht wird
+		 * \param result Liste, an die die gefundenen Objekte angehangen werden
+		 * \param omit Objekt, das ausgelassen wird
+		 * \param empty_test wenn true, wird nach dem ersten gefundenen Objekt abgebrochen
+		 * \param group Gruppen die durchsucht werden sollen
+		 * \return bool, der angibt, ob die Operation erfolgreich war
+		 **/
+		bool addObjectsOnLineFromGridunit(float xstart, float ystart, float xend,float yend, Gridunit* gu, list<ServerWObject*>* result, short layer=WorldObject::Geometry::LAYER_ALL, short group = WorldObject::GROUP_ALL,ServerWObject* omit=0, bool empty_test = false );
+		
+		/**
+		 * \fn bool changeObjectGroup(ServerWObject* object,WorldObject::Group group )
+		 * \brief Veraendert die Gruppe des Objektes
+		 * \param object Objekt fuer das die Gruppe geaendert werden soll
+		 * \param group neue Gruppe des Objektes
+		 */
+		bool changeObjectGroup(ServerWObject* object,WorldObject::Group group );
+		
+		/**
+		 * \fn ServerWObject* getSWObject ( int id)
+		 * \brief Sucht Objekt anhand seiner ID heraus
+		 * \return Objekt, Nullzeiger wenn das Objekt nicht existiert
+		 */
+		ServerWObject* getSWObject ( int id);
+		
+		/** 
+		 * \fn ServerWObject* getSWObjectAt(float x_coordinate, float y_coordinate, short layer=WorldObject::Geomety::LAYER_ALL, short group = WorldObject::GROUP_ALL);
+		 * \brief Sucht ServerWObject an den gegebenen Koordinaten
+		 * \param x_coordinate x-Koordinate des Punktes
+		 * \param y_coordinate y-Koordinate des Punktes
+		 * \param layer Ebene in der gesucht wird
+		 * \param group Gruppen die durchsucht werden sollen
+		 * \return Zeiger auf das ServerWObject, wenn sich an dem Punkt eines befindet, sonst NULL
+		 */
+		ServerWObject* getSWObjectAt(float x_coordinate, float y_coordinate, short layer=WorldObject::Geometry::LAYER_ALL, short group = WorldObject::GROUP_ALL);
+		
+		/**
+		 * \fn void getSWObjectsOnLine( float xstart, float ystart, float xend, float yend,  list<ServerWObject*>* result,short layer=WorldObject::Geometry::LAYER_ALL, short group = WorldObject::GROUP_ALL, ServerWObject* omit=0 )
+		 * \brief Sucht alle Objekte die auf der angegebenen Linie liegen
+		 * \param xstart x-Koordinate Startpunkt
+		 * \param ystart y-Koordinate Startpunkt
+		 * \param xend x-Koordinate Endpunkt
+		 * \param yend y-Koordinate Endpunkt
+		 * \param result Liste, an die die gefundenen Objekte angehangen werden
+		 * \param layer Ebene in der gesucht wird
+		 * \param group Gruppen die durchsucht werden sollen
+		 * \param omit Objekt, das ausgelassen wird
+		 */
+		void getSWObjectsOnLine( float xstart, float ystart, float xend, float yend,  list<ServerWObject*>* result,short layer=WorldObject::Geometry::LAYER_ALL, short group = WorldObject::GROUP_ALL, ServerWObject* omit=0 );
+		
+		/**
+		 * \fn void getProjectilesOnScreen(float center_x,float center_y, list<DmgProjectile*>* result)
+		 * \brief Gibt alle Projektile auf dem Bildschirm aus
+		 * \param center_x x-Koordinate Zentrum
+		 * \param center_y y-Koordinate Zentrum
+		 * \param result Liste in die die Objekte eingeordnet werden
+		 */
+		void getProjectilesOnScreen(float center_x,float center_y, list<DmgProjectile*>* result);
+	
+		/**
+		 * \fn bool  insertProjectile(DmgProjectile* object, float x, float y)
+		 * \brief Fuegt ein Projektil ein
+		 * \param object Zeiger auf das Objekt, welches eingef&uuml;gt werden soll
+		 * \return bool, der angibt, ob die Operation erfolgreich war
+		 *
+		 */
+		bool  insertProjectile(DmgProjectile* object, float x, float y);
+		
+		/**
+		 * \fn deleteServerWObject(ServerWObject* object)
+		 * \brief L&ouml;scht ServerWObject
+		 * \param object Zeiger auf das Objekt, welches gel&ouml;scht werden soll
+		 * \return bool, der angibt, ob die Operation erfolgreich war
+		 * 
+		 * L&ouml;scht das ServerWObject aus den internen Datenstrukturen. Das Objekt selbst wird nicht gel&ouml;scht, es wird nur die Einbindung in die Datenstrukturen entfernt. Wenn das L&ouml;schen erfolgreich war, so wird true zur&uuml;ckgegeben, sonst false.
+		 * Wenn ein NULL-Zeiger &uuml;bergeben wird, so wird false ausgegeben.
+		 */
+		bool  deleteSWObject (ServerWObject* object);
+		
+		 /**
+		 * \fn moveServerWObject(ServerWObject* object, float x, float y)
+		 * \brief verschiebt ein ServerWObject an den Punkt (x,y)
+		 * \param object Zeiger auf das Objekt, welches verschoben werden soll
+		 * \param x x-Koordinate des Zielpunktes, zu dem das Objekt verschoben werden soll
+		 * \param y y-Koordinate des Zielpunktes, zu dem das Objekt verschoben werden soll
+		 * \return bool, welcher angibt, ob das Verschieben erfolgreich war
+		  */
+		bool moveSWObject(ServerWObject* object, float x, float y);
+		
+		/**
+		 * \fn update(float time)
+		 * \brief Lässt für alle Objekte in der Welt die angegebene Zeitspanne verstreichen
+		 * \param time Zeit um die in der Welt vergeht in Millisekunden
+		 */
+		void update(float time);
+		
+		/**
+		 * \fn bool dropItem(Item*, float x, float y)
+		 * \brief Laesst Item in der Region fallen
+		 * \param item Gegenstand
+		 * \param x x-Koordinate
+		 * \param y y-Koordinate
+		 */
+		bool dropItem(Item* item, float x, float y);
+		
+		/**
+		 * \fn bool deleteItemAt(float x, float y)
+		 * \brief Entfernt Item an der angegebenen Stelle aus der Region
+		 */
+		bool deleteItemAt(float x, float y);
+		
+		/**
+		 * \fn Item* getItemAt(float x, float y)
+		 * \brief Gibt Item an der angegebenen Position aus. Gibt NULL aus, wenn dort kein Item ist
+		 */
+		Item* getItemAt(float x, float y);
+		
+		/**
+		 * \fn bool deleteItem(int id)
+		 * \brief Entfernt Item aus der Region
+		 */
+		bool deleteItem(int id);
+		
+		/**
+		 * \fn Item* getItem(int id)
+		 * \brief Gibt Item aus. Gibt NULL aus, wenn dort kein Item ist
+		 */
+		Item* getItem(int id);
+		
+		/**
+		 * \fn void getItemsOnScreen(float center_x,float center_y, list<DropItem*>* result)
+		 * \brief Fuegt alle Gegenstaende auf dem Bildschirm in die Liste eine
+		 * \param center_x x-Koordinate Zentrum
+		 * \param center_y y-Koordinate Zentrum
+		 * \param result Liste in die die Objekte eingeordnet werden
+		 */
+		void getItemsOnScreen(float center_x,float center_y, list<DropItem*>* result);
+		
+		/**
+		 * \fn void getRegionDataString(CharConv* cv)
+		 * \brief Schreibt alle statischen Objekte sowie Tiles  in einen String. Der Puffer wird in der Funktion angelegt
+		 * \param buf Eingabepuffer
+		 * \return Zeiger hinter den beschriebenen Bereich
+		 */
+		void getRegionDataString(CharConv* cv);
+		
+		/**
+		 * \fn int getRegionDataStringLength()
+		 * \brief Gibt die zu erwartende Laenge des Strings aus
+		 */
+		int getRegionDataStringLength()
+		{
+			return m_static_objects->size()*30+10+m_dimx*m_dimy*4;
+		}
+		
+		/**
+		 * \fn  setTile(Tile tile,short x, short y)
+		 * \brief setzt an der angegebenen Position das Tile
+		 * \param tile Tile
+		 * \param x Position
+		 * \param y Position
+		 */
+		void setTile(Tile tile,short x, short y);
+		
+		/**
+		 * \fn map<int,ServerWObject*>* getPlayers()
+		 * \brief Gibt alle Spieler in der Region aus
+		 */
+		map<int,ServerWObject*>* getPlayers()
+		{
+			return m_players;
+		}
+		
+		
+		/**
+		 * \fn map<int,DropItem*>* getDropItems()
+		 * \brief Gibt alle auf dem Boden liegenden Items aus
+		 */
+		map<int,DropItem*>* getDropItems()
+		{
+			return m_drop_items;
+		}
+				
+	private:
+	/**
+	 * \var m_dimx
+	 * \brief Ausdehnung der Region in x-Richtung
+	 */
+	short m_dimx;
+		
+	/**
+		* \var m_dimy
+		* \brief Ausdehnung der Region in y-Richtung
+		*/
+	short m_dimy;
+	
+	/**
+		* \var m_data_grid
+		* \brief Das Array, welches die Daten der Region enthaelt. Jeder Eintrag im Array entspricht einem 4*4 Quadrat
+		*/
+	Matrix2d<Gridunit>* m_data_grid;
+	
+	/**
+		* \var m_neighbour_region[4]
+		* \brief Gibt die vier Nachbarregionen an
+		*/
+	NBRegion m_neighbour_region[4];
+	
+	/**
+	 * \var Matrix2d<char> m_tiles
+	 * \brief Matrix der Tiles
+	 */
+	Matrix2d<char>* m_tiles;
+	
+	/**
+	 * \var m_players
+	 * Liste der Spieler in der Region
+	 */
+	map<int,ServerWObject*>* m_players;
+	
+	/**
+	 * \var map<int, DmgProjectile>* m_projectiles
+	 * \brief Liste aller Projektile in der Region
+	 */
+	list<DmgProjectile*>* m_projectiles;
+	
+	/**
+	 * \var map<int,ServerWObject*>* m_object_bintree
+	 * \brief organisiert alle nicht statischen Objekte in einem Bin&auml;rbaum
+	 */
+	map<int,ServerWObject*>* m_objects;
+	
+	/**
+	 * \var map<int,ServerWObject*>* m_object_bintree
+	 * \brief organisiert statische Objekte in einem Bin&auml;rbaum
+	 */
+	map<int,ServerWObject*>* m_static_objects;
+	
+	/**
+	 * \var map<int,DropItem*>* m_drop_items
+	 * \brief Liste der Gegenstaende, die auf dem Boden liegen
+	 */
+	map<int,DropItem*>* m_drop_items;
+	
+};
+
+#include "gridunit.h"
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/server.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,398 @@
+#include "server.h"
+
+Server::Server()
+	: m_logins()
+{
+	m_world =0;
+	m_network=0;
+	m_stop = false;
+}
+
+Server::~Server()
+{
+}
+
+void Server::init(int max_slots)
+{
+	ObjectFactory::init();
+
+	m_network = new ServerNetwork(max_slots);
+	if( m_network->init( REQ_PORT )!=NET_OK )
+	{
+		ERRORMSG( "Error occured in network" );
+		return ;
+	}
+
+	long sec;
+	time(&sec);
+	srand(sec);
+
+	m_world=new World();
+	m_world->setNetwork(m_network);
+
+	ObjectFactory::m_world = m_world;
+
+	int gen_type=2	;
+
+	if (gen_type==1)
+	{
+
+	}
+	else if(gen_type==2)
+	{
+		Region* reg = new Region(25,25);
+		short rid = m_world->insertRegion(reg);
+
+
+
+
+		// Objekte anlegen
+		ServerWObject* wo=0,*wo2=0;
+		Creature* cr =0;
+		CreatureBaseAttr* basm =0;
+		WorldObject::Geometry* wob=0;
+		Shape* sp=0;
+		Spawnpoint* spawn=0;
+
+		// Tiles Setzen
+		for (int i=1;i<5;i++)
+		{
+			reg->setTile(TILE_GRASS,5,i);
+		}
+
+		for (int i=7;i<10;i++)
+		{
+			reg->setTile(TILE_WATER,i,6);
+		}
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_FIXED_OBJECT, "fence");
+		m_world->insertSWObject(wo, 4,6,rid);
+
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_FIXED_OBJECT, "tree");
+		m_world->insertSWObject(wo, 9,13,rid);
+
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "goblin");
+		m_world->insertSWObject(wo, 13,8,rid);
+
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "gob_dog");
+		m_world->insertSWObject(wo, 14.2,8.2,rid);
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "goblin");
+		m_world->insertSWObject(wo, 14.5,6.7,rid);
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "goblin");
+		m_world->insertSWObject(wo, 14.8,5.7,rid);
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "goblin");
+		m_world->insertSWObject(wo, 14,10.9,rid);
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "goblin");
+		m_world->insertSWObject(wo, 17,8.2,rid);
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "lich");
+		m_world->insertSWObject(wo, 7,5,rid);
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "goblin");
+		m_world->insertSWObject(wo, 18.5,7,rid);
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "goblin");
+		m_world->insertSWObject(wo, 17.2,6.6,rid);
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "goblin");
+		m_world->insertSWObject(wo, 19.9,6.9,rid);
+
+/*
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "goblin");
+		m_world->insertSWObject(wo, 16.2,3,rid);
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "goblin");
+		m_world->insertSWObject(wo, 19.2,3.1,rid);
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "goblin");
+		m_world->insertSWObject(wo, 6.5,6.4,rid);
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "goblin");
+		m_world->insertSWObject(wo, 8.5,6.4,rid);
+		*/
+/*
+
+		Spawnpoint::SpawnedMonsterGroup mg("goblin",1.0,1);
+		spawn = new Spawnpoint(m_world,1);
+		spawn->setRespawnTime(10000);
+		spawn->addMonsterGroup(mg);
+		m_world->insertSWObject(spawn,9,9,rid);
+*/
+/*
+		int i,j;
+		for (i=1;i<48;i++)
+		{
+			for (int j=1;j<48;j++)
+			{
+				reg->setTile(TILE_GRASS,i,j);
+			}
+		}
+
+		for (i=0;i<49;i++)
+		{
+			reg->setTile(TILE_WATER,i,0);
+			reg->setTile(TILE_WATER,i,49);
+			reg->setTile(TILE_WATER,49,i);
+			reg->setTile(TILE_WATER,0,i);
+
+		}
+
+		Spawnpoint::SpawnedMonsterGroup gob("goblin",0.6,6);
+		Spawnpoint::SpawnedMonsterGroup gob2("goblin",0.5,3);
+		Spawnpoint::SpawnedMonsterGroup lich("lich",0.7,1);
+		Spawnpoint::SpawnedMonsterGroup dog("gob_dog",0.4,4);
+
+		spawn = new Spawnpoint(m_world,1);
+		spawn->setRespawnTime(100000);
+		spawn->addMonsterGroup(gob);
+		m_world->insertSWObject(spawn,9,9,rid);
+
+		spawn = new Spawnpoint(m_world,2);
+		spawn->setRespawnTime(100000);
+		spawn->addMonsterGroup(gob);
+		m_world->insertSWObject(spawn,6,18,rid);
+
+		spawn = new Spawnpoint(m_world,3);
+		spawn->setRespawnTime(100000);
+		spawn->addMonsterGroup(gob2);
+		spawn->addMonsterGroup(dog);
+		m_world->insertSWObject(spawn,22,14,rid);
+
+		spawn = new Spawnpoint(m_world,4);
+		spawn->setRespawnTime(100000);
+		spawn->addMonsterGroup(gob);
+		spawn->addMonsterGroup(lich);
+		m_world->insertSWObject(spawn,16,25,rid);
+
+		spawn = new Spawnpoint(m_world,5);
+		spawn->setRespawnTime(100000);
+		spawn->addMonsterGroup(gob2);
+		spawn->addMonsterGroup(lich);
+		spawn->addMonsterGroup(dog);
+		m_world->insertSWObject(spawn,30,27,rid);
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_FIXED_OBJECT, "tree");
+		m_world->insertSWObject(wo, 24,26,rid);
+
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_FIXED_OBJECT, "tree");
+		m_world->insertSWObject(wo, 10,13,rid);
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_FIXED_OBJECT, "tree");
+		m_world->insertSWObject(wo, 20,18,rid);
+*/
+
+	}
+	else if(gen_type==3)
+	{
+
+
+			//MapGenerator::createMap(m_world);
+		printf("World  created\n");
+
+	}
+}
+
+void Server::loop()
+{
+	float  dt=0.f;
+	int i=0;
+	float s=0;
+
+	Timer timer;
+
+	while( !m_stop )
+	{
+		DEBUG5("new_login_player");
+		updateLogins();
+		acceptLogins();
+
+		DEBUG5("update");
+		timer.start();
+		m_world->update( 25.f );
+		dt = timer.getTime();
+		s += dt;
+		if (dt >5)
+		{
+            DEBUG5("update zeit in ms: %f",dt);
+		}
+		i++;
+		if (i==100)
+		{
+			DEBUG5("durchschnittliche updatezeit is ms: %f",s/100);
+			s=0;
+			i=0;
+		}
+
+		if( 25.f-dt>0.f )
+		{
+#ifdef WIN32
+			Sleep( (int)(25.f-dt) );
+#else
+			usleep( (int)((25.f-dt)*1000) );
+#endif
+		}
+		else
+		{
+			//WARNING("server is too slow!");
+		}
+
+		// Debugging
+		//usleep( 1000000 );
+
+		DEBUG5("network->update()");
+		for( int i=0 ; i<1 ; i++ )
+			m_network->update();
+
+	}
+
+    DEBUG("server thread end");
+}
+
+void Server::stop()
+{
+ 	m_stop = true;
+ 	m_network->kill();
+
+    pthread_join(m_server_thread,NULL);
+
+	if( m_world )
+	{
+		delete m_world;
+	}
+
+	if (m_network)
+	{
+
+		delete m_network;
+	}
+}
+
+void Server::acceptLogins()
+{
+	int login_slot;
+
+	while((login_slot=m_network->popNewLoginSlot()) != -1 )
+	{
+		INFO( "user login detected: %i",  login_slot  );
+		m_logins.push_back(login_slot);
+
+
+	}
+}
+
+void Server::updateLogins()
+{
+	list<int>::iterator i;
+	Packet* data;
+	int lend;
+	ClientHeader header;
+	DEBUG5("update logins");
+	for (i=m_logins.begin();i!=m_logins.end();)
+	{
+		DEBUG5("testing slot %i",(*i));
+		if (m_network->numberSlotMessages((*i) )>0)
+		{
+			DEBUG5("got Package");
+			m_network->popSlotMessage( (*i),data);
+			CharConv cv(data);
+			header.fromString(&cv);
+			if (header.m_content == PTYPE_C2S_SAVEGAME)
+			{
+				DEBUG("got savegame from slot %i",(*i));
+				char binsave;
+				cv.fromBuffer<char>(binsave);
+				short version;
+				cv.fromBuffer<short>(version);
+				int len;
+				cv.fromBuffer<int>(len);
+				WorldObject::TypeInfo::ObjectSubtype ot;
+				char tmp[11];
+				tmp[10] = '\0';
+				cv.fromBuffer(tmp,10);
+				for (int u=0;u<10;u++)
+					printf("%i ",tmp[u]);
+				ot = tmp;
+				Player* pl =0;
+
+				if (ot == "warrior")
+				{
+					DEBUG5("warrior");
+					pl=new Warrior( m_world, m_world->getValidId() );
+				}
+				else if (ot == "mage")
+				{
+					DEBUG5("mage");
+					pl=new Mage( m_world, m_world->getValidId() );
+				}
+				else if (ot == "archer")
+				{
+					DEBUG5("archer");
+					pl=new Archer( m_world, m_world->getValidId() );
+				}
+				else if (ot == "priest")
+				{
+					DEBUG5("priest");
+					pl=new Priest( m_world, m_world->getValidId() );
+				}
+				else
+				{
+					ERRORMSG("invalid savegame type: %s",ot.c_str());
+					pl=new Warrior( m_world, m_world->getValidId() );
+				}
+
+				if (pl!=0)
+				{
+					DEBUG5("adress of players %p",pl);
+					//pl->fromSavegame(bp2);
+					pl->setNetworkSlot( (*i) );
+					m_world->insertSWObject(pl,6,11,0);
+					pl->getDynAttr()->m_health=150;
+
+					//pl->getDynAttr()->m_status_mod_time[Damage::CONFUSED] = 100000;
+					//pl->getDynAttr()->m_status_mod_time[Damage::BERSERK] = 100000;
+
+				}
+				i = m_logins.erase(i);
+			}
+			else
+			{
+                   DEBUG("unknown type %i",header.m_content);
+			}
+			m_network->deallocatePacket(data);
+		}
+		else
+		{
+			i++;
+		}
+
+	}
+	DEBUG5("done");
+
+}
+
+void* Server::startServer(void* arg)
+{
+	StartArgs* argp = (StartArgs*) arg;
+
+	argp->m_server->loop();
+}
+
+void Server::run()
+{
+	StartArgs* arg = new StartArgs;
+	arg->m_server = this;
+
+	pthread_create( &m_server_thread, NULL, &Server::startServer, arg );
+}
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/server.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,144 @@
+#ifndef SERVER_H
+#define SERVER_H
+
+#include <unistd.h>
+#include "debug.h"
+#include "servernetwork.h"
+#include <list>
+
+
+#include "world.h"
+//#include "mapgenerator.h"
+
+#include <sys/time.h>
+#include <sys/types.h>
+#include <unistd.h>
+//#include <GL/gl.h>
+//#include <GL/glut.h>
+
+// includes zum spaeter wieder rausnehmen...
+#include "warrior.h"
+#include "mage.h"
+#include "archer.h"
+#include "priest.h"
+#include "fixedobject.h"
+#include "monster.h"
+#include "goblin.h"
+#include "spawnpoint.h"
+
+#include "objectfactory.h"
+
+#include "timer.h"
+
+#ifdef WIN32
+#include <windows.h>
+#endif
+
+#include <pthread.h>
+
+/**
+ * \class Server
+ * \brief Klasse fuer einen Spielserver
+ */
+class Server
+{
+	public:
+	
+	/**
+	 * \struct StartArgs
+	 * \brief Argumentliste fuer den Start des Serverthreads
+	 */
+	struct StartArgs
+	{
+		Server* m_server;
+	};
+		
+	/**
+	 * \fn  Server()
+	 * \brief Konstruktor
+	 */
+	Server();
+	
+	/**
+	 * \fn ~Server()
+	 * \brief Destruktor
+	 */
+	~Server();
+	
+	/**
+	 * \fn void init(int max_slots)
+	 * \brief initialisiert den Server
+	 */
+	void init(int max_slots);
+	
+	/**
+	 * \fn void run()
+	 * \brief  Startet den Server
+	 */
+	void run();
+	
+	/**
+	 * \fn void loop()
+	 * \brief die Hauptspielschleife
+	 */
+	void loop();
+	
+	/**
+	 * \fn void stop()
+	 * \brief Stoppt den Server
+	 */
+	void stop();
+	
+	/**
+	 * \fn void acceptLogins()
+	 * \brief Fuegt Spieler die sich neu eingeloggt haben ins Spiel ein
+	 */
+	void acceptLogins();
+	
+	/**
+	 * \fn void updateLogins()
+	 * \brief Aktualisiert die Liste der eingehenden Logins
+	 */
+	 void updateLogins();
+	
+	 /**
+	  * \fn static void* startServer(void* arg)
+	  * \brief Startet den Server in einem eigenen Thread
+	  */
+	static void* startServer(void* arg);
+	
+	private:
+	/**
+	 * \var bool m_stop
+	 * \brief gibt an, ob der Server gestoppt werden soll
+	 */
+	bool m_stop;
+	
+	/**
+	 * \var pthread_t m_server_thread
+	 * \brief Thread Handel fuer den Thread des Servers
+	 */
+	pthread_t m_server_thread;
+	
+	/**
+	 * \var World *m_world
+	 * \brief Zeiger auf die Welt
+	 */
+	World *m_world;
+	
+	/**
+	 * \var ServerNetwork * m_network
+	 * \brief Zeiger auf das Netzwerk
+	 */
+	ServerNetwork * m_network;
+
+	/**
+	 * \var list<int> m_logins
+	 * \brief Liste der Spieler die sich gerade einloggen wollen
+	 */
+	list<int> m_logins;
+};
+
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/serveraction.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,119 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf
+
+	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.
+*/
+
+/**
+ * \file action.h
+ * \defgroup action \ Aktionen
+ * \ingroup command
+ * \brief Stellt einzelne Aktionen zur Realisierung eines Kommandos zur Verf&uuml;gung
+ * \author Hans Wulf
+ * \version 1.0
+ * \date 2007/05/28
+ * \note Beinhaltet die Klasse Action
+ */
+#ifndef SERVERACTION_H
+#define SERVERACTION_H
+
+#include <string>
+#include "action.h"
+
+/**
+ * \class Action
+ * \brief Beschreibt eine Aktion, welche eine Figur ausf&uuml;hren kann. Eine Aktion ist dabei die kleinste Einheit einer Handlung.
+ */
+
+/**
+ * \struct ServerAction
+ * \brief Genauere Beschreibung einer Aktion auf Serverseite
+ */
+struct ServerAction : public Action
+{
+//Public stuff
+	
+public:
+	
+
+	
+	
+	
+	//Fields
+	//Constructors
+	/**
+	 * \fn Action(ActionType type, float goal_coordinate_x, float goal_coordinate_y, int goal_object_id, float time)
+	 * \brief Legt ein neues Action Objekt an
+	 * \param type initialisiert den Typ der Aktion
+	 * \param goal_coordinate_x initialisiert die x-Koordinate des Zielpunkts
+	 * \param goal_coordinate_y initialisiert die y-Koordinate des Zielpunkts
+	 * \param goal_object_id initialisiert ID des Zielobjekts
+	 * \param time initialisiert Gesamtdauer der Aktion
+	 */
+	ServerAction(ActionType type, float goal_coordinate_x, float goal_coordinate_y, int goal_object_id, float time) : Action(type)
+	{
+		m_goal_coordinate_x= goal_coordinate_x;
+		m_goal_coordinate_y = goal_coordinate_y;
+		m_goal_object_id= goal_object_id;
+		m_time = time;
+		m_elapsed_time =0;
+	
+	}
+	
+	/**
+	 * \fn ServerAction() : Action()
+	 * \brief Legt eine leere Aktion an
+	 */
+	ServerAction() : Action()
+	{
+		
+	}
+	
+	//Fields	
+	/**
+	 * \var m_type;
+	 * \brief Typ der vorhergehenden Aktion
+	 */
+	ActionType m_prev_type;
+	
+	/**
+	 * \var m_goal_coordinate_x;
+	 * \brief x-Koordinate des Zieles
+	 */
+	float m_goal_coordinate_x;
+	
+	/**
+	 * \var m_goal_coordinate_y;
+	 * \brief y-Koordinate des Zieles
+	 */
+	float m_goal_coordinate_y;
+	
+	/**
+	 * \var m_goal_object_id;
+	 * \brief ID des Zielobjekts
+	 */
+	int  m_goal_object_id;
+	
+	
+
+	
+
+	
+};
+
+
+
+#endif //SERVERACTION_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/serveritem.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,489 @@
+#include "serveritem.h"
+
+ItemBasicData::ItemBasicData()
+{
+	m_useup_effect=0;
+	m_equip_effect=0;
+	m_weapon_attr=0;
+	m_level_req = 0;
+	m_char_req = Item::REQ_NONE;
+	
+	for (int i=0;i<31;i++)
+	{
+		m_modchance[i] =0;
+	}
+	m_min_enchant =0;
+	m_max_enchant =0;
+	
+}
+
+
+ServerItem::ServerItem()
+{
+	m_useup_effect=0;
+	m_equip_effect=0;
+	m_weapon_attr=0;
+	m_level_req = 0;
+	m_char_req = REQ_NONE;
+}
+
+ServerItem::ServerItem(ItemBasicData& data)
+{
+	m_type = data.m_type;
+	m_subtype = data.m_subtype;
+	m_size = data.m_size;
+	m_price = data.m_price;
+	
+	if (data.m_useup_effect)
+	{
+		DEBUG5("copy useup effect");
+		m_useup_effect = new CreatureDynAttrMod;
+		memcpy(m_useup_effect,data.m_useup_effect,sizeof(m_useup_effect));
+	}
+	else
+	{
+		m_useup_effect =0;
+	}
+	
+	if (data.m_equip_effect)
+	{
+		DEBUG5("copy equip effect");
+		m_equip_effect = new CreatureBaseAttrMod;
+		memcpy(m_equip_effect,data.m_equip_effect,sizeof(m_equip_effect));
+	}
+	else
+	{
+		m_equip_effect =0;
+	}
+	
+	if (data.m_weapon_attr)
+	{
+		DEBUG5("copy weapon attr");
+		
+		m_weapon_attr = new WeaponAttr;
+		memcpy(m_weapon_attr,data.m_weapon_attr,sizeof(m_weapon_attr));
+		memcpy(&(m_weapon_attr->m_damage) , &(data.m_weapon_attr->m_damage),sizeof(Damage));
+		
+	}
+	else
+	{
+		m_equip_effect =0;
+	}
+	
+	m_level_req = data.m_level_req;
+	m_char_req = data.m_char_req;
+	
+	
+
+}
+
+ServerItem::~ServerItem()
+{
+	if (m_useup_effect) delete m_useup_effect;
+	if (m_equip_effect) delete m_equip_effect;
+	if (m_weapon_attr) delete  m_weapon_attr;
+}
+
+void ServerItem::toStringComplete(CharConv* cv, short pos)
+{
+
+	Item::toString(cv,pos);
+	
+	cv->toBuffer(m_price);
+	cv->toBuffer(m_level_req);
+	cv->toBuffer(m_char_req);	
+	cv->toBuffer(m_magic_power);
+	
+	char mask = NOINFO;
+	
+	if (m_useup_effect!=0)
+		mask |= USEUP_INFO;
+	
+	if (m_equip_effect!=0)
+		mask |= EQUIP_INFO;
+
+	if (m_weapon_attr!=0)
+		mask |= WEAPON_INFO;
+	
+	cv->toBuffer(mask);
+	
+	int i;
+	if (m_useup_effect!=0)
+	{
+		DEBUG5("writing useup effect");
+		cv->toBuffer(m_useup_effect->m_dhealth);
+		for (i=0;i<NR_STATUS_MODS;i++)
+		{
+			cv->toBuffer(m_useup_effect->m_dstatus_mod_immune_time[i]);
+		}
+	}
+	
+	if (m_equip_effect!=0)
+	{
+		DEBUG5("writing equip effect");
+		cv->toBuffer(m_equip_effect->m_darmor);
+		cv->toBuffer(m_equip_effect->m_dblock);
+		cv->toBuffer(m_equip_effect->m_dmax_health);
+		cv->toBuffer(m_equip_effect->m_dattack);
+		cv->toBuffer(m_equip_effect->m_dstrength);
+		cv->toBuffer(m_equip_effect->m_ddexterity);
+		cv->toBuffer(m_equip_effect->m_dmagic_power);
+		cv->toBuffer(m_equip_effect->m_dwillpower);
+		for (i=0;i<4;i++)
+		{
+			cv->toBuffer(m_equip_effect->m_dresistances[i]);
+		}
+		
+		for (i=0;i<4;i++)
+		{
+			cv->toBuffer(m_equip_effect->m_dresistances_cap[i]);
+		}
+		
+		cv->toBuffer(m_equip_effect->m_dwalk_speed);
+		cv->toBuffer(m_equip_effect->m_dattack_speed);
+		cv->toBuffer(m_equip_effect->m_xspecial_flags);
+		
+		for (i=0;i<6;i++)
+		{
+			cv->toBuffer(m_equip_effect->m_xabilities[i]);
+		}
+		cv->toBuffer(m_equip_effect->m_ximmunity);
+		
+	}
+	
+	if (m_weapon_attr!=0)
+	{
+		DEBUG5("writing weapon attr");
+		m_weapon_attr->m_damage.toString(cv);
+		cv->toBuffer(m_weapon_attr->m_attack_range);
+		cv->toBuffer(m_weapon_attr->m_two_handed);
+		cv->toBuffer(m_weapon_attr->m_dattack_speed);
+		
+	}
+	
+	
+	
+	
+}
+
+void ServerItem::fromStringComplete(CharConv* cv, short& pos)
+{
+	Item::fromString(cv,pos);	
+	
+	cv->fromBuffer<int>(m_price);
+	cv->fromBuffer<char>(m_level_req);
+	cv->fromBuffer<char>(m_char_req);
+	cv->fromBuffer<float>(m_magic_power);
+
+	
+	char mask = NOINFO;
+	cv->fromBuffer<char>(mask);
+	
+	if (mask & USEUP_INFO)
+	{
+		m_useup_effect= new CreatureDynAttrMod();
+	}
+	
+	if (mask & EQUIP_INFO)
+	{
+		m_equip_effect=new CreatureBaseAttrMod();
+	}
+
+	if (mask & WEAPON_INFO)
+	{
+		m_weapon_attr = new WeaponAttr();
+	}
+	
+	
+	int i;
+	if (m_useup_effect!=0)
+	{
+		DEBUG5("loading useup effect");
+		cv->fromBuffer<float>(m_useup_effect->m_dhealth );
+		for (i=0;i<NR_STATUS_MODS;i++)
+		{
+			cv->fromBuffer<float>(m_useup_effect->m_dstatus_mod_immune_time[i]);
+		}
+	}
+	
+	if (m_equip_effect!=0)
+	{
+		DEBUG5("loading equip effect");
+		cv->fromBuffer<short>(m_equip_effect->m_darmor);
+		cv->fromBuffer<short>(m_equip_effect->m_dblock);
+		cv->fromBuffer<float>(m_equip_effect->m_dmax_health);
+		cv->fromBuffer<short>(m_equip_effect->m_dattack);
+		cv->fromBuffer<short>(m_equip_effect->m_dstrength);
+		cv->fromBuffer<short>(m_equip_effect->m_ddexterity);
+		cv->fromBuffer<short>(m_equip_effect->m_dmagic_power);
+		cv->fromBuffer<short>(m_equip_effect->m_dwillpower);
+		for (i=0;i<4;i++)
+		{
+			cv->fromBuffer<short>(m_equip_effect->m_dresistances[i]);
+		}
+		
+		for (i=0;i<4;i++)
+		{
+			cv->fromBuffer<short>(m_equip_effect->m_dresistances_cap[i]);
+		}
+		
+		cv->fromBuffer<short>(m_equip_effect->m_dwalk_speed);
+		cv->fromBuffer<short>(m_equip_effect->m_dattack_speed);
+		cv->fromBuffer<int>(m_equip_effect->m_xspecial_flags );
+		
+		for (i=0;i<6;i++)
+		{
+			cv->fromBuffer<int>(m_equip_effect->m_xabilities[i]);
+		}
+		cv->fromBuffer<char>(m_equip_effect->m_ximmunity);
+		
+	}
+	
+	if (m_weapon_attr!=0)
+	{
+		DEBUG5("loading weapon attr");
+		m_weapon_attr->m_damage.fromString(cv);
+		cv->fromBuffer<float>(m_weapon_attr->m_attack_range);
+		cv->fromBuffer<bool>(m_weapon_attr->m_two_handed);
+		cv->fromBuffer<short>(m_weapon_attr->m_dattack_speed);
+		
+	}
+	
+
+}
+
+std::string ServerItem::getDescription()
+{
+	
+	// String fuer die Beschreibung
+	ostringstream out_stream;
+	out_stream.str("");
+	out_stream<<getName()<<"\n";
+	int i;
+	// Levelbeschraenkung
+	out_stream <<"Wert: "<<m_price;
+	if (m_level_req>0)
+	{
+		out_stream<<"\n" << "Mindestlevel: "<<(int) m_level_req;
+	}
+	
+	// TODO: Beschraenkung nach Charakterklasse
+	
+	// Effekt beim Verbrauchen
+	if (m_useup_effect)
+	{
+		// HP Heilung
+		if (m_useup_effect->m_dhealth>0)
+		{
+			out_stream <<"\n"<< "heilt "<<(int) m_useup_effect->m_dhealth<<" HP";
+		}
+		
+		// Heilen/ Immunisieren gegen Statusmods
+		for (i=0;i<8;i++)
+		{
+			if (	m_useup_effect->m_dstatus_mod_immune_time[i]>0)
+			{
+				out_stream <<"\n"<< "heilt "<<Damage::getStatusModName((Damage::StatusMods) i);
+				if (m_useup_effect->m_dstatus_mod_immune_time[i]>=1000)
+				{
+					out_stream <<", immunisiert "<< (int) (m_useup_effect->m_dstatus_mod_immune_time[i]*0.001f)<<"s";
+				}
+			}
+		}
+		
+	}
+	
+	// Daten einer Waffe
+	if (m_weapon_attr)
+	{
+		if (m_weapon_attr->m_two_handed)
+		{
+			out_stream <<"\n"<< "Zweihand-Waffe";
+		}
+		// Reichweite / Angriffsgeschwindigkeit
+		if (m_type == WEAPON)
+		{
+			out_stream << "\n" << "Reichweite: "<<m_weapon_attr->m_attack_range;
+		}
+		
+		//out_stream << "\n" << "Angriffe: "<<m_weapon_attr->m_attack_speed*0.001f<<"/s";
+		
+		// Schaden
+		std::string dmgstring = m_weapon_attr->m_damage.getDamageString(Damage::ITEM);
+		if (dmgstring != "")
+		{
+			if (m_type == WEAPON)
+			{
+				out_stream << "\n" << "Schaden:";
+			}
+			out_stream<<"\n"<<dmgstring;
+		}
+		
+	}
+	
+	// Effekte von Ausruestungsgegenstaenden
+	if (m_equip_effect)
+	{
+		if (m_equip_effect->m_darmor>0)
+		{
+			out_stream<<"\n"<<"Ruestung: "<<m_equip_effect->m_darmor;
+		}
+		
+		if (m_equip_effect->m_dblock>0)
+		{
+			out_stream<<"\n"<<"Block: "<<m_equip_effect->m_dblock;
+		}
+		
+		if (m_equip_effect->m_dmax_health>0)
+		{
+			out_stream<<"\n"<<"+"<<(int) m_equip_effect->m_dmax_health<< " max HP";
+		}
+		
+		if (m_equip_effect->m_dstrength>0)
+		{
+			out_stream<<"\n"<<"+"<<m_equip_effect->m_dstrength<< " Staerke";
+		}
+		
+		if (m_equip_effect->m_ddexterity>0)
+		{
+			out_stream<<"\n"<<"+"<<m_equip_effect->m_ddexterity<< " Geschick";
+		}
+		
+		if (m_equip_effect->m_dmagic_power>0)
+		{
+			out_stream<<"\n"<<"+"<<m_equip_effect->m_dmagic_power<< " Zauberkraft";
+		}
+		
+		if (m_equip_effect->m_dwillpower>0)
+		{
+			out_stream<<"\n"<<"+"<<m_equip_effect->m_dwillpower<< " Willenskraft";
+		}
+		
+		for (i=0;i<4;i++)
+		{
+			if (m_equip_effect->m_dresistances[i]>0)
+			{
+				out_stream<<"\n"<<"+"<<m_equip_effect->m_dresistances[i]<<" "<<Damage::getDamageTypeName((Damage::DamageType) i)<< "Resistenz";
+			}
+		}
+		
+		for (i=0;i<4;i++)
+		{
+			if (m_equip_effect->m_dresistances_cap[i]>0)
+			{
+				out_stream<<"\n"<<"+"<<m_equip_effect->m_dresistances_cap[i]<<" max. "<<Damage::getDamageTypeName((Damage::DamageType) i)<< "Resistenz";
+			}		
+		}
+		
+		
+		// TODO: Angriffsgeschwindigkeit
+		// TODO: special Flags
+		// TODO: Faehigkeiten
+		// TODO: Immunitaeten
+		
+	}
+	
+	
+	return out_stream.str();
+}
+
+void ServerItem::calcPrice()
+{
+	if (m_useup_effect !=0)
+	{
+		// Trank, beim generieren erzeugten wert nutzen
+		return;
+	}
+	
+	// Nutzwert des Gegenstandes
+	float value =0;
+	// Faktor fuer den wert
+	float mult =1;
+	
+	int i;
+	if (m_weapon_attr !=0)
+	{
+		// Wert des Schadens;
+		float dvalue=0;
+		// Multiplikator des Schadens
+		float dmult =1;
+		dmult *= min(2.0,sqrt(m_weapon_attr->m_attack_range));
+		dmult *= (1+m_weapon_attr->m_dattack_speed/2000.0);
+		
+		// Schaden der Waffe
+		Damage & dmg = m_weapon_attr->m_damage;
+		dvalue += dmg.m_min_damage[Damage::PHYSICAL]*0.5;
+		dvalue += dmg.m_max_damage[Damage::PHYSICAL]*0.5;
+		for (i=1;i<4;i++)
+		{
+			dvalue += dmg.m_min_damage[i]*0.3;
+			dvalue += dmg.m_max_damage[i]*0.3;
+		}
+		
+		for (i=0;i<4;i++)
+		{
+			dmult *=  dmg.m_multiplier[i];
+		}
+		
+		for (i=1;i<4;i++)
+		{
+			dvalue +=  ((dmg.m_multiplier[i]*dmg.m_multiplier[i])-1)*100;
+		}
+		
+		dvalue += dmg.m_attack*0.1;
+		dvalue += dmg.m_power*0.1;
+		
+		dmult *= (1+dmg.m_crit_perc*2);
+		
+		for (i=0;i<8;i++)
+		{
+			dvalue += dmg.m_status_mod_power[i]*0.2;
+		}
+				
+		// TODO: Flags einberechnen
+		value += dvalue *dmult;
+
+	}
+	
+	if (m_equip_effect!=0)
+	{
+		// Modifikation beim anlegen
+		CreatureBaseAttrMod* cbasm = m_equip_effect;
+		
+		value += cbasm->m_darmor;
+		value += cbasm->m_dblock*0.5;
+		value += cbasm->m_dattack*0.2;
+		value += cbasm->m_dmax_health*0.4;
+		value += cbasm->m_dstrength*2;
+		value += cbasm->m_ddexterity*2;
+		value += cbasm->m_dwillpower*2;
+		value += cbasm->m_dmagic_power*2;
+		mult *= (1+cbasm->m_dattack_speed/2000.0);
+		
+		for (i=0;i<4;i++)
+		{
+			value += cbasm->m_dresistances[i]*2;
+		}
+		
+		for (i=0;i<4;i++)
+		{
+			value += cbasm->m_dresistances_cap[i]*4;
+		}
+		
+		
+		// TODO: Special Flags einberechnen
+		
+		// TODO: Immunitaeten einberechnen
+		
+		// TODO: Skills mit einberechnen
+		
+	}
+	
+
+	
+	value = ceil(mult*value*value);
+	value = min (value,1000000.0f);
+	m_price = (int) value;
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/serveritem.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,260 @@
+#ifndef SERVERITEM_H
+#define SERVERITEM_H
+
+#include "item.h"
+#include "damage.h"
+#include "creaturestruct.h"
+
+#include <math.h>
+
+
+/**
+ * \struct WeaponAttr
+ * \brief Eigenschaften und Attribute einer Waffe
+ */
+struct WeaponAttr
+{
+	/**
+	 * \var m_damage
+	 * \brief Schaden, den die Waffe austeilt
+	 */
+	Damage m_damage;
+
+	/**
+	 * \var m_attack_range
+	 * \brief Gibt die Reichweite der Waffe an. Fuer Schusswaffen auf  ITEM_BOW_RANGE setzen
+	 */
+	float m_attack_range;
+
+	/**
+	 * \var m_two_handed
+	 * \brief Ist auf true gesetzt, wenn die Waffe beidhaendig benutzt wird.
+	 */
+	bool m_two_handed;
+
+	/**
+	 * \var m_dattack_speed
+	 * \brief Gibt die Aenderung der Angriffsgeschwindigkeit bei Benutzen dieser Waffe an
+	 */
+	short m_dattack_speed;
+
+	/**
+	 * \fn void init()
+	 * \brief initialisiert die Datenfelder
+	 */
+	void init()
+	{
+		m_attack_range=1;
+		m_dattack_speed=0;
+		m_two_handed=false;
+		m_damage.init();
+	}
+
+	/**
+	 * \fn WeaponAttr()
+	 * \brief Konstruktor
+	 */
+	WeaponAttr()
+	{
+		init();
+	}
+};
+
+/**
+ * \struct ItemBasicData
+ *  \brief Informationen die noetig sind, um ein bestimmtes Item zu erzeugen
+ */
+struct ItemBasicData
+{
+    /**
+	 * \var m_useup_effect
+	 * \brief Gibt die Veraenderung der dynamischen Attribute an, die beim verbrauchen des Gegenstandes eintritt. Wenn der Zeiger auf NULL gesetzt ist, kann der Gegenstand nicht verbraucht werden.
+	 */
+	CreatureDynAttrMod* m_useup_effect;
+
+	/**
+	 * \var m_equip_effect
+	 * \brief Gibt die Veraenderung der Basisattribute an, die beim verwenden des Gegenstandes aus Ausruestungsgegenstand eintritt. Wenn der Zeiger auf NULL gesetzt ist, kann der Gegenstand nicht auf diese Weise verwendet werden.
+	 */
+	CreatureBaseAttrMod* m_equip_effect;
+
+	/**
+	 * \var m_weapon_attr
+	 * \brief Gibt den Attribute des Gegenstandes als Waffe an. Sollte bei allen Gegenstaenden, die nicht Waffen sind auf NULL gesetzt sein
+	 */
+	WeaponAttr* m_weapon_attr;
+
+	/**
+	 * \var char m_level_req
+	 * \brief Erforderliches Level um das Item zu verwenden
+	 */
+	char m_level_req;
+
+	/**
+	 * \var char m_char_req
+	 * \brief Anforderungen an die Charakterklasse
+	 */
+	char m_char_req;
+
+	/**
+	* \var m_subtype;
+	* \brief Gibt die Unterart eines Gegenstands an ((Langschwert, Dolch usw)
+	*/
+	Item::Subtype m_subtype;
+
+
+	/**
+	 * \var m_type;
+	 * \brief Gibt Typ des Gegenstands an (Waffe, Helm usw...)
+	 */
+	Item::Type m_type;
+
+	/**
+	* \var m_size
+	\brief Gibt die Groesse des Gegenstandes (klein,mittel, gross) an
+	*/
+	Item::Size m_size;
+	
+	/**
+	 * \var int m_price
+	 * \brief Wert des Gegenstandes
+	 */
+	int m_price;
+
+	/**
+	 * \var float m_modchance[31]
+	 * \brief relative Chance auf die verschiedenen Modifikationen
+	 */
+	float m_modchance[31];
+
+	/**
+	 * \var float m_min_enchant
+	 * \brief minimale Starke einer Verzauberung des Items
+	 */
+	float m_min_enchant;
+
+	/**
+	 * \var float m_max_enchant
+	 * \brief maximale Starke einer Verzauberung des Items
+	 */
+	float m_max_enchant;
+
+	ItemBasicData();
+
+};
+
+/**
+ * \struct ServerItem
+ * \brief Item mit zusaetzlichen Informationen zu Attributen und Eigenschaften
+ */
+struct ServerItem : public Item
+{
+
+	/**
+	 * \fn ServerItem()
+	 * \brief Konstruktor
+	 */
+	ServerItem();
+
+	
+	/**
+	 * \fn ServerItem(ItemBasicData& data)
+	 * \brief erzeugt ein neuen Gegenstand mit den vorgegebenen Daten
+	 * \param data Daten auf deren Basis der Gegenstand erzeugt wird
+	 */
+	ServerItem(ItemBasicData& data);
+
+	/**
+	 * \fn virtual ~ServerItem()
+	 * \brief Destruktor
+	 */
+	virtual ~ServerItem();
+
+
+	/**
+	 * \fn enum InfoFlags
+	 * \brief Zaehlt auf, welche Informationen zu einem Item vorliegen koennen
+	 */
+	enum InfoFlags
+	{
+		NOINFO=0,
+		USEUP_INFO=1,
+ 		EQUIP_INFO=2,
+		WEAPON_INFO=4,
+	};
+
+	/**
+	 * \var m_price;
+	 * \brief Gibt Preis des Gegenstands an
+	 */
+	int m_price;
+
+	/**
+	 * \var m_useup_effect
+	 * \brief Gibt die Veraenderung der dynamischen Attribute an, die beim verbrauchen des Gegenstandes eintritt. Wenn der Zeiger auf NULL gesetzt ist, kann der Gegenstand nicht verbraucht werden.
+	 */
+	CreatureDynAttrMod* m_useup_effect;
+
+	/**
+	 * \var m_equip_effect
+	 * \brief Gibt die Veraenderung der Basisattribute an, die beim verwenden des Gegenstandes aus Ausruestungsgegenstand eintritt. Wenn der Zeiger auf NULL gesetzt ist, kann der Gegenstand nicht auf diese Weise verwendet werden.
+	 */
+	CreatureBaseAttrMod* m_equip_effect;
+
+	/**
+	 * \var m_weapon_attr
+	 * \brief Gibt den Attribute des Gegenstandes als Waffe an. Sollte bei allen Gegenstaenden, die nicht Waffen sind auf NULL gesetzt sein
+	 */
+	WeaponAttr* m_weapon_attr;
+
+	/**
+	 * \var char m_level_req
+	 * \brief Erforderliches Level um das Item zu verwenden
+	 */
+	char m_level_req;
+
+	/**
+	 * \var char m_char_req
+	 * \brief Anforderungen an die Charakterklasse
+	 */
+	char m_char_req;
+
+	/**
+	 * \var float m_magic_power
+	 * \brief Gibt Verzauberungsstärke an
+	 */
+	float m_magic_power;
+
+	/**
+	 * \fn char* toSavegame(CharConv* cv)
+	 * \brief Erzeugt ein binaeres Savegame und schreibt es in den Puffer
+	 * \param buf Ausgabepuffer
+	 * \return Zeiger hinter den beschriebenen Datenbereich
+	 */
+	void toStringComplete(CharConv* cv, short pos);
+
+
+	/**
+	 * \fn char* fromSavegame(CharConv* cv)
+	 * \brief Laedt die Daten aus einem Savegame
+	 * \param buf Zeiger auf Savegame
+	 * \return Zeiger hinter den Datenbereich
+	 */
+	void fromStringComplete(CharConv* cv, short& pos);
+
+
+	/**
+	 * \fn std::string getDescription()
+	 * \brief Gibt eine Beschreibung in Textform aus
+	 */
+	std::string getDescription();
+
+	/**
+	 * \fn calcPrice()
+	 * \brief Berechnet den Wert des Items
+	 */
+	void calcPrice();
+
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/servernetwork.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,237 @@
+#include "servernetwork.h"
+
+NetworkSlot::NetworkSlot(SystemAddress client_address,RakPeerInterface* peer)
+{
+	m_peer = peer;
+	m_system_address = client_address;
+	m_status = NET_CONNECTED;
+}
+
+NetworkSlot::~NetworkSlot()
+{
+	while (numberMessages()!=0)
+	{
+		m_peer->DeallocatePacket(popReceivedPacket());
+	}
+}
+
+void NetworkSlot::pushReceivedPacket(Packet* packet)
+{
+	m_received_packets.push(packet);
+
+}
+
+Packet* NetworkSlot::popReceivedPacket()
+{
+	Packet* tmp = m_received_packets.front();
+	m_received_packets.pop();
+	return tmp;
+}
+
+int NetworkSlot::numberMessages()
+{
+	return m_received_packets.size();
+}
+
+
+
+
+ServerNetwork::ServerNetwork(int max_slots)
+{
+	m_max_slots = max_slots;
+
+}
+
+NetStatus ServerNetwork::init( int auth_port )
+{
+	m_peer = RakNetworkFactory::GetRakPeerInterface();
+	SocketDescriptor sock(auth_port,0);
+
+	m_peer->Startup(m_max_slots /* max. Anzahl Verbindungen*/, 10/*sleep time*/, &sock, 1);
+	m_peer->SetMaximumIncomingConnections(m_max_slots);
+
+	m_slots = new NetworkSlot*[m_max_slots];
+	for (int i=0;i< m_max_slots;i++)
+	{
+		m_slots[i] =0;
+	}
+
+	return NET_OK;
+}
+
+ServerNetwork::~ServerNetwork()
+{
+	for (int i=0;i< m_max_slots;i++)
+	{
+		if (m_slots[i]!=0)
+			delete m_slots[i];
+	}
+	delete[] m_slots;
+}
+
+
+unsigned char ServerNetwork::getPacketIdentifier(Packet *p)
+{
+	if ((unsigned char)p->data[0] == ID_TIMESTAMP)
+		return (unsigned char) p->data[sizeof(unsigned char) + sizeof(unsigned long)];
+	else
+		return (unsigned char) p->data[0];
+}
+
+
+
+void ServerNetwork::update()
+{
+    if (m_peer==0)
+        return;
+
+
+	Packet* packet = m_peer->Receive();
+	unsigned char id;
+	int slot;
+	while (packet !=0)
+	{
+		id = getPacketIdentifier(packet);
+		slot = getSlotByAddress(packet->systemAddress);
+
+		if (id <  ID_USER_PACKET_ENUM)
+		{
+			switch(id)
+			{
+				case ID_NEW_INCOMING_CONNECTION:
+					slot = insertNewSlot(packet->systemAddress);
+					pushNewLoginSlot(slot);
+					DEBUG("connection accepted");
+					break;
+
+				case ID_DISCONNECTION_NOTIFICATION:
+					DEBUG("slot %i disconnected",slot);
+					delete m_slots[slot];
+					m_slots[slot]=0;
+					break;
+					
+				case ID_CONNECTION_LOST:
+					DEBUG("connection to slot %i lost",slot);
+					delete m_slots[slot];
+					m_slots[slot]=0;
+					break;
+
+				default:
+					DEBUG("unknown id: %i",id);
+					break;
+			}
+
+			deallocatePacket(packet);
+		}
+		else
+		{
+
+			if (slot !=-1)
+			{
+				//DEBUG("packet received");
+				m_slots[slot]->pushReceivedPacket(packet);
+			}
+			else
+			{
+				DEBUG("fehler: unbekannter absender\n");
+				deallocatePacket(packet);
+			}
+		}
+		packet = m_peer->Receive();
+	}
+}
+
+int  ServerNetwork::insertNewSlot(SystemAddress address)
+{
+	for (int i=0;i< m_max_slots;i++)
+	{
+		if (m_slots[i] ==0)
+		{
+			m_slots[i] = new NetworkSlot(address,m_peer);
+			return i;
+		}
+	}
+	return -1;
+}
+
+int ServerNetwork::getSlotByAddress(SystemAddress adress)
+{
+	for (int i=0;i< m_max_slots;i++)
+	{
+		if (m_slots[i] != 0  && m_slots[i]->getSystemAddress() == adress)
+		{
+			return i;
+		}
+	}
+	return -1;
+}
+
+int ServerNetwork::numberSlotMessages( int slot )
+{
+	if (m_slots[slot] == 0)
+	{
+		return 0;
+	}
+	else
+	{
+		return m_slots[slot]->numberMessages();
+	}
+}
+
+
+void ServerNetwork::popSlotMessage( Packet* &data, int slot)
+{
+
+	if (m_slots[slot] ==0)
+	{
+		data =0;
+		return;
+	}
+
+	if (m_slots[slot]->numberMessages() ==0)
+	{
+		data =0;
+		return;
+	}
+
+	data = m_slots[slot]->popReceivedPacket();
+
+}
+
+void ServerNetwork::pushSlotMessage( RakNet::BitStream * bitStream,int slot, PacketPriority prio,PacketReliability reliability )
+{
+	if (m_slots[slot] ==0)
+		return;
+
+	m_peer->Send(bitStream,prio,reliability , 0,m_slots[slot]->getSystemAddress(), false);
+}
+
+int ServerNetwork::popNewLoginSlot()
+{
+	if (m_new_login_slots.empty())
+	{
+		return -1;
+	}
+	else
+	{
+		int tmp = m_new_login_slots.front();
+		m_new_login_slots.pop();
+		return tmp;
+	}
+}
+
+void ServerNetwork::pushNewLoginSlot(int slot)
+{
+	m_new_login_slots.push(slot);
+}
+
+NetStatus ServerNetwork::getSlotStatus( int slot )
+{
+	if (m_slots[slot] ==0)
+	{
+		return NET_CLOSE;
+	}
+	return m_slots[slot]->getStatus();
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/servernetwork.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,265 @@
+#ifdef SERVERNETWORK_H
+#else
+#define SERVERNETWORK_H
+
+#include "network.h"
+#include <queue>
+#include <map>
+
+// Debuggin
+#include "debug.h"
+using namespace std;
+
+
+/**
+ * \class NetworkSlot
+ * \brief Slot-Struktur mit Information fuer eine Verbindung
+ */
+class NetworkSlot
+{
+	public:
+		/**
+		 * \fn NetworkSlot(SystemAddress client_adress)
+		* \brief Standard-Konstructor
+		*
+		* Setzt sock auf einen ungueltigen Status, loest alle Locks und weist account einen
+		* Null-String zu
+		*/
+		NetworkSlot(SystemAddress client_adress,RakPeerInterface* peer);
+		
+		/**
+		 * \fn ~NetworkSlot()
+		 * \brief Destruktor
+		 */
+		~NetworkSlot();
+		
+		/**
+		 * \fn void pushReceivedPacket(Packet* packet)
+		 * \brief Fuegt ein empfangenes Paket in die Warteschlange fuer empfangene Pakete ein
+		 * \param packet empfangenes Paket
+		 */
+		void pushReceivedPacket(Packet* packet);
+		
+		/**
+		 * \fn Packet* popReceivedPacket()
+		 * \brief Entnimmt das erste noch nicht abgeholte Paket aus der Warteschlange. Gibt Null zurueck, wenn die Warteschlange leer ist
+		 */
+		Packet* popReceivedPacket();
+		
+		/**
+		 * \fn int numberMessages()
+		 * \brief Gibt die Anzahl der empfangenen, noch nicht abgeholten Pakete aus
+		 */
+		int numberMessages();
+		
+		/**
+		 * \fn SystemAddress getSystemAddress()
+		 * \brief Gibt die Adresse des mit diesem Slot verbundenen Client aus
+		 */
+		SystemAddress getSystemAddress()
+		{
+			return m_system_address;
+		}
+		
+		/**
+		 * \fn NetStatus getStatus()
+		 * \brief Gibt die Status des Slots aus
+		 */
+		NetStatus getStatus()
+		{
+			return m_status;
+		}
+		
+		/**
+		 * \fn void setStatus(NetStatus s)
+		 * \brief Setzt den Status des Slots.
+		 * \param s neuer Zustand
+		 */
+		void setStatus(NetStatus s)
+		{
+			m_status = s;
+		}
+		
+	private:
+		/**
+		* \var queue<Packet*> m_received_packets
+		 * \brief Liste der empfangenen Packete
+		 */
+		queue<Packet*> m_received_packets;
+		
+		/**
+		 * \var SystemAddress m_system_adress
+		 * \brief Adresse des Clients der zu diesem Slot gehoert
+		 */
+		SystemAddress m_system_address;
+		
+		/**
+		 * \var RakPeerInterface* m_peer
+		 * \brief Netzwerkschnittstelle von RakNet
+		 */
+		RakPeerInterface* m_peer;
+		
+		/**
+		 * \var NetStatus m_status
+		 * \brief Status des Slots
+		 */
+		NetStatus m_status;
+};
+
+/**
+ * \class ServerNetwork
+ * \brief Netzwerkschnittstelle auf Serverseite
+ */
+class ServerNetwork: public Network
+{
+	public:
+		/**
+		 * \fn ServerNetwork(int max_slots)
+		 * \brief Konstruktor
+		 * \param max_slots maximale Anzahl Clients die der Server akzeptiert
+		 */
+		ServerNetwork(int max_slots);
+		
+		/**
+		/* \fn ~ServerNetwork()
+		 * \brief Destruktor
+		 */
+		~ServerNetwork();
+
+		/**
+		* \fn NetStatus init( int auth_port )
+		* \brief Initialisiert den Server, oeffnet die Netzwerkschnittstelle
+		* \param auth_port gibt den Port an, auf dem sich Clients anmelden koennen
+		* \return Status der Methode
+		*
+		*/
+		virtual NetStatus init( int auth_port=REQ_PORT );
+
+
+		/**
+		* \fn NetStatus kill()
+		* \brief Schliesst den Server
+		*/
+		void kill();
+
+		/**
+		 * \fn NetStatus getSlotStatus( int slot=0 )
+		* \brief Liefert den Status eines Server-Slots
+		* \param slot Slotnummer des Servers
+		* \return Status des Slots
+		*
+		*/
+		NetStatus getSlotStatus( int slot=0 );
+
+		/**
+		* \fn NetStatus update()
+		* \brief Fuehrt fuer alle Server-Slots die Abarbeitung derer durch
+		* \return liefert immer NET_OK
+		*/
+		void update();
+
+
+		/**
+		 * \fn int numberSlotMessages()
+		 * \brief Anzahl der Packete im Empfangspuffer
+		 * \return Anzahl der Packete
+		 *
+		 * Ist der Slot ungeultig wird Null geliefert, sonst die Anzahl der Packete im Empfangspuffers
+	 	 */
+		virtual int numberSlotMessages(int slot=0);
+
+
+
+		/**
+		 * \fn void popSlotMessage(Packet* &data, int slot=0)
+		 * \brief Fuehrt net_pop_slot_message auf den Client-Slots
+		 * \param data Puffer fuer die zu kopierenden Daten
+		 * \param size Groesse des Datenblocks
+		 * \return Status der Methode
+		 *
+		 */
+		void popSlotMessage( Packet* &data, int slot=0) ;
+
+		/**
+		 * \fn void pushSlotMessage( RakNet::BitStream * data,int slot=0, PacketPriority prio= HIGH_PRIORITY,PacketReliability reliability = RELIABLE )
+		 * \brief Fuehrt net_push_slot_message auf einen Server-Slots aus
+		 * \param data Puffer fuer die zu kopierenden Daten
+		 * \param slot Slot des Empfaengers
+		 * \return Status der Methode
+		 *
+		 */
+		void pushSlotMessage( RakNet::BitStream * data, int slot=0, PacketPriority prio= HIGH_PRIORITY,PacketReliability reliability = RELIABLE) ;
+
+		/**
+		 * \fn int popNewLoginSlot();
+		* \brief Prueft ob in login Logindaten vorliegen, sonst gibt die Funktion false zurueck
+		* \param login Enthaelt die Login Informationen
+		* \return 
+		*/
+		int popNewLoginSlot();
+
+		
+
+
+	private:
+		
+		/**
+		 * \fn void pushNewLoginSlot(int slot)
+		 * \brief Fuegt einen Slot der Liste der Slots in denen neu angemeldete Clienten warten hinzu
+		 */
+		void pushNewLoginSlot(int slot);
+		
+		/**
+		 * \fn unsigned char getPacketIdentifier(Packet *p)
+		 * \brief Extrahiert aus einem Paket die Identifikationsnummer
+		 */
+		unsigned char getPacketIdentifier(Packet *p);
+		
+		/**
+		 * \fn int insertNewSlot(SystemAddress addr)
+		 * \brief Fuegt einen neuen Client hinzu
+		 * \param addr Netzwerkadresse des Client
+		 */
+		int insertNewSlot(SystemAddress addr);
+		
+		/**
+		 * \fn int getSlotByAddress(SystemAddress address)
+		 * \brief ermittelt auf der Netzwerkadresse einen Client den Slot auf dem er angemeldet ist
+		 * \param address Netzwerkadresse des Client
+		 */
+		int getSlotByAddress(SystemAddress address);
+		
+		/**
+		* \var m_active
+		* \brief Ist der Server gerade in Betrieb
+		*/
+		bool m_active;
+
+		/**
+		* \var m_slots
+		* \brief Die verfuegbaren Slots des Servers
+		*/
+		NetworkSlot** m_slots;
+
+		/**
+		 * \var int m_max_slots
+		 * \brief maximale Anzahl Clients die sich anmelden koennen
+		 */
+        int m_max_slots;
+
+		
+		
+		
+		/**
+		/* \var queue<int> m_new_login_slots
+		 * \brief Warteliste der Clienten die sich schon angemeldet haben, aber noch nicht in die Welt eingefuegt worden sind
+		 */
+		queue<int> m_new_login_slots;
+
+
+
+};
+
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/serverwobject.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,70 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf
+
+	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.
+*/
+
+#include "serverwobject.h"
+
+//Constructors/Destructors
+ServerWObject::ServerWObject(World* world, int id) : WorldObject(id)
+{
+	bool tmp=init();
+	if (tmp!=true)
+	{
+	DEBUG("Initialisierung des ServerWObjects fehlgeschlagen");
+	}
+	m_world=world;
+
+}
+
+//Methods
+ bool  ServerWObject::init ()
+{
+	m_destroyed=false;
+	return true;
+}
+
+
+bool ServerWObject::moveTo(float x, float y)
+{
+	if (m_world==0)
+	{
+		WorldObject::Geometry* geom = getGeometry();
+		geom->m_shape.m_coordinate_x=x;
+		geom->m_shape.m_coordinate_y=y;
+		return true;
+	}
+	else
+	{
+		return m_world->moveSWObject(this, x,y);
+	}
+}
+
+Region* ServerWObject::getRegion()
+{
+	return m_world->getRegion(m_grid_location.m_region);
+}
+
+bool  ServerWObject::destroy()
+{
+	DEBUG("destroy");
+	return true;
+}
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/serverwobject.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,240 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf
+
+	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.
+*/
+
+#ifndef SERVERWOBJECT_H
+#define SERVERWOBJECT_H
+
+#include <string>
+#include "worldobject.h"
+#include "damage.h"
+
+class World;
+class Region;
+
+/**
+ * \file serverwobject.h
+ * \defgroup serverwobject \Weltobjekt
+ * \ingroup world
+ * \brief Deklaration des ServerWObject
+ * \author Hans Wulf
+ * \version 1.0
+ * \date 2007/05/28
+ * \note Bietet der Welt das ServerWObject an
+ */
+
+
+/**
+ * \struct GridLocation
+ * \brief Informationen zur Position eines Objektes in der Grid-Datenstruktur der Welt
+ */
+struct GridLocation
+{
+	
+	/**
+	 * \var m_region
+	 * \brief Region in der sich das Objekt befindet
+	 */
+	short m_region;
+	
+	/**
+	 * \var m_grid_x
+	 * \brief Index des Objektes im Grid in x-Richtung
+	 */
+	int m_grid_x;
+	
+	/**
+	 * \var m_grid_y
+	 * \brief Index des Objektes im Grid in y-Richtung
+	 */
+	int m_grid_y;
+};
+
+
+/**
+ * \class ServerWObject
+ * \brief ein Objekt, welches sich in der Spielwelt befindet
+ */
+class ServerWObject : public WorldObject
+{
+//Public stuff
+public:
+	
+		
+	//Fields
+	//Constructors
+	/**
+ 	 * \fn ServerWObject(World* world, unsigned int id)
+	 * \brief Konstruktor
+	 * \param world World Objekt, in dem sich das neue ServerWObject befindet
+	 * \param id ID des WorlObject
+	 *
+	 * Erstellt ein neues ServerWObject
+	 */
+	ServerWObject(World* world, int id);
+	
+
+	//Accessor Methods
+	/**
+	 * \fn getWorld()
+	 * \brief Gibt einen Zeiger auf die Welt zurueck
+	 * \return Zeiger auf die Welt
+	 */
+	World* getWorld()
+	{
+		return m_world;
+	}
+	
+	/**
+	 * \fn Region* getRegion()
+	 * \brief Gibt die Region aus, in der sich das Objekt befindet
+	 */
+	Region* getRegion();
+	
+	/**
+	 * \fn GridLocation* getGridLocation()
+	 * \brief Gibt den Ort des Objektes im Grid aus
+	 * \return Ort des Objektes im Grid
+	 */
+	GridLocation* getGridLocation()
+	{
+		return &m_grid_location;
+	}
+	
+	/**
+	 * \fn MoveInfo* getMoveInfo()
+	 * \brief Gibt Zeiger auf aktuellen Bewegungszustand zurueck
+	 * \return aktueller Bewegungszustand
+	 */
+	MoveInfo* getMoveInfo()
+	{
+		return &m_move_info;
+	}
+	
+	//Operations
+	/**
+	 * \fn virtual bool init ()
+	 * \brief Initialisiert das ServerWObject. Die Funktion ist virtuell und wird durch die abgeleiteten Klassen &uuml;berschrieben.
+	 * \return bool, der angibt ob die initialisierung erfolgreich war
+	 */
+	virtual  bool  init ();
+	
+	
+	/**
+	 * \fn virtual bool update ( float time)
+	 * \brief Aktualisiert das ServerWObject, nachdem eine bestimmte Zeit vergangen ist. Alle Aktionen des Objekts werden auf diesem Weg ausgel&ouml;st. Die Funktion ist virtuell und wird von den abgeleiteten Klassen &uuml;berschrieben
+	 * \param time Menge der vergangenen Zeit in Millisekunden
+	 * \return bool, der angibt, ob die Aktualisierung fehlerfrei verlaufen ist
+	 */
+	virtual  bool  update ( float time) 
+	{
+		return true;
+	}
+	
+	
+	/**
+	 * \fn virtual bool destroy()
+	 * \brief Zerst&ouml;rt das ServerWObject.  Die Funktion ist virtuell und wird von den abgeleiteten Klassen &uuml;berschrieben
+	 * \return bool der angibt, ob die Zerst&ouml;rung erfolgreich war
+	 */
+	virtual  bool  destroy ();
+	
+	/**
+	 * \fn bool getDestroyed()
+	 * \brief Gibt zurueck ob das Objekt zerstoert ist
+	 */
+	bool getDestroyed()
+	{
+		return m_destroyed;
+	}
+	
+	/**
+	 * \fn void setDestroyed(bool d)
+	 * \brief Setzt den Status zerstoert
+	 * \param d neuer Status
+	 */
+	void setDestroyed(bool d)
+	{
+		m_destroyed =d;
+	}
+	
+	/**
+	 * \fn virtual bool reactOnUse (int id)
+	 * \brief Diese Funktion behandelt die Reaktion eines Worldobject, wenn auf es eine Aktion ausgef&uuml;hrt wird.
+	 * \param id Id des Spielers, der die Aktion ausf&uuml;hrt
+	 * \return bool, der angibt, ob die Behandlung der Aktion erfolgreich war
+	 */
+	virtual  bool  reactOnUse (int id)
+	{
+		return true;
+	}
+	
+	
+	/**
+	 * \fn void moveTo(float x, float y)
+	 * \brief setzt die x- und die y-Koordinate
+	 * \param x x-Koordinate
+	 * \param y y-Koordinate
+	 * 
+	 * Diese Funktion verschiebt das Objekt an einen anderen Ort. Wenn das Objekt in einem Quadtree eingeordnet ist, so muss bei jeder &Auml;nderung der Koordinaten getestet werden, ob das Objekt im Quadtree neu angeordnet werden muss. Diese Funktion teilt dem Quadtree die &Auml;nderung der Koordinanten mit und l&ouml;st damit ebentuell eine Reorganisation aus. Daher sollte ausserhalb des Quadtree diese Funktion zum ver&auml;ndern der Koordinaten verwendet werden.
+	 */
+	bool moveTo(float x, float y);
+	
+	/**
+	 * \fn void takeDamage(Damage* damage)
+	 * \brief Das Objekt nimmt Schaden in der in damage angegebenen Art und Hoehe.
+	 * \param damage Schadensart und -hoehe
+	 */
+	virtual void takeDamage(Damage* damage)
+	{
+	}
+
+	
+
+//Private stuff
+private:
+	
+	
+	/**
+ 	* \var GridLocation m_grid_location
+	 * \brief Ort des Objektes in der internen Struktur
+	 */
+	
+	 GridLocation m_grid_location;
+	 /**
+	  * \var m_move_info
+	  * \brief Information ueber den Bewegungszustand
+	  **/
+	 MoveInfo m_move_info;
+	
+	/**
+ 	* \var m_destroyed
+ 	* \brief Information, ob das Objekt zerst&ouml;rt ist
+	 */
+	bool m_destroyed;
+	
+	/**
+	 * \var m_world
+	 * \brief Zeiger auf das World Objekt, in dem das aktuelle Objekt eingeordnet ist
+	 */
+	World* m_world;
+};
+
+#include "world.h"
+
+#endif //SERVERWOBJECT_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/spawnpoint.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,81 @@
+#include "spawnpoint.h"
+
+Spawnpoint::Spawnpoint(World* world, int id) : ServerWObject(world, id)
+{
+	bool tmp=Spawnpoint::init();
+	
+}
+
+
+//Methods
+bool Spawnpoint::init()
+{
+	//eigene Initialisierung
+	getTypeInfo()->m_type = TypeInfo::TYPE_FIXED_OBJECT;
+	getTypeInfo()->m_subtype = "spawnpoint";
+	getGeometry()->m_layer = Geometry::LAYER_SPECIAL;
+	
+	setState(STATE_ACTIVE);
+	
+	m_time =0;
+	
+
+	return true;
+}
+
+void Spawnpoint::addMonsterGroup(SpawnedMonsterGroup& mgroup)
+{
+	m_spawned_groups.push_back(mgroup);
+}
+
+void Spawnpoint::setRespawnTime(float t)
+{	
+	m_respawn_time = t;
+}
+
+bool Spawnpoint::update (float time)
+{
+	m_time -= time;
+	int i;
+	ServerWObject* wo;
+	float x,y;
+	bool ret;
+	if (m_time <= 0)
+	{
+		// Zeit abgelaufen: Monster generieren
+		
+		// Schleife ueber die Monstergruppen
+		list<SpawnedMonsterGroup>::iterator it;
+		for (it = m_spawned_groups.begin(); it !=  m_spawned_groups.end(); it++)
+		{
+			// Schleife ueber die Monster
+			for (i=0;i<it->m_number;i++)
+			{
+				if (Random::random()<it->m_prob)
+				{
+					DEBUG5("spawning %i monster of type %s at prob %f",it->m_number,it->m_subtype.c_str(),it->m_prob);
+			
+					// Monster erzeugen
+					wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, it->m_subtype);
+					x= getGeometry()->m_shape.m_coordinate_x;
+					y= getGeometry()->m_shape.m_coordinate_y;
+					
+					// freien Platz suchen
+					ret = getRegion()->getFreePlace(&(wo->getGeometry()->m_shape),wo->getGeometry()->m_layer , x, y);
+					if (ret == false)
+					{
+						ERRORMSG("keinen Platz gefunden um das Monster %s zu platzieren",wo->getNameId().c_str());
+						delete wo;
+					}
+					else
+					{
+						getWorld()->insertSWObject(wo, x,y,getGridLocation()->m_region);
+					}
+				}
+			}
+		}
+		
+		m_time += m_respawn_time;
+	}
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/spawnpoint.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,125 @@
+#ifndef SPAWNPOINT_H
+#define SPAWNPOINT_H
+#include <string>
+
+#include "serverwobject.h"
+#include "random.h"
+#include "objectfactory.h"
+#include <list>
+
+/**
+ * \class Spawnpoint
+ * \brief Dieses Objekt stellt einen Ort dar, an dem Monster die Welt betreten
+ */
+class Spawnpoint : public ServerWObject {
+/**
+	 * Public stuff
+ */
+	public:
+	
+	/**
+	 * \struct SpawnedMonsterGroup
+	 * \brief Struktur fuer eine Gruppe von Monstern gleichen Typs die vom Spawnpoint erzeugt werden kann
+	 */
+	struct SpawnedMonsterGroup
+	{
+		/**
+		 * \fn SpawnedMonsterGroup(TypeInfo::ObjectSubtype s, float p, int n)
+		 * \brief Konstruktor
+		 * \param s Subtyp der zu erzeugenden Monster
+		 * \param p Wahrscheinlichkeit pro Monster, dass es erzeugt wird
+		 * \param n Anzahl der maximal erzeugten Monster
+		 */
+		SpawnedMonsterGroup(TypeInfo::ObjectSubtype s, float p, int n)
+		{
+			m_subtype =s;
+			m_prob = p;
+			m_number = n;
+		}
+		
+		
+		/**
+		 * \var TypeInfo::ObjectSubtype m_subtype
+		 * \brief Subtype der erzeugten Monster
+		 */
+		TypeInfo::ObjectSubtype m_subtype;
+		
+		/**
+		 * \var float m_prob
+		 * \brief Wahrscheinlichkeit mit der ein Monster erzeugt wird
+		 */
+		float m_prob;
+		
+		/**
+		 * \var int m_number
+		 * \brief Anzahl der Monster die maximal erzeugt werden. Jedes Monster wird gemaess der Wahrscheinlichkeit prob erzeugt. Im Erwartungswert also prob * number Monster
+		 */
+		int m_number;
+		
+		/**
+		 * \fn void operator=(SpawnedMonsterGroup & other)
+		 * \brief Zuweisungsoperator
+		 */
+		void operator=(SpawnedMonsterGroup & other)
+		{
+			m_subtype = other.m_subtype;
+			m_prob = other.m_prob;
+			m_number = other.m_number;
+		}
+	};
+	
+	/**
+	 * \fn Spawnpoint(World* world, unsigned int id)
+	 * \brief Konstruktor
+	 */
+	Spawnpoint(World* world, int id);
+	
+	/**
+	 * \fn virtual bool init()
+	 * \brief Initialisierung von internen Daten
+	 * \return bool Gibt an, ob die Initialisierung erfolgreich war
+	 */
+	virtual bool init ();
+	
+	/**
+	 * \fn virtual bool  update (float time)
+	 * \brief aktualisiert das Objekt nachdem time Millisekunden vergangen sind
+	 * \param time vergangene Zeit in Millisekunden
+	 */
+	virtual bool  update (float time);
+	
+	/**
+	 * \fn void addMonsterGroup(SpawnedMonsterGroup& mgroup)
+	 * \brief Fuegt zum Spawnpunkt eine Monstergruppe hinzu
+	 */
+	void addMonsterGroup(SpawnedMonsterGroup& mgroup);
+	
+	/**
+	 * \fn void setRespawnTime(float t)
+	 * \brief Setzt die Zeit bis zum Neuerscheinen der Monster
+	 */
+	void setRespawnTime(float t);
+
+
+	private:
+		/**
+	 * \var list<SpawnedMonsterGroup> m_spawned_groups
+		 * \brief Liste der verschiedenen Monstergruppen die der Spawnpoint erzeugen kann
+		 */
+		list<SpawnedMonsterGroup> m_spawned_groups;
+		
+		/**
+		 * \var float m_time
+		 * \brief interner Timer, nach Ablaufen werden die Monster neu erzeugt
+		 */
+		float m_time;
+		
+		/**
+		 * \var float m_respawn_time
+		 * \brief Zeitdauer bis zum neu Spawnen der Monster
+		 */
+		float m_respawn_time;
+	
+};
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/tiles.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,20 @@
+#ifndef TILES_H
+#define TILES_H
+
+/**
+ * \enum Tile
+ * \brief Aufzaehlung von verschiedenen Untergrundarten
+ */
+enum Tile
+{
+	TILE_NOTHING= 0,
+	TILE_GRASS =1,
+	TILE_CAVE = 10,
+	TILE_WATER = 20,
+	TILE_DIRT = 30,
+};
+
+#endif
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/timer.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,49 @@
+#ifndef TIMER_H
+#define TIMER_H
+
+#include <sys/time.h>
+
+/**
+ * \class Timer
+ * \brief Klasse zum Zeit messen
+ */
+class Timer
+{
+	
+	public:
+		
+	/**
+	 * \fn void start()
+	 * \brief Startet den Timer
+	 */
+	void start()
+	{
+		gettimeofday(&m_tv, NULL);
+	}
+		
+	/**
+	 * \fn float getTime()
+	 * \brief Gibt vergangene Zeit in ms aus
+	 */
+	float getTime()
+	{
+		timeval tv2;
+		gettimeofday(&tv2, NULL);
+		
+		return (tv2.tv_sec-m_tv.tv_sec)*1000.0 + (tv2.tv_usec-m_tv.tv_usec)*0.001;
+   
+	}
+	
+	private:
+	/**
+	 * \var timeval m_tv
+	 * \brief Speichert die Zeit zum Zeitpunkt des letzten Aufrufes von Start
+	 */
+	timeval m_tv;
+	 
+	 
+};
+
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/trade.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,365 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf
+
+	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.
+*/
+
+#include "trade.h"
+
+//Constructors/Destructors
+ Trade::Trade(int id, int trader1_id, int trader2_id) {
+ 	
+	/*m_id=id;
+	m_player_id[0]=trader1_id;
+	m_player_id[1]=trader2_id;
+	m_finished=false;
+	m_successful=false;
+	
+	m_inventory[0]=new ItemList;
+	m_inventory[1]=new ItemList;	
+		
+	m_accept[0]=false;
+	m_accept[1]=false;
+		
+	m_got_items[0]=false;
+	m_got_items[1]=false;	
+	*/
+	
+ }
+ 
+ Trade::~Trade()
+ {
+	 delete m_inventory[0];
+	 delete m_inventory[1];	 
+ }
+
+//Methods
+int Trade::getPlayerIndex(int id) {
+	if (id == m_player_id[0])
+		return 0;
+	
+	if (id == m_player_id[1])
+		return 1;
+	
+	return -1;
+
+}
+
+int Trade::getPlayerId(int index){
+	return m_player_id[index];
+}
+
+void Trade::setPlayerId(int value, int index) {
+	m_player_id[index]=value;
+}
+
+int Trade::getPlayerType(int index){
+	return m_player_type[index];
+}
+
+void Trade::setPlayerType(int value, int index) {
+	m_player_type[index]=value;
+}
+
+ItemList* Trade::getInventory(int index) {
+	return m_inventory[index];
+}
+
+void  Trade::setInventory(ItemList* item_list, int index) {
+	m_inventory[index]=item_list;
+}
+
+
+void  Trade::setId(int id)
+{
+	m_id = id;
+}
+
+int  Trade::getId()
+{
+	return m_id;
+}
+
+bool Trade::getAccept(int index){
+	return m_accept[index];
+}
+
+void Trade::setAccept(bool value, int index) {
+	m_accept[index]=value;
+	
+	// Wenn ein Spieler aktzeptiert hat: testen ob der handel ausgeführt werden kann
+	if (value==true)
+	{
+		acceptTrade();
+	}
+}
+
+bool Trade::getGotItems(int index){
+	return m_got_items[index];
+}
+
+void Trade::setGotItems(bool value, int index) {
+	m_got_items[index]=value;
+}
+
+bool Trade::getFinished()
+{
+	return m_finished;
+}
+
+bool Trade::getSuccessful()
+{
+	return m_successful;
+}
+
+void Trade::acceptTrade() {
+	
+	// Testen ob beide Partner die erhandelten Gegenstände tragen können
+	// wenn nicht, betreffenden Spieler auf nicht akzeptierend setzen
+	
+	/*
+	Item* item;
+	if (m_accept[0]==true)
+		DEBUG4("Spieler 1 akzeptiert\n");
+	if (m_accept[1]==true)
+		DEBUG4("Spieler 2 akzeptiert\n");
+	
+	DEBUG4("Trade::accept()\n");
+	
+	
+	// Testen ob beide Partner dem Handel zugestimmt haben, wenn nicht abbrechen
+	if (m_accept[0]==false || m_accept[1]==false)
+	{
+		return;
+	}
+	
+	
+	// Handel erfolgreich
+	
+	
+	m_successful=true;
+	m_finished = true;
+	*/
+	
+}
+
+void Trade::abortTrade() {
+	
+	// Handel abbrechen
+	
+	// nicht erfolgreich, Handel beendet
+
+	DEBUG4("Handel abbrechen");
+	
+	m_successful=false;
+	m_finished=true;
+	
+	// Da keiner Items bekommt kann Itemaustausch als fertig betrachtet werden
+	m_got_items[0]=true;
+	m_got_items[1]=true;
+}
+
+
+void Trade::onTrade(int index, ClientCommand* trade_command) {
+	
+	if (index!=0 && index!=1)
+		return;
+				
+	/*	
+	// Wenn Nutzer auf Handel abbrechen geklickt hat
+	if (trade_command->m_button == BUTTON_TRADE_ABORT)
+	{
+		// Handel abbrechen
+		abortTrade();
+	}
+	
+	// Wenn Nutzer auf Handel akzeptieren geklickt hat
+	if (trade_command->m_button == BUTTON_TRADE_ACCEPT)
+	{
+		// Handel für diesen Nutzer akzeptieren
+		m_accept[index]=true;
+		
+		// Testen ob Handel komplett abgeschlossen werden kann
+		acceptTrade();
+	}
+	
+	Item* item;
+	
+	// Nutzer Verschiebt alle Items zwischen zwei Positionen
+	if (trade_command->m_button == BUTTON_TRADE_ITEM_MOVE_ALL)
+	{
+		// Nach ändern der Handelssituation beide Partner auf nicht akzeptierend setzen
+		m_accept[0]=false;
+		m_accept[1]=false;
+		map< int, Item >::iterator iter;
+		map< int, Item >* itemmap = m_inventory[0]->getItems();
+		// Verschieben vom eigenen Inventar zum Angebot
+		if (trade_command->m_direction== INVENTORY_TO_OFFER)
+		{
+			DEBUG("Move all INVENTORY_TO_OFFER");
+			if (trade_command->m_direction== INVENTORY_TO_OFFER)
+			{
+				itemmap = m_inventory[index]->getItems();
+				for (iter = itemmap->begin(); iter != itemmap->end(); iter++)
+				{
+					item = &(iter->second);
+					m_offer[index]->addItem(item);
+					m_inventory[index]->removeItem(item);
+				}
+			}
+		}
+		
+		// Verschieben vom eigenen Angebot zum Inventar
+		if (trade_command->m_direction== OFFER_TO_INVENTORY)
+		{
+			DEBUG("Move all OFFER_TO_INVENTORY");
+			if (trade_command->m_direction== OFFER_TO_INVENTORY)
+			{
+				itemmap = m_offer[index]->getItems();
+				for (iter = itemmap->begin(); iter != itemmap->end(); iter++)
+				{
+					item = &(iter->second);
+					m_inventory[index]->addItem(item);
+					m_offer[index]->removeItem(item);
+				}
+			}
+		}
+		
+		// Verschieben vom fremden Inventar zum Angebot
+		if (trade_command->m_direction == TRADER_INVENTORY_TO_OFFER && m_player_type[1-index]!=OBJECTTYPE_USER)
+		{
+			DEBUG("Move all TRADER_INVENTORY_TO_OFFER");
+			if (trade_command->m_direction == TRADER_INVENTORY_TO_OFFER && m_player_type[1-index]!=OBJECTTYPE_USER)
+			{
+				itemmap = m_inventory[1-index]->getItems();
+				for (iter = itemmap->begin(); iter != itemmap->end(); iter++)
+				{
+					item = &(iter->second);
+					m_offer[1-index]->addItem(item);
+					m_inventory[1-index]->removeItem(item);
+				}
+			}
+		}
+		
+		// Verschieben vom efremden Angebot ins Inventar
+		if (trade_command->m_direction== TRADER_OFFER_TO_INVENTORY && m_player_type[1-index]!=OBJECTTYPE_USER)
+		{
+			DEBUG("Move all TRADER_OFFER_TO_INVENTORY");
+			if (trade_command->m_direction== TRADER_OFFER_TO_INVENTORY && m_player_type[1-index]!=OBJECTTYPE_USER)
+			{
+				itemmap = m_offer[1-index]->getItems();
+				for (iter = itemmap->begin(); iter != itemmap->end(); iter++)
+				{
+					item = &(iter->second);
+					m_inventory[1-index]->addItem(item);
+					m_offer[1-index]->removeItem(item);
+				}
+			}
+		}
+		
+	}
+	
+	// Wenn Nutzer Item innerhalb des Handels verschiebt
+	if (trade_command->m_button == BUTTON_TRADE_ITEM_MOVE)
+	{
+		// Nach ändern der Handelssituation beide Partner auf nicht akzeptierend setzen
+		m_accept[0]=false;
+		m_accept[1]=false;
+				
+		// Abbild des zu verschiebenden Items anlegen
+		//item = new Item(trade_command->m_id, trade_command->m_number);
+		
+		
+		// Verschieben vom eigenen Inventar zum Angebot
+		if (trade_command->m_direction== INVENTORY_TO_OFFER)
+		{
+			item = m_inventory[index]->getItem(trade_command->m_id);
+			if (item !=0)
+			{
+				if (item->getNumber()>=trade_command->m_number)
+				{
+					item->setNumber(trade_command->m_number);
+					m_inventory[index]->removeItem(item);
+					m_offer[index]->addItem(item);
+				}
+			}
+			else
+			{
+				delete item;
+			}
+		}
+		
+		// Verschieben vom eigenen Inventar zum Angebot
+		if (trade_command->m_direction== OFFER_TO_INVENTORY)
+		{
+			item = m_offer[index]->getItem(trade_command->m_id);
+			if (item !=0)
+			{
+				if (item->getNumber()>=trade_command->m_number)
+				{
+					item->setNumber(trade_command->m_number);
+					m_offer[index]->removeItem(item);
+					m_inventory[index]->addItem(item);
+				}
+			}
+			else
+			{
+				delete item;
+			}
+		}
+		
+		
+		// Verschieben vom fremden Inventar zum Angebot
+		if (trade_command->m_direction == TRADER_INVENTORY_TO_OFFER && m_player_type[1-index]!=OBJECTTYPE_USER)
+		{
+			item = m_inventory[1-index]->getItem(trade_command->m_id);
+			if (item !=0)
+			{
+				if (item->getNumber()>=trade_command->m_number)
+				{
+					item->setNumber(trade_command->m_number);
+					m_inventory[1-index]->removeItem(item);
+					m_offer[1-index]->addItem(item);
+				}
+			}
+			else
+			{
+				delete item;
+			}
+		}
+		
+		// Verschieben vom efremden Angebot ins Inventar
+		if (trade_command->m_direction== TRADER_OFFER_TO_INVENTORY && m_player_type[1-index]!=OBJECTTYPE_USER)
+		{
+			item = m_offer[1-index]->getItem(trade_command->m_id);
+			if (item !=0)
+			{
+				if (item->getNumber()>=trade_command->m_number)
+				{
+					item->setNumber(trade_command->m_number);
+					m_offer[1-index]->removeItem(item);
+					m_inventory[1-index]->addItem(item);
+				}
+			}
+			else
+			{
+				delete item;
+			}
+		}
+		
+	}
+	*/
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/trade.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,292 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf
+
+	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.
+*/
+
+/**
+ * \file trade.h
+ * \defgroup Trade \Handel
+ * \brief Objekt, das einen Handelsvorgang verwaltet.
+ * \author Hans Wulf
+ * \version 1.0
+ * \date 2007/05/28
+ * \note Beinhaltet die Klasse Trade
+ */
+
+#ifndef TRADE_H
+#define TRADE_H
+
+#include "itemlist.h"
+#include "item.h"
+#include "networkstruct.h"
+
+/**
+ * \class Trade
+ * \brief Verwaltet das Verhalten des Handelsmodus gegen&uuml;ber allen Spielerobjekten. Ein Objekt dieser Klasse repr&auml;sentiert einen Handel zwischen zwei Handelspartnern.
+ */
+
+class Trade {
+public:
+	//Fields
+	//Constructors
+	/**
+	 * \fn Trade(int id, int trader1_id, int trader2_id)
+	 * \brief Konstruktor
+	 * \param id ID des Handels
+	 * \param trader1_id ID des ersten Handelspartners
+	 * \param trader2_id ID des zweiten Handelsparters
+	 * 
+	 * Legt ein ein neues Trade Objekt an, welches einen Handel zwischen den zwei angegebenen Spielern verwaltet
+	 */
+	Trade(int id, int trader1_id, int trader2_id);
+	/**
+	 *\fn ~Trade
+	 *\brief Destruktor
+	 * Löscht das Trade Objekt und gibt allokierten Speicher frei
+	 */
+	 ~Trade();
+	//Accessor Methods
+	/**
+	 * \fn int getPlayerIndex(int id)
+	 * \brief Die Klasse Trade verf&uuml;gt &uuml;ber zwei Positionen f&uuml;r die Handelspartner. Die Funktion liefert den Index zur&uuml;ck, auf welcher der beiden Positionen sich der Spieler mit der angegebenen id befindet. Das Ergebnis ist entweder 0 oder 1, wenn die Anfrage  erfolgreich war, wenn ein Fehler auftritt so ist das Ergebnis -1. F&uuml;r alle Set und Get Funktionen muss der Index mit angegeben werden.
+	 * \param id Spielerid
+	 * \return int interner Index des Spielers
+	 */
+	int getPlayerIndex(int id);
+	
+	
+	/**
+	 * \fn getPlayerId(int index)
+	 * \brief Gibt ID des Spielers zur&uuml;ck
+	 * \param index Index des Spielers
+	 * \return int, ID des Spielers
+	 *
+	 * Die Funktion liefert die Id des handelnden Spielers auf der Position index zur&uuml;ck. Der Index muss 0 oder 1 sein.
+	 */
+	int getPlayerId(int index);
+	
+	
+	/**
+	 * \fn void setPlayerId(int id, int index)
+	 * \brief Setzt die ID des Spieler
+	 * \param index Index des Spielers
+	 * \param id ID des Spielers
+	 *
+	 * Die Funktion setzt Id des handelnden Spielers auf der Position index. Der Index muss 0 oder 1 sein.
+	 */
+	void  setPlayerId(int id, int index);
+	
+	
+	/**
+	 * \fn getId();
+	 * \brief Gibt die ID des Handels zur&uuml;ck
+	 * \return ID des Handels
+	 *
+	 * Die Funktion liefert die ID des Handels zur&uuml;ck.
+	 */
+	int getId();
+	
+	
+	/**
+	 * \fn setId(int id)
+	 * \brief Setzt die ID des Handels
+	 * \param id ID des Handels
+	 *
+	 * Die Funktion setzt die ID des Handels.
+	 */
+	void  setId(int id);
+	
+	
+	/**
+	 * \fn getPlayerType(int index)
+	 * \brief Gibt den Typ des Spielers zur&uuml;ck
+	 * \param index Typ des Spielers
+	 * \return int, kodiert den Typ des Spielers
+	 *
+	 * Die Funktion liefert den Typ des handelnden Spielers auf der Position index zur&uuml;ck. Der Index muss 0 oder 1 sein.
+	 */
+	int getPlayerType(int index);
+	
+	
+	/**
+	 * \fn void setPlayerType(int type, int index)
+	 * \brief Setzt die ID des Spieler
+	 * \param type Typ des Spielers
+	 * \param index ID des Spielers
+	 *
+	 * Die Funktion setzt den Typ des handelnden Spielers auf der Position index. Der Index muss 0 oder 1 sein.
+	 */
+	void  setPlayerType(int type, int index);
+	
+
+	/**
+	 * \fn ItemList* getInventory(int index)
+	 * \brief Gibt Inventar des Spielers zur&uuml;ck
+	 * \param index Index des Spielers
+	 * \return Itemlist*, Inventarliste des Spielers
+	 *
+	 * Die Funktion liefert die Inventarliste des handelnden Spielers auf der Position index zur&uuml;ck. Der Index muss 0 oder 1 sein.
+	 */
+	ItemList* getInventory(int index);
+	
+	/**
+	 * \fn void setInventory(ItemList* item_list, int index)
+	 * \brief Setzt Inventar des Spielers
+	 * \param index Index des Spielers
+	 * \param item_list Inventarliste des Spielers
+	 *
+	 * Die Funktion setzt die Inventarliste des handelnden Spielers auf der Position index. Der Index muss 0 oder 1 sein.
+	 */
+	void  setInventory(ItemList* item_list, int index);
+	
+	/**
+	 * \fn bool getAccept(int index)
+	 * \brief Gibt Information &uuml;ber den Akzeptanzstatus des Spielers zur&uuml;ck
+	 * \param index Index des Spielers
+	 * \return bool Information ob der Spieler den Handel anzeptiert hat
+	 *
+	 * Die Funktion liefert true zur&uuml;ck, wenn der Spieler auf der Position index den Handel akzeptiert hat, sonst false. Der Index muss 0 oder 1 sein.
+	 */
+	bool getAccept(int index);
+	
+	/**
+	 * \fn void setAccept(bool accept, int index)
+	 * \brief Setzt den Akzeptanzstatus des Spielers
+	 * \param accept Information, ob der Handel akzeptiert werden soll
+	 * \param index Index des Spielers
+	 *
+	 * Die Funktion setzt die Information, ob der Spieler auf der Position index den Handel akzeptiert hat. Der Index muss 0 oder 1 sein.
+	 */
+	void  setAccept(bool accept, int index);
+	
+	
+	/**
+	 * \fn bool getGotItems(int index)
+	 * \brief Gibt an, ob der Spieler an Position index die erhandelten Gegenstaende schon erhalten hat
+	 * \param index Index des Spielers
+	 * \return bool Information ob der Spieler an Position index die erhandelten Gegenstaende schon erhalten hat
+	 *
+	 * Die Funktion liefert true zur&uuml;ck, wenn der Spieler auf der Position index bereits die erhandelten Gegenstaende erhalten hat, sonst false. Der Index muss 0 oder 1 sein.
+	 */
+	bool getGotItems(int index);
+	
+	
+	/**
+	 * \fn void setGotItems(bool got_items, int index)
+	 * \brief Setzt die Information, ob der Spieler die erhandelten Gegenstaende schon erhalten hat
+	 * \param got_items Information, ob der Spieler die erhandelten Gegenstaende schon erhalten hat
+	 * \param index Index des Spielers
+	 *
+	 * Die Funktion setzt die Information, ob der Spieler auf der Position index die erhandelten Gegenstaende schon erhalten hat. Der Index muss 0 oder 1 sein.
+	 */
+	void  setGotItems(bool got_items, int index);
+	
+	
+	/**
+	 * \fn bool getFinished()
+	 * \brief gibt an, ob der Handel beendet ist
+	 * \return Information, ob der Handel beendet ist
+	 * 
+	 * Die Funktion gibt true aus, wenn der Handel abgeschlossen ist, sonst false
+	 */
+	bool getFinished();
+	
+	/**
+	 * \fn bool getSuccessful()
+	 * \brief gibt an, ob der Handel erfolgreich war
+	 * \return Information, ob der Handel erfolgreich war
+	 * 
+	 * Die Funktion gibt true aus, wenn der Handel abgeschlossen ist und erfolgreich war, sonst false
+	 */
+	bool getSuccessful();
+	
+	//Operations
+	/**
+	 * \fn void acceptTrade()
+	 * \brief Pr&uuml;ft ob beide Parteien einverstanden sind und schliesst den Handel ab
+	 *
+	 * Die Funktion pr&uuml;ft ob beide Parteien dem Handel zugestimmt haben und der Handel vollzogen werden kann. Wenn das der Fall ist, so werden die Gegenst&auml;nde ausgetauscht und der Handel ist abgeschlossen.
+	 */
+	void acceptTrade();
+	
+	
+	/**
+	 * \fn void abortTrade()
+	 * \brief bricht den Handel ab
+	 * 
+	 * Die Funktion bricht den Handel ab
+	 */
+	void abortTrade();
+	
+	
+	/**
+	 * \fn void onTrade(int index, ClientCommand* trade_command)
+	 * \brief F&uuml;hrt einen Handelsauftrag aus
+	 * \param index Index des Spielers
+	 * \param trade_command Auftrag des Spielers
+	 *
+	 * Die Funktion f&uuml;hrt einen Auftrag, etwas an der aktuellen Handelssituation zu &auml;ndern, aus.
+	 */		       
+	void onTrade(int index, ClientCommand* trade_command);       
+
+//Private stuff
+private:
+	//Fields
+	/**
+	 * \var m_id
+	 * \brief Speichert die ID des Handels
+	 */
+	 int m_id;
+	/**
+	 * \var m_player_id[2]
+	 * \brief Speichert Playerids der handelnden Spieler
+	 */
+    	int m_player_id[2];
+	/**
+	 * \var m_player_type[2]
+	 * \brief Speichert den Typ der handelnden Spieler
+	 */
+    	int m_player_type[2];
+	/**
+	 * \var m_inventory[2]
+	 * \brief Speichert Inventare der handelnden Spieler
+	 */
+	ItemList* m_inventory[2];
+	
+	/**
+	 * \var m_accept[2]
+	 * \brief Speichert f&uuml;r beide Handelspartner, ob sie dem Handel zugestimmt haben
+	 */
+	bool m_accept[2];
+	/**
+	 * \var m_finished
+	 * \brief gibt an, ob der Handel beendet ist
+	 */
+	bool m_finished;
+	/**
+	 * \var m_got_items[2]
+	 * \brief Speichert f&uuml;r beide Handelspartner, ob sie die erhandelten Gegenstaende erhaltenhaben
+	 */
+	bool m_got_items[2];
+	/**
+	 * \var m_successful
+	 * \brief gibt an, ob der Handel erfolgreich war
+	 */
+	bool m_successful;
+	
+};
+#endif //TRADE_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/trader.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,273 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf
+
+	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.
+*/
+
+#include "trader.h"
+
+//Constructors
+Trader::Trader(World* world, unsigned int id) : Player( world,id)
+{
+	bool tmp=Trader::init();
+	if (!tmp)
+	{
+		DEBUG("Initialisierung des Händlers fehlgeschlagen!");
+	}
+}
+
+Trader::Trader(World* world, float coordinate_x, float coordinate_y, unsigned int id) : Player(world, coordinate_x, coordinate_y,  id)
+{
+	getObjectType().setObjectSubtype(SUBTYPE_UNIVERSAL_TRADER);
+	bool tmp=Trader::init();
+	if (!tmp)
+	{
+		DEBUG("Initialisierung des Händlers fehlgeschlagen!");
+	}
+}
+
+Trader::Trader(World* world, float coordinate_x, float coordinate_y, unsigned int id, int object_subtype) : Player(world, coordinate_x, coordinate_y,  id)
+{
+	getObjectType().setObjectSubtype(object_subtype);
+	bool tmp=Trader::init();
+	if (!tmp)
+	{
+		DEBUG("Initialisierung des Händlers fehlgeschlagen!");
+	}
+}
+
+Trader::~Trader()
+{
+	// allokierten Speicher freigeben
+}
+//Methods
+bool Trader::init()
+{
+	//eigene Initialisierung
+	getObjectType().setObjectType(OBJECTTYPE_TRADER);
+
+	setHealth(10);
+	setMaxHealth(10);
+	
+	Item * item = new Item(ITEM_GOLD,1);
+	setMaxBaggage(10000000);
+	int typ = getObjectType().getObjectSubtype();
+		
+	if (typ == SUBTYPE_UNIVERSAL_TRADER || typ ==SUBTYPE_WEAPON_TRADER)
+	{
+		item->init(ITEM_BROADSWORD,10);
+		getItems()->addItem(item);
+		
+		item->init(ITEM_LONGSWORD,10);
+		getItems()->addItem(item);
+		
+		item->init(ITEM_GREATSWORD,10);
+		getItems()->addItem(item);
+		
+		item->init(ITEM_GIANTSWORD,10);
+		getItems()->addItem(item);
+	}
+	
+	if (typ == SUBTYPE_UNIVERSAL_TRADER || typ ==SUBTYPE_ARMOR_TRADER)
+	{
+		item->init(ITEM_RINGMAIL,10);
+		getItems()->addItem(item);
+		item->init(ITEM_PLATEARMOR,10);
+		getItems()->addItem(item);
+		item->init(ITEM_ELVENMAIL,10);
+		getItems()->addItem(item);
+		item->init(ITEM_MITHRILMAIL,10);
+		getItems()->addItem(item);
+		
+		item->init(ITEM_IRONSHIELD,10);
+		getItems()->addItem(item);
+		item->init(ITEM_STEELSHIELD,10);
+		getItems()->addItem(item);
+		item->init(ITEM_ELVENSHIELD,10);
+		getItems()->addItem(item);
+		item->init(ITEM_MITHRILSHIELD,10);
+		getItems()->addItem(item);
+		
+	}
+	
+	if (typ == SUBTYPE_UNIVERSAL_TRADER || typ == SUBTYPE_POTION_TRADER)
+	{
+		item->init(ITEM_HEALINGPOTION,100);
+		getItems()->addItem(item);
+		item->init(ITEM_BIGHEALINGPOTION,100);
+		getItems()->addItem(item);
+		item->init(ITEM_FULLHEALINGPOTION,100);
+		getItems()->addItem(item);
+
+	}
+	delete item;
+	strcpy(getName(),"Haendler");
+	
+	return true;
+}
+
+bool  Trader::update(float time)
+{
+	// Trade spezifisches Update
+	DEBUG5("Update des Händlerobjekts [%i] wird gestartet", getId());
+	// Wenn ein Handel existiert
+	if (getTradeId() !=0)
+	{
+		DEBUG5("Suche Handelsobjekt des Händlers");
+		Trade* trade = getWorld()->getTrade(getTradeId());
+		DEBUG5("Ergebnis: %p",trade);
+		
+		// Wenn der Handel nicht existiert Fehler ausgeben
+		if (trade == 0)
+		{
+			setTradeId(0);
+			return false;
+			
+		}
+		else
+		{
+			// eigene Position bei dem Handel bestimmen
+			int idx = trade->getPlayerIndex(getId());
+		
+			DEBUG5("Händlerobjekt [%i] hat Handelsobjekt [%i] als seinen Handel erkannt", getId(), getTradeId());
+			// Abfragen ob der Handel bereits abgeschlossen ist.
+			if (idx == -1)
+			{
+				setTradeId(0);
+			}
+			else if (trade->getFinished()==true)
+			{
+				// Abfragen ob der Handel erfolgreich war
+				if (trade->getSuccessful()==true)
+				{
+					
+					// Items auf erhalten setzen, aber NICHT austauschen
+					trade->setGotItems(true, idx);
+				}
+				
+				// Handel ist erledigt, id auf 0 setzen
+				setTradeId(0);
+			}
+			else
+			{
+				// Handel ist noch nicht abgeschlossen
+				
+				// Testen Handel aktuell akzeptiert wird
+				if (trade->getAccept(idx)==false)
+				{
+					// Handel steht aktuell auf nicht akzeptierend
+					// Prüfen ob Handel akzeptiert werden könnte
+					
+					int value_own=0, value_pl=0;
+					
+					map< int, Item >::iterator iter;
+					map< int, Item >* itemmap = trade->getOffer(idx)->getItems();
+					Item* item;
+					
+					// Wert des eigenen Angebots aufsummieren
+					for (iter = itemmap->begin(); iter != itemmap->end(); iter++)
+					{
+						item = &(iter->second);
+						value_own += item->getNumber()* item-> getPrice();
+					}
+					DEBUG5("Haendlerangebot ist Wert: %i", value_own);
+					// Wert des fremden Angebots aufsummieren
+					itemmap = trade->getOffer(1-idx)->getItems();
+					
+					for (iter = itemmap->begin(); iter != itemmap->end(); iter++)
+					{
+						item = &(iter->second);
+						value_pl += item->getNumber()* item-> getPrice();
+					}
+					DEBUG5("Spielerangebot ist Wert: %i", value_pl);
+					if (value_own == value_pl)
+					{
+						// Handel geht genau auf, akzeptieren
+						DEBUG5("Haendler ist einverstanden so wie es ist.");
+						trade->setAccept(true,idx);
+					}
+					
+					if (value_own < value_pl)
+					{
+						// Haendler bietet weniger als der Spieler, mit Gold auffüllen
+						
+						item = new Item(ITEM_GOLD,value_pl-value_own);
+						trade->getOffer(idx)->addItem(item);
+						
+						// Handel akzeptieren
+						DEBUG5("Haendler ist einverstanden, gibt %i Gold mehr an Wechselgeld", value_pl-value_own);
+						trade->setAccept(true,idx);
+						// Item Objekt löschen
+						delete item;
+
+					}
+					
+					if (value_own > value_pl)
+					{
+						// Haendler bietet mehr als der Spieler
+						
+						// testen ob der Haendler Gold im Angebot hat
+						item = trade->getOffer(idx)->getItem(ITEM_GOLD);
+						
+						// Wenn ja
+						if (item !=0)
+						{
+							// Wenn mehr Gold im Angebot ist als zum Ausgleichen nötig
+							if (item->getNumber() >= value_own- value_pl)
+							{
+								// Gold aus dem Angebot entfernen
+								item->setNumber(value_own- value_pl);
+								trade->getOffer(idx)->removeItem(item);
+								
+								// Handel akzeptieren
+								DEBUG5("Haendler gibt %i Gold weniger an Wechselgeld ist aber einverstanden\n", value_own-value_pl);
+								trade->setAccept(true,idx);
+								
+							}
+							else
+							{
+								// alles Gold aus dem Angebot entfernen
+								DEBUG5("Haendler entfernt das gesamte Wechselgeld");
+								trade->getOffer(idx)->removeItem(item);
+							}
+							
+						}
+						if (item!=0)
+							delete item;
+					}
+				}
+				else
+				{
+					//Haendler akzeptierte bereits vorher, lag wohl am Spieler...
+					//printf("Haendler akzeptierte bereits vor diesem Update\n");
+					//trade->acceptTrade();
+				}
+			}
+		}
+	
+		if (getCommand()->getType() == COMMAND_TRADE && getTradeId()==0)
+		{
+			getCommand()->setType(COMMAND_NONE);
+			getObjectType().setActionType(ACTION_NONE);
+			getAction()->setType(ACTION_NONE);
+
+		}
+
+	}
+	
+	// Update von Player aufrufen
+	Player::update(time);
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/trader.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,102 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf
+
+	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.
+*/
+
+/**
+ * \file trader.h
+ * \defgroup Trader \ H&auml;ndler
+ * \ingroup Player
+ * \brief Steuerung des H&auml;ndlerverhalten
+ * \author Hans Wulf
+ * \version 1.0
+ * \date 2007/05/28
+ * \note Beinhaltet die Klasse Trader
+ */
+#ifndef TRADER_H
+#define TRADER_H
+#include <string>
+#include "player.h"
+#include "world.h"
+
+/**
+ * \class Trader
+ * \brief Dieses Objekt stellt einen H&auml;ndler dar. Der H&auml;ndler wird unter andrem durch NichtAngreifbarkeit charakterisiert.
+ */
+class Trader : public Player {
+//Public stuff
+public:
+	//Fields
+	//Constructors
+	/**
+	 * \fn Trader(World* world, unsigned int id)
+	 * \brief Konstruktor
+	 * \param world 
+	 * \param id 
+	 *
+	 * Legt ein neues Trader Objekt an.
+	 */
+	Trader(World* world, unsigned int id);
+	/**
+	 * \fn Trader(World* world, float coordinate_x, float coordinate_y, unsigned int id)
+	 * \brief Konstruktor
+	 * \param world 
+	 * \param coordinate_x 
+	 * \param coordinate_y 
+	 * \param id 
+	 *
+	 * Legt ein neues User Objekt an und initialisiert es mit den eingegebenen Werte.
+	 */
+	Trader(World* world, float coordinate_x, float coordinate_y, unsigned int id);
+	/**
+	 * \fn Trader(World* world, float coordinate_x, float coordinate_y, unsigned int id, int object_subtype)
+	 * \brief Konstruktor
+	 * \param world Zeiger auf die Welt
+	 * \param coordinate_x x-Koordinate des Objekts
+	 * \param coordinate_y y-Koordinate des Objekts
+	 * \param id ID des Objekts
+	 * \param object_subtype Gibt Subtyp des Haendlers an
+	 *
+	 * Legt ein neues User Objekt an und initialisiert es mit den eingegebenen Werte.
+	 */
+	Trader(World* world, float coordinate_x, float coordinate_y, unsigned int id, int object_subtype);
+	/**
+	 * \fn ~Trader()
+	 * \brief Destruktor
+	 *
+	 * Gibt den Allokierten Speicher wieder frei
+	 */
+	~Trader();
+
+	//Operations
+	/**
+	 * \fn virtual bool init()
+	 * \brief Initialisierung des Händlers
+	 * \return bool Gibt an ob die Initialisierung erfolgreich war
+	 */
+	virtual bool init();
+	/**
+	 * \fn virtual bool update (float time)
+	 * \brief Updatefunktion des Händlers
+	 * \param time Verstrichene Zeit
+	 * \return bool, Erfolgreiches Update?
+	 *
+	 * Die Updatefunktion des H&auml;ndlers wird in regelm&auml;ssigen Abst&auml;nden von der World aufgerufen und ben&ouml;tigt die Angabe, wie viel Zeit f&uuml;r das Update zur Verf&uuml;gung gestellt wird. Der R&uuml;ckgabewert gibt an ob die Funktion erfolgreich ausgef&uuml;hrt wurde. Da die Funktion hier virtuell definiert wird, wird sie erst in den abgeleiteten Klassen implementiert.
+	 */
+	virtual bool update(float time);
+};
+#endif //TRADER_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/warrior.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,168 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf
+
+	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.
+*/
+
+#include <string>
+#include "warrior.h"
+
+Warrior::Warrior(World* world, int id) : Player(world, id)
+{
+	bool tmp = init();
+}
+
+
+
+Warrior::~Warrior()
+{
+}
+
+bool Warrior::init ()
+{
+	getTypeInfo()->m_subtype = "warrior";
+
+	CreatureBaseAttr* bas = getBaseAttr();
+	CreatureDynAttr* dyn = getDynAttr();
+
+	// Basiswerte setzen
+	dyn->m_experience=0;
+	dyn->m_health = 200;
+
+	bas->m_max_experience = 100;
+	bas->m_level =1;
+	bas->m_max_health = 200;
+	bas->m_armor = 20;
+	bas->m_block=0;
+	bas->m_attack = 40;
+	bas->m_strength = 50;
+	bas->m_dexterity = 20;
+	bas->m_magic_power = 10;
+	bas->m_willpower = 25;
+	bas->m_resistances[0] =0;
+	bas->m_resistances[1] =0;
+	bas->m_resistances[2] =0;
+	bas->m_resistances[3] =0;
+	bas->m_resistances_cap[0] =50;
+	bas->m_resistances_cap[1] =50;
+	bas->m_resistances_cap[2] =50;
+	bas->m_resistances_cap[3] =50;
+	bas->m_walk_speed = 3000;
+	bas->m_attack_speed=2000;
+
+	m_base_action = Action::ATTACK;
+
+	// Faehigkeiten setzen
+	int i;
+	for (i=1;i<6;i++)
+		bas->m_abilities[i]=0;
+
+	bas->m_abilities[0] = 0x3f1f;
+	bas->m_attack_range =1;
+
+	bas->m_special_flags=0;
+
+
+	m_name.assign("Boromir");
+
+	m_base_action = Action::ATTACK;
+	m_left_action = Action::ATTACK;
+	m_right_action = Action::ATTACK;
+
+	// Debugging
+
+	bas->m_abilities[1] = 0xffffff;
+	// monsterjaeger
+	//bas->m_abilities[1] = 0x4ff;
+	//bas->m_abilities[1] = 0xfffcff;
+	// Ausdauer
+	//bas->m_abilities[1]=0x10ff;
+
+
+	// Inventar belegen
+	Item* si;
+	Equipement* equ = getEquipement();
+	si = ItemFactory::createItem(Item::WEAPON,"short_sw");
+	equ->swapItem(si,Equipement::MEDIUM_ITEMS);
+
+
+	si = ItemFactory::createItem(Item::ARMOR,"leath_arm");
+	equ->swapItem(si,Equipement::ARMOR);
+
+	si = ItemFactory::createItem(Item::ARMOR,"heavy_arm");
+	equ->swapItem(si,Equipement::BIG_ITEMS+2);
+
+	si = ItemFactory::createItem(Item::HELMET,"steel_hlm");
+	equ->swapItem(si,Equipement::HELMET);
+
+	si = ItemFactory::createItem(Item::GLOVES,"leath_gl");
+	equ->swapItem(si,Equipement::GLOVES);
+
+	si = ItemFactory::createItem(Item::SHIELD,"wood_sh");
+	equ->swapItem(si,Equipement::SHIELD);
+
+	si = ItemFactory::createItem(Item::SHIELD,"iron_sh");
+	equ->swapItem(si,Equipement::BIG_ITEMS+1);
+
+	si = ItemFactory::createItem(Item::ARMOR,"leath_arm");
+	equ->swapItem(si,Equipement::ARMOR);
+
+	si = ItemFactory::createItem(Item::WEAPON,"holy_flail");
+	equ->swapItem(si,Equipement::MEDIUM_ITEMS+1);
+
+	si = ItemFactory::createItem(Item::WEAPON,"battle_axe");
+	equ->swapItem(si,Equipement::BIG_ITEMS);
+
+	si = ItemFactory::createItem(Item::POTION,"heal_1");
+	equ->swapItem(si,Equipement::SMALL_ITEMS);
+
+	si = ItemFactory::createItem(Item::POTION,"heal_1");
+	equ->swapItem(si,Equipement::SMALL_ITEMS+5);
+
+	si = ItemFactory::createItem(Item::POTION,"heal_1");
+	equ->swapItem(si,Equipement::SMALL_ITEMS+10);
+
+	si = ItemFactory::createItem(Item::POTION,"heal_1");
+	equ->swapItem(si,Equipement::SMALL_ITEMS+11);
+
+	si = ItemFactory::createItem(Item::POTION,"heal_bl");
+	equ->swapItem(si,Equipement::SMALL_ITEMS+12);
+
+	si = ItemFactory::createItem(Item::POTION,"heal_fr");
+	equ->swapItem(si,Equipement::SMALL_ITEMS+13);
+
+
+	si = ItemFactory::createItem(Item::POTION,"heal_2");
+	equ->swapItem(si,Equipement::SMALL_ITEMS+1);
+
+	si = ItemFactory::createItem(Item::POTION,"heal_2");
+	equ->swapItem(si,Equipement::SMALL_ITEMS+21);
+
+
+	calcBaseAttrMod();
+
+	return true;
+}
+
+
+bool Warrior::update(float time)
+{
+	// Warriorspezifische update Routine
+
+	// update von User aufrufen
+	Player::update(time);
+	return true;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/warrior.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,122 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf
+
+	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.
+*/
+
+/**
+ * \file warrior.h
+ * \defgroup Warrior \ Krieger
+ * \ingroup User
+ * \brief Spezifiziert den nutzergesteuerten Krieger
+ * \author Hans Wulf
+ * \version 1.0
+ * \date 2007/05/30
+ * \note Beinhaltet die Klasse Warrior
+ */
+#ifndef WARRIOR_H
+#define WARRIOR_H
+#include <string>
+#include "player.h"
+#include "world.h"
+/**
+ * \class Warrior
+ * \brief Dieses Objekt stellt einen Krieger dar.
+ */
+class Warrior : public Player {
+//Public stuff
+public:
+	//Fields
+	//Constructors
+	/**
+	 * \fn Warrior(World* world, unsigned int id)
+	 * \brief Konstruktor
+	 * \param world Welt
+	 * \param id Objekt-ID
+	 *
+	 * Legt ein neues Warrior Objekt an.
+	 */
+	Warrior(World* world, int id);
+	
+	
+	/**
+	 * \fn ~Warrior()
+	 * \brief Destruktor
+	 *
+	 * Gibt den Allokierten Speicher wieder frei
+	 */
+	~Warrior();
+	//Accessor Methods
+	//Operations
+	/**
+	 * \fn virtual bool init ()
+	 * \brief Initialisiert den Krieger. 
+	 * \return bool, der angibt ob die initialisierung erfolgreich war
+	 */
+	virtual bool init ();
+	
+	/**
+	 * \fn virtual bool destroy ()
+	 * \brief Zerstoert das Objekt. Die Funktion ist virtuell und wird durch die abgeleiteten Klassen &uuml;berschrieben.
+	 * \return bool, der angibt ob die Zerstoerung erfolgreich war
+	 */
+	virtual bool destroy()
+	{
+		Player::destroy();
+	}
+	
+	/**
+	 * \fn virtual void calcDamage(ActionType type,Damage& dmg)
+	 * \brief Berechnet den Basisschaden einer Aktion
+	 */
+	virtual void calcBaseDamage(Action::ActionType act,Damage& dmg)
+	{
+		Player::calcBaseDamage(act,dmg);
+	}
+	
+	/**
+	 * \fn virtual void calcBaseAttrMod()
+	 * \brief Die modifizierten Basisattribute werden neu berechnet. Verwendet die Basisattribute, verwendete Items, sowie temporaere Modifikationen.
+	 */
+	virtual void calcBaseAttrMod()
+	{
+		Player::calcBaseAttrMod();
+	}
+	
+	
+	/**
+	 * \fn bool update (float time)
+	 * \brief Updatefunktion des Kriegers
+	 * \param time Verstrichene Zeit
+	 * \return bool, Erfolgreiches Update?
+	 *
+	 * Die Updatefunktion des Kriegers wird in regelm&auml;ssigen Abst&auml;nden von der World aufgerufen und ben&ouml;tigt die Angabe, wie viel Zeit f&uuml;r das Update zur Verf&uuml;gung gestellt wird. Der R&uuml;ckgabewert gibt an ob die Funktion erfolgreich ausgef&uuml;hrt wurde.
+	 */
+	bool update(float time);
+	
+	protected:
+	
+	/**
+	 * \fn virtual void gainLevel()
+	 * \brief Wird aufgerufen, wenn das Lebewesen ein Levelup erhält. Passt Erfahrung und alle Basisattribute an.
+	 */
+	virtual void gainLevel()
+	{
+		Player::gainLevel();
+	}
+			
+};
+#endif //WARRIOR_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/world.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,1234 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf
+
+	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.
+*/
+
+
+#include "world.h"
+
+/**
+ * Constructors/Destructors
+ */
+/**
+ *
+ */
+ World::World(bool server)
+{
+	// diverse Initialisierungen
+	
+	m_player_slots = new map<int,int>;
+	
+	// Baum fuer die Handelsvorgaenge anlegen	
+	m_trades = new map<int, Trade* >;
+	m_trades->clear();
+	
+
+	m_max_nr_players =8;
+	m_parties = new Party[m_max_nr_players];
+	for (int i =0;i<m_max_nr_players;i++)
+	{
+		m_parties[i].init(m_max_nr_players,i);
+	}
+	
+		 
+	 for (int i=0;i<WORLD_MAX_REGIONS;i++)
+		 m_regions[i]=0;
+	 
+	
+}
+
+bool World::init()
+{
+	// Aktionen initialisieren
+	Action::init();
+		
+	// Items initialisieren
+	ItemFactory::init();
+	
+	ObjectFactory::init();
+	ObjectFactory::m_world = this;
+	
+	if (m_server)
+	{
+		m_network = new ServerNetwork(m_max_nr_players);
+	}
+	else
+	{
+		m_network = new ClientNetwork();
+	}
+	
+	if( m_network->init( REQ_PORT )!=NET_OK )
+	{
+		ERRORMSG( "Error occured in network" );
+		return false;
+	}
+	
+	long sec;
+	time(&sec);
+	srand(sec);
+}
+
+void World::generate(int type)
+{
+	if (type==1)
+	{
+
+	}
+	else if(type==2)
+	{
+		Region* reg = new Region(25,25);
+		short rid = insertRegion(reg);
+
+
+
+
+		// Objekte anlegen
+		ServerWObject* wo=0,*wo2=0;
+		WorldObject::Geometry* wob=0;
+		Shape* sp=0;
+
+		// Tiles Setzen
+		for (int i=1;i<5;i++)
+		{
+			reg->setTile(TILE_GRASS,5,i);
+		}
+
+		for (int i=7;i<10;i++)
+		{
+			reg->setTile(TILE_WATER,i,6);
+		}
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_FIXED_OBJECT, "fence");
+		insertSWObject(wo, 4,6,rid);
+
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_FIXED_OBJECT, "tree");
+		insertSWObject(wo, 9,13,rid);
+
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "goblin");
+		insertSWObject(wo, 13,8,rid);
+
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "gob_dog");
+		insertSWObject(wo, 14.2,8.2,rid);
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "goblin");
+		insertSWObject(wo, 14.5,6.7,rid);
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "goblin");
+		insertSWObject(wo, 14.8,5.7,rid);
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "goblin");
+		insertSWObject(wo, 14,10.9,rid);
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "goblin");
+		insertSWObject(wo, 17,8.2,rid);
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "lich");
+		insertSWObject(wo, 7,5,rid);
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "goblin");
+		insertSWObject(wo, 18.5,7,rid);
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "goblin");
+		insertSWObject(wo, 17.2,6.6,rid);
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "goblin");
+		insertSWObject(wo, 19.9,6.9,rid);
+
+/*
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "goblin");
+		insertSWObject(wo, 16.2,3,rid);
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "goblin");
+		insertSWObject(wo, 19.2,3.1,rid);
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "goblin");
+		insertSWObject(wo, 6.5,6.4,rid);
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_MONSTER, "goblin");
+		insertSWObject(wo, 8.5,6.4,rid);
+		*/
+/*
+
+		Spawnpoint::SpawnedMonsterGroup mg("goblin",1.0,1);
+		spawn = new Spawnpoint(m_world,1);
+		spawn->setRespawnTime(10000);
+		spawn->addMonsterGroup(mg);
+		insertSWObject(spawn,9,9,rid);
+*/
+/*
+		int i,j;
+		for (i=1;i<48;i++)
+		{
+		for (int j=1;j<48;j++)
+		{
+		reg->setTile(TILE_GRASS,i,j);
+	}
+	}
+
+		for (i=0;i<49;i++)
+		{
+		reg->setTile(TILE_WATER,i,0);
+		reg->setTile(TILE_WATER,i,49);
+		reg->setTile(TILE_WATER,49,i);
+		reg->setTile(TILE_WATER,0,i);
+
+	}
+
+		Spawnpoint::SpawnedMonsterGroup gob("goblin",0.6,6);
+		Spawnpoint::SpawnedMonsterGroup gob2("goblin",0.5,3);
+		Spawnpoint::SpawnedMonsterGroup lich("lich",0.7,1);
+		Spawnpoint::SpawnedMonsterGroup dog("gob_dog",0.4,4);
+
+		spawn = new Spawnpoint(m_world,1);
+		spawn->setRespawnTime(100000);
+		spawn->addMonsterGroup(gob);
+		insertSWObject(spawn,9,9,rid);
+
+		spawn = new Spawnpoint(m_world,2);
+		spawn->setRespawnTime(100000);
+		spawn->addMonsterGroup(gob);
+		insertSWObject(spawn,6,18,rid);
+
+		spawn = new Spawnpoint(m_world,3);
+		spawn->setRespawnTime(100000);
+		spawn->addMonsterGroup(gob2);
+		spawn->addMonsterGroup(dog);
+		insertSWObject(spawn,22,14,rid);
+
+		spawn = new Spawnpoint(m_world,4);
+		spawn->setRespawnTime(100000);
+		spawn->addMonsterGroup(gob);
+		spawn->addMonsterGroup(lich);
+		insertSWObject(spawn,16,25,rid);
+
+		spawn = new Spawnpoint(m_world,5);
+		spawn->setRespawnTime(100000);
+		spawn->addMonsterGroup(gob2);
+		spawn->addMonsterGroup(lich);
+		spawn->addMonsterGroup(dog);
+		insertSWObject(spawn,30,27,rid);
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_FIXED_OBJECT, "tree");
+		insertSWObject(wo, 24,26,rid);
+
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_FIXED_OBJECT, "tree");
+		insertSWObject(wo, 10,13,rid);
+
+		wo = ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_FIXED_OBJECT, "tree");
+		insertSWObject(wo, 20,18,rid);
+*/
+
+	}
+}
+
+
+void World::acceptLogins()
+{
+	int login_slot;
+
+	while((login_slot=static_cast<ServerNetwork*>(m_network)->popNewLoginSlot()) != -1 )
+	{
+		INFO( "user login detected: %i",  login_slot  );
+		m_logins.push_back(login_slot);
+
+
+	}
+}
+
+void World::updateLogins()
+{
+	list<int>::iterator i;
+	Packet* data;
+	int lend;
+	ClientHeader header;
+	DEBUG5("update logins");
+	for (i=m_logins.begin();i!=m_logins.end();)
+	{
+		DEBUG5("testing slot %i",(*i));
+		if (m_network->numberSlotMessages((*i) )>0)
+		{
+			DEBUG5("got Package");
+			m_network->popSlotMessage(data,(*i));
+			CharConv cv(data);
+			header.fromString(&cv);
+			if (header.m_content == PTYPE_C2S_SAVEGAME)
+			{
+				DEBUG("got savegame from slot %i",(*i));
+				char binsave;
+				cv.fromBuffer<char>(binsave);
+				short version;
+				cv.fromBuffer<short>(version);
+				int len;
+				cv.fromBuffer<int>(len);
+				WorldObject::TypeInfo::ObjectSubtype ot;
+				char tmp[11];
+				tmp[10] = '\0';
+				cv.fromBuffer(tmp,10);
+				for (int u=0;u<10;u++)
+					printf("%i ",tmp[u]);
+				ot = tmp;
+				ServerWObject* pl =0;
+
+				
+				pl=ObjectFactory::createObject(WorldObject::TypeInfo::TYPE_PLAYER, ot);
+				
+
+				if (pl!=0)
+				{
+					//pl->fromSavegame(bp2);
+					insertSWObject(pl,6,11,0);
+					m_player_slots->insert(make_pair(pl->getId(), *i));
+
+					//pl->getDynAttr()->m_status_mod_time[Damage::CONFUSED] = 100000;
+					//pl->getDynAttr()->m_status_mod_time[Damage::BERSERK] = 100000;
+
+				}
+				i = m_logins.erase(i);
+			}
+			else
+			{
+				DEBUG("unknown type %i",header.m_content);
+			}
+			m_network->deallocatePacket(data);
+		}
+		else
+		{
+			i++;
+		}
+
+	}
+	DEBUG5("done");
+
+}
+
+
+/**
+ *
+ */
+World::~World()
+{
+
+	map<int, Trade* >::iterator j;
+	for (j=m_trades->begin(); j!=m_trades->end();j++)
+		delete j->second;
+	
+	delete m_trades;
+	
+	for (int i=0;i<WORLD_MAX_REGIONS;i++)
+	{
+		if (m_regions[i]!=0)
+			delete m_regions[i];
+	}
+
+	delete[] m_parties; 
+	delete m_player_slots;
+}	
+/**
+ * Methods
+ */
+ 
+short World::insertRegion(Region* region)
+{
+	short i=0;
+	while (i<WORLD_MAX_REGIONS)
+	{
+		if (m_regions[i]==0)
+		{
+			m_regions[i]=region;
+			return i;
+		}
+	}
+	return -1;
+}
+
+WorldObject::Relation World::getRelation(WorldObject::TypeInfo::Fraction frac, ServerWObject* wo)
+{
+	WorldObject::TypeInfo::Fraction f = wo->getTypeInfo()->m_fraction;
+	
+	DEBUG5("frac1 %i frac2 %i",frac,f);
+
+	if (wo->getTypeInfo()->m_type > WorldObject::TypeInfo::TYPE_MONSTER)
+	{
+		return 	WorldObject::NEUTRAL;
+	}
+	
+	if (frac == WorldObject::TypeInfo::NOFRACTION)
+		return WorldObject::NEUTRAL;
+	else if (frac <=  WorldObject::TypeInfo::FRAC_MONSTER)
+	{
+		if (frac ==  wo->getTypeInfo()->m_fraction)
+			return WorldObject::ALLIED;
+		else if (wo->getTypeInfo()->m_fraction==WorldObject::TypeInfo::NOFRACTION)
+			return WorldObject::NEUTRAL;
+		else
+			return WorldObject::HOSTILE;
+	}
+	else if (frac ==WorldObject::TypeInfo::FRAC_HOSTILE_TO_ALL)
+	{
+		return WorldObject::HOSTILE;
+	}
+	else
+	{
+		
+		if (f == WorldObject::TypeInfo::NOFRACTION)
+			return WorldObject::NEUTRAL;
+		else if (f <=  WorldObject::TypeInfo::FRAC_HOSTILE_TO_ALL)
+			return WorldObject::HOSTILE;
+		else
+		{
+			return (m_parties[frac - WorldObject::TypeInfo::FRAC_PLAYER_PARTY].getRelations())[f- WorldObject::TypeInfo::FRAC_PLAYER_PARTY];
+		}
+	}
+}
+
+Party* World::getEmptyParty()
+{
+	int i;
+	for (i=0;i<m_max_nr_players;i++)
+	{
+		if (m_parties[i].getNrMembers()==0)
+			return &(m_parties[i]);
+	}
+	return 0;
+}
+
+bool World::intersect(Shape* s1, Shape* s2)
+{
+	Shape* t=0;
+	float x1 = s1->m_coordinate_x;
+	float x2 = s2->m_coordinate_x;
+	float y1 = s1->m_coordinate_y;
+	float y2 = s2->m_coordinate_y;
+	
+	if (s1->m_type == Shape::CIRCLE && s2->m_type == Shape::CIRCLE)
+	{
+		DEBUG5("checking circle-circle");
+		
+		// Pruefen von Kreis gegen Kreis
+		// Ueberschneiden sich, wenn  Abstand der Mittelpunkte geringer als Summe der Radien
+		if (sqr(x1-x2) + sqr(y1-y2) < sqr(s1->m_radius + s2->m_radius))
+		{
+			DEBUG5("intersect %f %f %f %f",sqr(x1-x2),sqr(y1-y2),sqr(s1->m_radius + s2->m_radius),sqr(x1-x2) + sqr(y1-y2));
+			return true;
+		}
+		else
+			return false;
+	}
+	else if (s1->m_type == Shape::RECT && s2->m_type == Shape::RECT)
+	{
+		DEBUG5("checking rect-rect");
+		
+		// Pruefen Rechteck gegen Rechteck
+		// Ueberschneiden sich, wenn Differenz der Mittelpunkt in beiden Koordinatenrichtungen geringer als die Summe der Ausdehnungen in den beiden Richtungen
+		float xe1 = s1->m_extent_x;
+		float xe2 = s2->m_extent_x;
+		float ye1 = s1->m_extent_y;
+		float ye2 = s2->m_extent_y;
+		if ( fabs(x1-x2) < xe1+xe2 && fabs(y1-y2) < ye1+ye2 )
+			return true;
+		else
+			return false;
+	}
+	else
+	{
+		// Pruefen Kreis gegen Rechteck
+		DEBUG5("checking circle-rect");
+		
+		// So tauschen, dass s1 der Kreis ist
+		if (s1->m_type == Shape::RECT)
+		{
+			t = s1;
+			s1 = s2;
+			s2 = t;
+			x1 = s1->m_coordinate_x;
+			x2 = s2->m_coordinate_x;
+			y1 = s1->m_coordinate_y;
+			y2 = s2->m_coordinate_y;
+		}	
+		float xe2 = s2->m_extent_x;
+		float ye2 = s2->m_extent_y;
+		float r1 = s1->m_radius;
+		
+		// zuerst ein Test gegen das den Kreis umgebende Rechteck
+		if (fabs(x1-x2) > r1+xe2 || fabs(y1-y2) > r1+ye2 )
+		{
+			return false;
+		}
+		else
+		{
+			// Testen ob Kreismittelpunkt direkt im Rechteck liegt
+			if ( fabs(x1-x2) < xe2 || fabs(y1-y2) < ye2 )
+				return true;
+			
+			// Kreis liegt auf dem Reckteck, wenn Abstand zu einer der Ecken kleiner als r1
+			float mx = min (fabs(x1-x2+xe2), fabs(x1-x2-xe2));
+			float my = min (fabs(y1-y2+ye2), fabs(y1-y2-ye2));
+			if (sqr(mx)+sqr(my) < sqr(r1))
+				return true;
+			else
+				return false;
+			
+		}
+
+	}
+
+}
+	
+float World::getDistance(Shape& s1, Shape& s2)
+{
+	return (sqrt(sqr(s1.m_coordinate_x-s2.m_coordinate_x) +sqr(s1.m_coordinate_y-s2.m_coordinate_y)) - s1.m_radius - s2.m_radius);
+}
+	
+
+
+/**
+ * 
+ */
+ServerWObject* World::getSWObject ( int id,short rid) 
+{
+	return m_regions[rid]->getSWObject(id);
+}
+
+
+Trade* World::getTrade ( int id)
+{
+	map<int,Trade*>::iterator iter;
+	
+	//Handel suchen
+	iter = m_trades->find(id);
+	
+	// Testen ob gefunden
+	if (iter == m_trades->end())
+	{
+		// keins gefunden, NULL ausgeben
+		return 0;
+	}
+	else
+	{
+		// Zeiger auf Objekt ausgeben
+		return iter->second;
+	}
+}	
+
+int World::newTrade(int trader1_id, int trader2_id)
+{
+	// zufällige ID erzeugen;
+	int id = 0;
+	Trade* trade;
+	while (id == 0)
+	{
+		id=rand();
+		trade=getTrade(id);
+		if (trade!=0)
+		{
+			id=0;
+		}
+	}
+	
+	// Neues Trade Objekt anlegen
+	trade = new Trade(id, trader1_id,trader2_id);
+	if (trade ==0)
+	{
+		return 0;
+	}
+	
+	m_trades->insert(make_pair(id,trade));
+	// ID ausgeben
+	return id;
+}
+
+bool World:: getSWObjectsInShape( Shape* shape, short region, list<ServerWObject*>* result,short layer, short group, ServerWObject* omit )
+{
+
+	 
+	// Region ermitteln, wenn gleich 0, Fehler ausgeben
+	Region* r = m_regions[region];
+	if (r == 0)
+	{
+		return false;
+	}
+	
+	
+	bool res = r->getSWObjectsInShape(shape,result,layer,group,omit);
+	
+	return res;
+	 
+}
+
+
+ServerWObject* World::getSWObjectAt(float x_coordinate, float y_coordinate,  short region,short layer, short group )
+{
+	// Region ermitteln, wenn gleich 0, Fehler ausgeben
+	Region* r = m_regions[region];
+	if (r == 0)
+	{
+		ERRORMSG("cant find region %i",region);
+		return false;
+	}
+	
+	return r->getSWObjectAt(x_coordinate,y_coordinate,layer,group);
+}
+
+void World::getSWObjectsOnLine( float xstart, float ystart, float xend, float yend,  short region, list<ServerWObject*>* result,short layer, short group, ServerWObject* omit)
+{
+	// Region ermitteln, wenn gleich 0 beenden
+	Region* r = m_regions[region];
+	if (r == 0)
+		return;
+	
+	r->getSWObjectsOnLine(xstart,ystart,xend,yend,result,layer,group,omit);
+	
+}
+
+void World::getProjectilesOnScreen(float center_x,float center_y,short region, list<DmgProjectile*>* result)
+{
+	Region* r = m_regions[region];
+	if (r==0)
+		return ;
+	
+	r->getProjectilesOnScreen(center_x,center_y,result);
+}
+
+bool World::lineIntersect(float xstart, float ystart, float xend,float yend ,float dir[2],Shape* s)
+{
+	float p[2];
+	float proj[2];
+	float d;
+	float l=sqr(xend-xstart) +sqr(yend-ystart);
+	float cx = s->m_coordinate_x;
+	float cy = s->m_coordinate_y;
+	
+	if (s->m_type == Shape::CIRCLE)
+	{
+
+		float r = s->m_radius;
+		
+		// testen des Abstandes zu den Endpunkten
+		if (sqr(r)>sqr(cx-xstart)+sqr(cy-ystart))
+				  return true;
+		
+		if (sqr(r)>sqr(cx-xend)+sqr(cy-yend))
+				  return true;
+		
+		
+		// Testen des Abstandes zur Linie
+		p[0] = cx-xstart;
+		p[1] = cy-ystart;
+		d=p[0]*dir[0]+p[1]*dir[1];
+		proj[0] = dir[0]*d;
+		proj[1] = dir[1]*d;
+		DEBUG5("proj on dir %f %f dist= %f %f",proj[0],proj[1],sqr(p[0]-proj[0])+sqr(p[1]-proj[1]),sqr(r));
+		
+		// Kreis liegt nicht auf der Linie, wenn der Abstand zu gross ist
+		if (sqr(r)<sqr(p[0]-proj[0])+sqr(p[1]-proj[1]))
+			return false;
+		
+		// Kreis muss ausserdem zwischen den zwei Punkten liegen
+		// geringer Abstand zur Linie ist nicht ausreichend
+		float l2 = sqr(proj[0])+sqr(proj[1]);
+		if (l2>=0 && l2<=l)
+			return true;
+			
+	}
+	else
+	{
+		// testen ob Linie rechteck garantiert verfehlt
+		if (xstart<cx-s->m_extent_x && xend<cx-s->m_extent_x || xstart>cx+s->m_extent_x && xend>cx+s->m_extent_x || ystart<cy-s->m_extent_y && yend<cy-s->m_extent_y || ystart>cy+s->m_extent_y && yend>cy+s->m_extent_y)
+		{
+			return false;
+		}
+		
+		// Kreuzprodukte bilden zwischen der Richtung und Vektor zu zwei gegenueberliegenden Ecken
+		// Auswahl des Eckenpaares so, dass die Diagonale gewaehlt wird, die einen grossen Winkel zur Linienrichtung hat
+		// Kreuzprodukt muss einmal positiv, einmal negativ sein
+		
+		float p1,p2;
+		if (dir[0]*dir[1]>0)
+		{
+			p1 = (cx-s->m_extent_x-xstart)*dir[1] - (cy+s->m_extent_y-ystart)*dir[0];
+			p2 = (cx+s->m_extent_x-xstart)*dir[1] - (cy-s->m_extent_y-ystart)*dir[0];
+			if (p1*p2<0)
+				return true;
+			
+		}
+		else
+		{
+			p1 = (cx+s->m_extent_x-xstart)*dir[1] - (cy+s->m_extent_y-ystart)*dir[0];
+			p2 = (cx-s->m_extent_x-xstart)*dir[1] - (cy-s->m_extent_y-ystart)*dir[0];
+			if (p1*p2<0)
+				return true;
+			
+		}
+	}
+	return false;
+}
+
+/*
+//TODO: neu implementieren
+bool World::getClosestFreeSquare(float x_coordinate, float y_coordinate, float &x_ret_coordinate, float &y_ret_coordinate)
+{
+	bool result = true;
+	float x =x_coordinate;
+	float y =y_coordinate;
+	
+	// Startpunkt ist der eingegebene Punkt
+	int px = 0;
+	int py = 0;
+	
+	bool field[21][21];
+	
+	int i,j;
+	for (i=0;i<=20;i++)
+		for (j=0;j<=20;j++)
+			field [i][j]=false;
+	
+	field[10][10]=true;
+	
+	// Queue für die durchsuchten Punkte
+	queue<int>* qux = new queue<int>;
+	queue<int>* quy = new queue<int>;
+	
+	// Liste für Objekte die im Weg sind
+	list<ServerWObject*>* ret = new  list<ServerWObject*>;
+	
+
+	// Selektor für fixe Objekte
+	ServerWObjectSelector* fixsel = new ServerWObjectSelector;
+	fixsel->getObjectType().setObjectType(OBJECTTYPE_FIXED_OBJECT);
+	fixsel->setSelectObjectType(true);
+	
+	
+	// nach Objekten suchen die im Weg sind
+	getServerWObjectsInRect(x+px-0.9999,y+py-0.9999,x+px+0.9999,y+py+0.99990,0, ret);
+	
+	qux->push(px);
+	quy->push(py);	
+	
+	// Solange noch Punkte zum durchsuchen existieren und der aktuelle Punkt blockiert ist
+	while (qux -> empty() != true && ret->empty()!=true)
+	{
+		ret->clear();
+		px = qux->front();
+		py = quy->front();
+		qux->pop();
+		quy->pop();
+		
+		// nach fixen Objekten suchen die im Weg sind
+		getServerWObjectsInRect(x+px-0.9999,y+py-0.9999,x+px+0.9999,y+py+0.99990,fixsel, ret);
+		
+		DEBUG5("untersuche: %f , %f",x+px,y+py);
+
+		// Wenn keine fixen Objekte im Weg
+		if (ret->empty() || (px==0 && py ==0))
+		{
+			// allgemein nach Hindernissen suchen
+			getServerWObjectsInRect(x+px-0.9999,y+py-0.9999,x+px+0.9999,y+py+0.99990,0, ret);
+			
+			// umliegende Felder in die Queue schieben, wenn sie noch nicht untersucht wurden
+			if (px < 10 && field[px+11][py+10]==false)
+			{
+				field[px+11][py+10]=true;
+				qux->push(px+1);
+				quy->push(py);
+			}
+					
+			if (px > -10 && field[px+9][py+10]==false)
+			{
+				field[px+9][py+10]=true;
+				qux->push(px-1);
+				quy->push(py);
+			}
+			
+			if (py < 10 &&field[px+10][py+11]==false)
+			{
+				field[px+10][py+11]=true;
+				qux->push(px);
+				quy->push(py+1);
+			}
+
+			if (py >-10 && field[px+10][py+9]==false)
+			{
+				field[px+10][py+9]=true;
+				qux->push(px);
+				quy->push(py-1);
+			}
+
+			
+		}	
+	}
+	
+	if (qux->empty())
+	{
+		// keinen Punkt gefunden
+		result=false;
+	}
+	else
+	{
+		// Ausgabekoordinaten setzen
+		x_ret_coordinate = x+ px;
+		y_ret_coordinate = y+ py;
+	}
+	
+	delete ret;
+	delete qux;
+	delete quy;
+	delete fixsel;
+	
+	return result;
+
+}
+*/
+/**
+ * 
+ */
+ bool World::insertSWObject (ServerWObject* object, float x, float y, short region) 
+{
+	DEBUG5("inserting Object at %f %f into region %i",x,y,region);
+	 bool result=true;
+	 
+	 // Wenn NULL Zeiger übergeben -> Fehler anzeigen
+	 if (object == 0)
+		 return false;
+	 
+	 Region* r = m_regions[region];
+	 if (r==0)
+		 return false;
+	 
+	 /*
+	 if (object->getTypeInfo()->m_type == WorldObject::TypeInfo::TYPE_PLAYER)
+	 {
+		 result &= (m_players->insert(make_pair(object->getId(),object))).second;
+	 }
+	 */
+	 
+	 object->getGridLocation()->m_region = region;
+	 result &= r->insertSWObject(object,x,y);
+
+	 return result;
+}
+
+
+/**
+*
+*/
+bool World::moveSWObject(ServerWObject* object, float x, float y)
+{
+	bool result;
+
+	
+
+	Region* r = m_regions[object->getGridLocation()->m_region];
+	if (r==0)
+	{
+		return false;
+	}
+	
+	result &= r->moveSWObject(object,x,y);
+	
+	return result;
+}
+/**
+ * 
+ */
+ bool World::deleteSWObject (ServerWObject* object) {
+	 
+	 bool result=true;
+	 
+	 // Region ermitteln
+	 Region* r = m_regions[object->getGridLocation()->m_region];
+	 if (r==0)
+		 return false;
+	 
+	 // Wenn NULL Zeiger übergeben -> Fehler anzeigen
+	 if (object == 0)
+		 return false;
+	 
+	 result &= r->deleteSWObject(object);
+	 
+	 /*
+	 if (object->getTypeInfo()->m_type == WorldObject::TypeInfo::TYPE_PLAYER)
+	 {
+		 DEBUG("Player deleted");
+		 m_players->erase(object->getId());
+	 }
+	 */
+	
+}
+
+bool  World::insertProjectile(DmgProjectile* object, float x, float y, short region)
+{
+	m_regions[region]->insertProjectile(object,x,y);
+	object->setRegion(region);
+		
+}
+
+
+/**
+ * 
+ */
+
+
+/**
+*
+*/
+int World::getValidId()
+{
+	// zufällige ID erzeugen;
+	int id = 0;
+	ServerWObject* wo;
+	while (id == 0)
+	{
+		id=rand();
+		/*
+		wo=getSWObject(id);
+		if (wo!=0)
+		{
+			id=0;
+		}
+		*/
+	}
+	return id;
+}
+
+int World::getValidProjectileId()
+{
+	// zufällige ID erzeugen;
+	int id = 0;
+	while (id == 0)
+	{
+		id=rand();
+	}
+	return id;
+}
+
+/**
+*
+*/
+void World::update(float time)
+{
+	
+	for (int i=0;i<WORLD_MAX_REGIONS;i++)
+	{
+		if (m_regions[i]!=0)
+		{
+			m_regions[i]->update(time);
+		}
+	}
+	// Durchmustern alle Handelsvorgänge
+	
+	map<int,Trade*>::iterator iter2;
+	Trade* trade=0;
+	
+	for (iter2 =m_trades->begin(); iter2!=m_trades->end();)
+	{
+		trade = iter2->second;
+		DEBUG5("Trades behandeln %p\n\n",trade);
+		// Testen ob der Handel gelöscht werden kann
+		
+		if (trade->getFinished() == true)
+		{
+			if (trade->getSuccessful() == true)
+			{
+				// Handel war erfolgreich, löschen wenn beide Spieler ihre Gegenstaende erhalten haben
+				if (trade->getGotItems(0)==true && trade->getGotItems(1)==true)
+				{
+					m_trades->erase(iter2++);
+					delete trade;
+					continue;
+				}
+			}
+			else
+			{
+				// Handel war nicht erfolgreich, sofort löschen
+				m_trades->erase(iter2++);
+				delete trade;
+				continue;
+			}
+		}
+		++iter2;
+	}
+	DEBUG5("Trades behandeln abgeschlossen");
+	
+	if (m_server)
+	{
+		updateLogins();
+		acceptLogins();
+	}
+	
+	m_network->update();
+	
+}
+
+bool World::calcBlockmat(PathfindInfo * pathinfo)
+{
+	float sqs = pathinfo->m_base_size / pathinfo->m_quality;
+	list<ServerWObject*> ret;
+	list<ServerWObject*>::iterator it;
+	int i,j,is,ie,js,je;
+	Shape s;
+	s.m_coordinate_x = pathinfo->m_center_x;
+	s.m_coordinate_y = pathinfo->m_center_y;
+	s.m_type = Shape::RECT;
+	s.m_extent_y =s.m_extent_x = 0.5*sqs * pathinfo->m_dim;
+	float c_x = pathinfo->m_center_x-s.m_extent_x;
+	float c_y = pathinfo->m_center_y-s.m_extent_y;
+	float e_x = pathinfo->m_center_x+s.m_extent_x;
+	float e_y = pathinfo->m_center_y+s.m_extent_y;
+	float rezsqs = 1/ sqs;
+	float hb = pathinfo->m_base_size * 0.5;
+	
+	DEBUG5("Calc blockmat %f %f", pathinfo->m_center_x,pathinfo->m_center_y);
+	
+	Shape s2;
+	s2.m_type = Shape::CIRCLE;
+	s2.m_radius = hb;
+	
+	Shape* wos=0;
+	
+	DEBUG5("parameter %f %f sqs %f hb %f",c_x,c_y,sqs,hb);
+	
+	// Alle Objekte in dem Gebiet suchen
+	getSWObjectsInShape(&s, pathinfo->m_region, &ret,pathinfo->m_layer);
+	ServerWObject* wo=0;
+	pathinfo->m_block->clear();
+	
+	// durchmustern der Objekte
+	for (it = ret.begin(); it!=ret.end(); ++it)
+	{
+		wo = *it;
+		// eigenes Objekt nicht mit einbeziehen
+		if (wo->getId() != pathinfo->m_id)
+		{
+			DEBUG5("found obstacle %i",wo->getId());
+			wos = &(wo->getGeometry()->m_shape);
+			DEBUG5("shape %i %f %f %f",wos->m_type,wos->m_radius,wos->m_extent_x,wos->m_extent_y);
+			
+
+			
+			// Rand des Objektes mit X zeichnen
+			js = (int) floor((wos->m_coordinate_y-c_y)/sqs);
+			is = (int) floor((wos->m_coordinate_x-c_x)/sqs);
+			is = max(min(is,pathinfo->m_dim-1),0);
+			js = max(min(js,pathinfo->m_dim-1),0);
+			s2.m_coordinate_y = (js+0.5)*sqs+c_y;
+			s2.m_coordinate_x = (is+0.5)*sqs+c_x;
+			
+			
+			DEBUG5("start %i %i %f %f",is,js,s2.m_coordinate_x,s2.m_coordinate_y);
+			float dir[12][2] = {{sqs,sqs},{sqs,0},{sqs,-sqs},{0,-sqs},{-sqs,-sqs},{-sqs,0},{-sqs,sqs},{0,sqs},{sqs,sqs},{sqs,0},{sqs,-sqs},{0,-sqs}};
+			int idir[12][2] = {{1,1},{1,0},{1,-1},{0,-1},{-1,-1},{-1,0},{-1,1},{0,1},{1,1},{1,0},{1,-1},{0,-1}};
+			
+			float x,y;
+			while (s2.m_coordinate_y< e_y && intersect(&s2, wos))
+			{
+				s2.m_coordinate_y += sqs;
+				js++;
+			}
+			js--;
+			s2.m_coordinate_y -= sqs;
+			int d=1;
+			char val = 9;
+			if (wo->getTypeInfo()->m_type == WorldObject::TypeInfo::TYPE_MONSTER || wo->getTypeInfo()->m_type == WorldObject::TypeInfo::TYPE_PLAYER)
+			{
+				if (sqr(wo->getMoveInfo()->m_speed_x) + sqr(wo->getMoveInfo()->m_speed_y) == 0)
+				{
+					// fest stehendes Lebewesen
+					val = 6;
+				}
+				else
+				{
+					// sich bewegendes Lebewesen
+					val = 4;
+				}
+			}
+			
+			
+			 
+			if (*(pathinfo->m_block->ind(is,js))<val)
+				*(pathinfo->m_block->ind(is,js)) = val;
+			
+			DEBUG5("start2 %i %i %f %f",is,js,s2.m_coordinate_x,s2.m_coordinate_y);
+			while (d<10)
+			{
+				x = s2.m_coordinate_x;
+				y = s2.m_coordinate_y;
+
+				s2.m_coordinate_x += dir[d][0];
+				s2.m_coordinate_y += dir[d][1];
+				while ((d<=10) && (s2.m_coordinate_x<c_x || s2.m_coordinate_y<c_y ||
+				s2.m_coordinate_x>e_x || s2.m_coordinate_y>e_y))
+				{
+					d++;
+					s2.m_coordinate_x = x+dir[d][0];
+					s2.m_coordinate_y = y+dir[d][1];
+				}
+				
+				if (d==10)
+					break;
+				
+				if (intersect(&s2, wos))
+				{
+					DEBUG5("intersecting: %i %i %f %f",is+idir[d][0],js+idir[d][1],s2.m_coordinate_x,s2.m_coordinate_y);
+					d--;
+					s2.m_coordinate_x = x+dir[d][0];
+					s2.m_coordinate_y = y+dir[d][1];
+					if (s2.m_coordinate_x<c_x || s2.m_coordinate_y<c_y ||
+						 s2.m_coordinate_x>e_x || s2.m_coordinate_y>e_y || !intersect(&s2, wos))
+					{
+						d++;
+						s2.m_coordinate_x = x+dir[d][0];
+						s2.m_coordinate_y = y+dir[d][1];
+					}
+				}
+				else
+				{
+					DEBUG5("not intersecting: %i %i %f %f",is+idir[d][0],js+idir[d][1],s2.m_coordinate_x,s2.m_coordinate_y);
+					do
+					{
+						d++;
+						s2.m_coordinate_x = x+dir[d][0];
+						s2.m_coordinate_y = y+dir[d][1];
+					} while (d<=10 && (s2.m_coordinate_x<c_x || s2.m_coordinate_y<c_y ||
+											 s2.m_coordinate_x>e_x || s2.m_coordinate_y>e_y || !intersect(&s2, wos)));
+
+				}
+				if (d<10)
+				{
+					DEBUG5("d: %i",d);
+					is += idir[d][0];
+					js += idir[d][1];
+					DEBUG5("intersecting: %i %i %f %f",is,js,s2.m_coordinate_x,s2.m_coordinate_y);
+					if (*(pathinfo->m_block->ind(is,js))<val)
+						*(pathinfo->m_block->ind(is,js)) = val;
+					
+					/*
+					cout << "  001122334455667788990011223344556677889900\n";
+	
+					for (j=pathinfo->m_dim-1;j>=0;j--)
+					{
+						cout << j%10 << j%10;
+						for (i=0;i<pathinfo->m_dim;i++)
+						{
+			
+							if (*(pathinfo->m_block->ind(i,j))!=0)
+							{
+								if (*(pathinfo->m_block->ind(i,j))=='X')
+									cout << *(pathinfo->m_block->ind(i,j)) << *(pathinfo->m_block->ind(i,j));
+								else
+									cout << *(pathinfo->m_block->ind(i,j))+'0' << *(pathinfo->m_block->ind(i,j))+'0';
+							}
+							else
+								cout << "  ";
+						}
+						cout << "\n";
+					}
+					cout << "---------------------\n";
+	
+					char c;
+					cin >> c;
+					*/
+				}
+			}
+			// Die jenigen Felder alsblockiert markieren, auf deren Mittelpunkt kein Objekt der Grösse base_size Platz hat
+			/*
+			for (i=is; i<=ie;i++)
+			{
+				for (j=js;j<=je; j++)
+				{
+					s2.m_coordinate_x = (i+0.5) * sqs + c_x;
+					s2.m_coordinate_y = (j+0.5) * sqs + c_y;
+					if (intersect(&s2, wos ))
+						*(pathinfo->m_block->ind(i,j)) = 'X';
+					
+				}
+			}
+			*/
+		}
+	}
+	/*
+	cout << "  001122334455667788990011223344556677889900\n";
+	
+	for (j=pathinfo->m_dim-1;j>=0;j--)
+	{
+		cout << j%10 << j%10;
+		for (i=0;i<pathinfo->m_dim;i++)
+		{
+			
+			if (*(pathinfo->m_block->ind(i,j))!=0)
+			{
+				if (*(pathinfo->m_block->ind(i,j))=='X')
+					cout << *(pathinfo->m_block->ind(i,j)) << *(pathinfo->m_block->ind(i,j));
+				else
+					cout <<(char) ( *(pathinfo->m_block->ind(i,j))+'0') << (char) (*(pathinfo->m_block->ind(i,j))+'0');
+			}
+			else
+				cout << "  ";
+		}
+		cout << "\n";
+	}
+	cout << "---------------------\n";
+	*/
+	return true;
+}
+
+
+bool World::calcPotential(PathfindInfo* pathinfo)
+{
+	//TODO: vordefinierte Felder benutzen
+	
+	float sqs = pathinfo->m_base_size / pathinfo->m_quality;
+	float l = 0.5*sqs * pathinfo->m_dim;
+	SearchField * sf = new SearchField(pathinfo->m_dim);
+	sf->init(pathinfo->m_pot, pathinfo->m_block);
+	int sx = (int) ((pathinfo->m_start_x - pathinfo->m_center_x + l) / sqs);
+	int sy = (int) ((pathinfo->m_start_y - pathinfo->m_center_y + l) / sqs);
+	DEBUG5("goal: %f %f",pathinfo->m_start_x,pathinfo->m_start_y);
+	DEBUG5("Calc potential %i %i", sx,sy);
+	
+	sf->createPotential(sx,sy);
+	delete sf;
+	return true;
+	
+}
+
+
+
+void World::calcPathDirection(PathfindInfo* pathinfo, float x_start, float y_start, float dir[2])
+{
+	float sqs = pathinfo->m_base_size / pathinfo->m_quality;
+	float l = 0.5*sqs * pathinfo->m_dim;
+	if (fabs(x_start-pathinfo->m_center_x) >l  || fabs(y_start-pathinfo->m_center_y) >l)
+	{
+		dir[0] = pathinfo->m_start_x -  x_start;
+		dir[1] = pathinfo->m_start_y -  y_start;
+	}
+	else
+	{
+		int sx = (int) ((x_start - pathinfo->m_center_x + l) / sqs);
+		int sy = (int) ((y_start - pathinfo->m_center_y + l) / sqs);
+		DEBUG5("Calc direction from %i %i", sx,sy);
+		SearchField::getGradient(pathinfo->m_pot,pathinfo->m_block,pathinfo->m_dim, dir, sx, sy);
+	}
+}
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/world.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,470 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf
+
+	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.
+*/
+
+#ifndef WORLD_H
+#define WORLD_H
+
+using namespace std;
+
+#include <string>
+#include <list>
+#include <map>
+#include <math.h>
+#include <cstdlib>
+#include <algorithm>
+#include <iostream>
+
+//#include "player.h"
+#include "serverwobject.h"
+#include "dmgprojectile.h"
+#include "trade.h"
+#include "servernetwork.h"
+#include "clientnetwork.h"
+#include "region.h"
+#include "pathfind.h"
+#include "party.h"
+#include "itemfactory.h"
+#include "objectfactory.h"
+
+/**
+ * \def WORLD_MAX_REGIONS
+ * \brief Anzahl maximaler Regionen die gleichzeitig im Speicher sind
+ * \def sqr(X)
+ * \brief Quadratfunktion
+ */
+#define WORLD_MAX_REGIONS 100
+
+#define sqr(X) ((X) * (X))
+
+/**
+ * \file world.h
+ * \defgroup world \ Welt
+ * \brief Deklaration der World
+ * \author Hans Wulf
+ * \version 1.0
+ * \date 2007/05/28
+ */
+//Forward Declarations
+
+/**
+ * \class World
+ * \brief Hauptobjekt der Anwendung
+ *
+ * Dieses Objekt ist das Hauptobjekt der Anwendung. Die wesentliche Aufgabe liegt in der Verwaltung der ServerWObject Objekte.
+ */
+class World {
+//Public stuff
+public:
+	//Fields
+	//Constructors
+	/**
+	 * \fn World(bool server)
+	 * \brief Konstruktor
+	 *
+	 * Legt ein neues World Objekt an
+	 */
+	World(bool server);
+	
+	
+	/**
+	* \fn ~World()
+	 * \brief Destruktor
+	 */
+	~World();
+	
+	/**
+	 * \fn bool init()
+	 * \brief initialisiert die Welt
+	 * \return true, wenn kein Fehler aufgetreten ist, sonst false
+	 */
+	bool init();
+	
+	void generate(int type);
+	
+	
+	/**
+	 * \fn void acceptLogins()
+	 * \brief Fuegt Spieler die sich neu eingeloggt haben ins Spiel ein
+	 */
+	void acceptLogins();
+	
+	/**
+	 * \fn void updateLogins()
+	 * \brief Aktualisiert die Liste der eingehenden Logins
+	 */
+	void updateLogins();
+	
+	//Accessor Methods
+	/**
+	 * \fn short insertRegion(Region* region)
+	 * \brief Fuegt eine neue Region in die Welt ein
+	 * \param region Einzufuegende Region
+	 * \return gibt die ID der Region an, die an allen Objekten in der Region gespeichert wird. Im Falle eines Fehlers wird -1 zurueckgegeben.
+	 */
+	short insertRegion(Region* region);
+
+	//Operations
+	/**
+	 * \fn static bool intersect(Shape* s1, Shape* s2)
+	 * \brief Gibt true aus, wenn die angegebenen Formen sich ueberschneiden, sonst false
+	 * \param s1 erste Form
+	 * \param s2 zweite Form
+	 */
+	static bool intersect(Shape* s1, Shape* s2);
+
+
+	/**
+	 * \fn Trade* getTrade( int id)
+	 * \brief Sucht Handelsvorgang anhand seiner ID
+	 * \param id ID des gesuchten Handelsvorganges
+	 * \return Zeiger auf den gefundenen Handel
+	 *
+	 * W&auml;hlt einen Handel anhand seiner ID aus. Gibt einen Zeiger auf das Handelsobjekt zur&uuml;ck, beziehungsweise NULL wenn das Objekt nicht gefunden wurde.
+	 */
+	Trade*  getTrade ( int id);
+
+
+	/**
+	 * \fn int newTrade(int trader1_id, int trader2_id)
+	 * \brief Legt einen neuen Handelsvorgang an
+	 * \param trader1_id ID des ersten Handelspartners
+	 * \param trader2_id ID des zweiten Handelsparters
+	 * \return ID des neu angelegten Handelsvorgangs
+	 * Legt einen neuen Handelsvorgang an und gibt dessen ID aus. Wenn das anlegen des Handelsvorganges nicht erfolgreich war, so wird 0 ausgegeben
+	 */
+	int newTrade(int trader1_id, int trader2_id);
+
+	/**
+	 * \fn ServerWObject*  getSWObject ( int id);
+	 * \brief Sucht ServerWObject anhand seiner ID
+	 * \param id ID des gesuchten ServerWObjects
+	 * \param rid ID der Region
+	 * \return Zeiger auf das gefundene ServerWObject
+	 *
+	 * W&auml;hlt ein ServerWObject anhand seiner ID aus. Gibt einen Zeiger auf das Objekt zur&uuml;ck, beziehungsweise NULL wenn das Objekt nicht gefunden wurde.
+	 */
+	ServerWObject* getSWObject ( int id, short rid);
+
+
+	/**
+	 * \fn bool getSWObjectsInShape( Shape* shape, short region, list<ServerWObject*>* result,short layer=WorldObject::Geometry::LAYER_ALL, short group = WorldObject::GROUP_ALL, ServerWObject* omit=0 )
+	 * \brief Sucht ServerWObjects innerhalb eines Gebietes
+	 * \param shape Form des Gebietes
+	 * \param layer Ebene in der gesucht wird
+	 * \param region Region in der gesucht wird
+	 * \param result Liste, an die die gefundenen Objekte angehangen werden
+	 * \param layer Ebene in der gesucht wird
+	 * \param group Gruppen die durchsucht werden sollen
+	 * \param omit Objekt, das ausgelassen wird
+	 * \return bool, der angibt, ob die Operation erfolgreich war
+	 *
+	 * Alle gefundenen Objekte werden an das Ende der Liste result angehangen.
+	 * Wenn f&uuml;r selector ein NULL-Zeiger &uuml;bergeben wird, so werden die Objekte nicht selektiert.
+	 * Wenn f&uuml;r result ein NULL-Zeiger &uuml;bergeben wird, oder ein anderer Fehler auftritt, so wird false zur&uuml;ckgegeben, sonst true.
+	 */
+	bool getSWObjectsInShape( Shape* shape, short region, list<ServerWObject*>* result,short layer=WorldObject::Geometry::LAYER_ALL, short group = WorldObject::GROUP_ALL, ServerWObject* omit=0 );
+
+
+	/**
+	 * \fn ServerWObject* getSWObjectAt(float x_coordinate, float y_coordinate,  short region,short layer=WorldObject::Geometry::LAYER_ALL, short group = WorldObject::GROUP_ALL)
+	 * \brief Sucht ServerWObject an den gegebenen Koordinaten
+	 * \param x_coordinate x-Koordinate des Punktes
+	 * \param y_coordinate y-Koordinate des Punktes
+	 * \param layer Ebene in der gesucht wird
+	 * \param region Region in der gesucht wird
+	 * \param layer Ebene in der gesucht wird
+	 * \param group Gruppen die durchsucht werden sollen
+	 * \return Zeiger auf das ServerWObject, wenn sich an dem Punkt eines befindet, sonst NULL
+	 */
+	ServerWObject* getSWObjectAt(float x_coordinate, float y_coordinate,  short region,short layer=WorldObject::Geometry::LAYER_ALL, short group = WorldObject::GROUP_ALL);
+
+	/**
+	 * \fn getSWObjectsOnLine( float xstart, float ystart, float xend, float yend,  short region, list<ServerWObject*>* result,,short layer=WorldObject::Geometry::LAYER_ALL, short group = WorldObject::GROUP_ALL ServerWObject* omit=0 )
+	 * \brief Sucht alle Objekte die auf der angegebenen Linie liegen
+	 * \param xstart x-Koordinate Startpunkt
+	 * \param ystart y-Koordinate Startpunkt
+	 * \param xend x-Koordinate Endpunkt
+	 * \param yend y-Koordinate Endpunkt
+	 * \param region Region in der gesucht wird
+	 * \param result Liste, an die die gefundenen Objekte angehangen werden
+	 * \param layer Ebene in der gesucht wird
+	 * \param group Gruppen die durchsucht werden sollen
+	 * \param omit Objekt, das ausgelassen wird
+	 */
+	void getSWObjectsOnLine( float xstart, float ystart, float xend, float yend,  short region, list<ServerWObject*>* result,short layer=WorldObject::Geometry::LAYER_ALL, short group = WorldObject::GROUP_ALL, ServerWObject* omit=0 );
+
+	/**
+	 * \fn void getProjectilesOnScreen(float center_x,float center_y,short region, list<DmgProjectile*>* result)
+	 * \brief Gibt alle Projektile auf dem Bildschirm aus
+	 * \param center_x x-Koordinate Zentrum
+	 * \param center_y y-Koordinate Zentrum
+	 * \param region Region
+	 * \param result Liste in die die Objekte eingeordnet werden
+	 */
+	void getProjectilesOnScreen(float center_x,float center_y,short region, list<DmgProjectile*>* result);
+
+	/* *
+	 * \fn getClosestFreeSquare(float x_coordinate, float y_coordinate, float &x_ret_coordinate, float &y_ret_coordinate)
+	 * \brief Sucht den freien Punkt, der sich am nächsten zum eingegebenen Punkt befindet
+	 * \param x_coordinate x-Koordinate des Punktes
+	 * \param y_coordinate y-Koordinate des Punktes
+	 * \param x_ret_coordinate x-Koordinate des gefundenen Punktes
+	 * \param y_ret_coordinate y-Koordinate des gefundenen Punktes
+	 * \return gibt an, ob ein Punkt gefunden wurde.
+	 *
+	 * Findet den Punkt, welcher sich am naechsten an dem eingegebenen Punkt befindet. Ist der Startpunkt selbst frei, so wird dieser zurückgegeben. Die Suche überschreitet ausgehend vom den Startpunkt zwar andere Spieler, aber keine festen Objekte. Es wird als ein Punkt gefunden, der vom Startpunkt aus prinzipiell erreichbar ist, lediglich der Weg ist durch andere Spieler blockiert  Es werden nur Punkte gefunden, die eine maximale Distanz zum Startpunkt von 10 haben
+	 */
+	//bool getClosestFreeSquare(float x_coordinate, float y_coordinate, float &x_ret_coordinate, float &y_ret_coordinate);
+
+
+	/**
+	 * \fn insertSWObject(ServerWObject* object)
+	 * \brief F&uuml;gt ServerWObject ein
+	 * \param object Zeiger auf das Objekt, welches eingef&uuml;gt werden soll
+	 * \return bool, der angibt, ob die Operation erfolgreich war
+	 *
+	 * F&uuml;gt das ServerWObject in die internen Datenstrukturen ein. Wenn das Einf&uuml;gen erfolgreich war, so wird true zur&uuml;ckgegeben, sonst false.
+	 * Wenn ein NULL-Zeiger &uuml;bergeben wird, so wird false ausgegeben.
+	 */
+	bool  insertSWObject (ServerWObject* object, float x, float y, short region);
+
+	/**
+	 * \fn bool  insertProjectile(DmgProjectile* object, float x, float y, short region)
+	 * \brief Fuegt ein Projektil ein
+	 * \param object Zeiger auf das Objekt, welches eingef&uuml;gt werden soll
+	 * \return bool, der angibt, ob die Operation erfolgreich war
+	 *
+	 */
+	bool  insertProjectile(DmgProjectile* object, float x, float y, short region);
+
+
+	/**
+	 * \fn deleteServerWObject(ServerWObject* object)
+	 * \brief L&ouml;scht ServerWObject
+	 * \param object Zeiger auf das Objekt, welches gel&ouml;scht werden soll
+	 * \return bool, der angibt, ob die Operation erfolgreich war
+	 *
+	 * L&ouml;scht das ServerWObject aus den internen Datenstrukturen. Das Objekt selbst wird nicht gel&ouml;scht, es wird nur die Einbindung in die Datenstrukturen entfernt. Wenn das L&ouml;schen erfolgreich war, so wird true zur&uuml;ckgegeben, sonst false.
+	 * Wenn ein NULL-Zeiger &uuml;bergeben wird, so wird false ausgegeben.
+	 */
+	bool  deleteSWObject (ServerWObject* object);
+
+	 /**
+	  * \fn moveServerWObject(ServerWObject* object, float x, float y)
+	  * \brief verschiebt ein ServerWObject an den Punkt (x,y)
+	  * \param object Zeiger auf das Objekt, welches verschoben werden soll
+	  * \param x x-Koordinate des Zielpunktes, zu dem das Objekt verschoben werden soll
+	  * \param y y-Koordinate des Zielpunktes, zu dem das Objekt verschoben werden soll
+	  * \return bool, welcher angibt, ob das Verschieben erfolgreich war
+	  */
+	bool moveSWObject(ServerWObject* object, float x, float y);
+
+	/**
+	 * \fn bool lineIntersect(float xstart, float xstart, float xend,float yend float dir[2],Shape* s)
+	 * \brief Prueft ob sich die Form auf der Linie befindet
+	 * \param xstart x-Koordinate Startpunkt
+	 * \param ystart y-Koordinate Startpunkt
+	 * \param xend x-Koordinate Endpunkt
+	 * \param yend y-Koordinate Endpunkt
+	 * \param dir Richtung der Linie
+	 * \param s Form, gegen die geprueft wird
+	 * \return true, wenn die Linie die Form schneidet
+	 */
+	static bool lineIntersect(float xstart, float ystart, float xend,float yend ,float dir[2],Shape* s);
+
+	/**
+	 * \fn bool calcBlockmat(PathfindInfo * pathinfo)
+	 * \brief Berechnet die Matrix der blockierten Felder
+	 * \param pathinfo Wegfindeinformation fuer die die Matrix benoetigt wird
+	 */
+	bool calcBlockmat(PathfindInfo * pathinfo);
+
+	/**
+	 * \fn bool calcPotential(PathfindInfo* pathinfo)
+	 * \brief Berechnet auf Basis der Blockadematrix das Potentialfeld
+	 * \param pathinfo Wegfindeinformation fuer die das Potential berechnet wird
+	 */
+	bool calcPotential(PathfindInfo* pathinfo);
+
+	/**
+	 * \fn void calcPathDirection(PathfindInfo* pathfinfo, float x_coordinate, float y_coordinate, float dir[2])
+	 * \brief Berechnet die Bewegungsrichtung auf Basis der gegebenen Wegfindeinformation
+	 * \param pathinfo verwendete Wegfindeinformation
+	 * \param x_coordinate Standpunkt, x-Koordinate
+	 * \param y_coordinate Standpunkt, y-Koordinate
+	 * \param dir erhaltene Bewegungsrichtung
+	 */
+	void calcPathDirection(PathfindInfo* pathfinfo, float x_coordinate, float y_coordinate, float dir[2]);
+
+
+
+	/**
+	 * \fn getValidId()
+	 * \brief Gibt eine zul&auml;ssige ID f&uuml;r ein ServerWObject aus
+	 * \return zul&auml;ssige ID f&uuml;r ein ServerWObject
+	 */
+	int getValidId();
+
+	/**
+	 * \fn int getValidProjectileId()
+	 * \brief Gibt eine zulaessige ID fuer ein Projektil zurueck
+	 */
+	int getValidProjectileId();
+
+
+	/**
+	 * \fn update(float time)
+	 * \brief Lässt für alle Objekte in der Welt die angegebene Zeitspanne verstreichen
+	 * \param time Zeit um die in der Welt vergeht in Millisekunden
+	 */
+	void update(float time);
+
+	/**
+	 * \fn void calcBlockArray(PathfindInfo* p)
+	 * \brief Berechnet fuer die durch p spezifizierte Wegfindeaufgabe das Feld mit den blockierten Feldern
+	 * \param p Struktur mit den Daten zur Wegfindung
+	 */
+	void calcBlockArray(PathfindInfo* p);
+
+	/**
+	* \fn void setNetwork(ServerNetwork * network)
+	* \param network Zeiger auf das Netzwerk-Objekt
+	* \brief Setzt Zeiger auf das Netzwerk-Objekt
+	*/
+
+	void setNetwork(ServerNetwork * network)
+	{
+		m_network = network;
+	};
+
+
+	/**
+	 * \fn 	Region* getRegion(int rid)
+	 * \brief Gibt die Region aus
+	 * \param rid ID der Region
+	 */
+	Region* getRegion(int rid)
+	{
+		return m_regions[rid];
+	}
+
+	/**
+	 * \fn Network* getNetwork()
+	 *\return network Zeiger auf das Netzwerk-Objekt
+	 * \brief Gibt Zeiger auf das Netzwerk-Objekt aus
+	 */
+
+	Network* getNetwork()
+	{
+		return m_network;
+	}
+
+	/**
+	 * \fn Party* getParty(WorldObject::TypeInfo::Fraction frac)
+	 * \brief Gibt die Party zurueck, welche zu der angegebenen Fraktion gehoert
+	 * \param frac Fraktion eines Spielers
+	 */
+	Party* getParty(WorldObject::TypeInfo::Fraction frac)
+	{
+		return &(m_parties[frac - WorldObject::TypeInfo::FRAC_PLAYER_PARTY]);
+	}
+
+
+
+	/**
+	 * \fn Party* getEmptyParty()
+	 * \brief Gibt eine Party aus, die bisher keine Mitglieder hat
+	 */
+	Party* getEmptyParty();
+
+	/**
+	 * \fn Party::Relation getRelation(WorldObject::TypeInfo::Fraction frac, ServerWObject* wo)
+	 * \brief Gibt die Beziehung eines Lebewesens zu einer Fraktion
+	 * \param frac Fraktion
+	 * \param wo Objekt
+	 */
+	WorldObject::Relation getRelation(WorldObject::TypeInfo::Fraction frac, ServerWObject* wo);
+
+	/**
+	 * \brief Gibt die Distanz zwischen den beiden Flaechen quadriert aus
+	 * \param s1 erste Flaeche
+	 * \param s2  zweite Flaeche
+	 */
+	static float getDistance(Shape& s1, Shape& s2);
+
+
+
+	// debug only
+
+
+//Private stuff
+private:
+	//Fields
+
+	/**
+	 * \var bool m_server
+	 * \brief true, wenn der Rechner der Server ist
+	 */
+	bool m_server;
+	
+	/**
+	 * \var m_regions
+	 * \brief Speichert die Spielwelt in Form von Regionen. Eine Region ist ein rechteckiger Ausschnitt der Spielwelt
+	 */
+	Region* m_regions[WORLD_MAX_REGIONS];
+
+
+	/**
+	 * \var map<int, Trade* >* m_trades
+	 * \brief Speichert alle Handelsvorgänge
+	 */
+	map<int, Trade* >* m_trades;
+
+
+	/**
+	 * \var Party* m_parties
+	 * \brief Liste alles Parties
+	 */
+	Party* m_parties;
+
+	/**
+	 * \var m_players
+	 * Liste der Spieler in der Welt
+	 */
+	map<int,int>* m_player_slots;
+
+	/**
+	 * \var int m_max_nr_players
+	 * \brief Gibt die maximale Anzahl Spieler an
+	 */
+	int m_max_nr_players;
+
+	/**
+	 * \var Network* m_network
+	 * \brief Netzwerkanbindung
+	 */
+	Network* m_network;
+	
+	/**
+	 * \var list<int> m_logins
+	 * \brief Liste der Spieler die sich gerade einloggen wollen
+	 */
+	list<int> m_logins;
+};
+#endif //WORLD_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/worldobject.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,100 @@
+#include "worldobject.h"
+
+void WorldObject::toString(CharConv* cv)
+{
+	DEBUG5("worldobject::tostring");
+
+	cv->toBuffer((char) m_type_info.m_type);
+	char stmp[11];
+	stmp[10] = '\0';
+	strncpy(stmp,m_type_info.m_subtype.c_str(),10);
+	cv->toBuffer(stmp,10);
+	cv->toBuffer(m_id);
+	cv->toBuffer(m_geometry.m_shape.m_coordinate_x);
+	cv->toBuffer(m_geometry.m_shape.m_coordinate_y);
+	cv->toBuffer((char) m_geometry.m_shape.m_type);
+	if (m_geometry.m_shape.m_type==Shape::RECT)
+	{
+		cv->toBuffer(m_geometry.m_shape.m_extent_x);
+		cv->toBuffer(m_geometry.m_shape.m_extent_y);
+	}
+	else
+	{
+		cv->toBuffer(m_geometry.m_shape.m_radius);
+		cv->toBuffer(m_geometry.m_shape.m_radius);
+	}
+	cv->toBuffer((char) m_geometry.m_layer);
+	cv->toBuffer(m_geometry.m_angle);
+
+	
+}
+
+void WorldObject::fromString(CharConv* cv)
+{
+	short tmp;
+	char ctmp;
+	cv->fromBuffer<char>(ctmp);
+	m_type_info.m_type = (TypeInfo::ObjectType) ctmp;
+	char stmp[11];
+	stmp[10] ='\0';
+	cv->fromBuffer(stmp,10);
+	m_type_info.m_subtype = stmp;	
+	cv->fromBuffer<int>(m_id);
+	cv->fromBuffer<float>(m_geometry.m_shape.m_coordinate_x) ;
+	cv->fromBuffer<float>(m_geometry.m_shape.m_coordinate_y);
+	cv->fromBuffer<char>(ctmp);
+	m_geometry.m_shape.m_type = (Shape::ShapeType) ctmp;
+	if (m_geometry.m_shape.m_type==Shape::RECT)
+	{
+		cv->fromBuffer<float>(m_geometry.m_shape.m_extent_x);	
+		cv->fromBuffer<float>(m_geometry.m_shape.m_extent_y);
+	}
+	else
+	{
+		cv->fromBuffer<float>(m_geometry.m_shape.m_radius);
+		cv->fromBuffer<float>(m_geometry.m_shape.m_radius);
+	}
+	cv->fromBuffer<char>(ctmp);
+	m_geometry.m_layer  = (Geometry::Layer) ctmp;
+	cv->fromBuffer<float>(m_geometry.m_angle);
+	
+}
+
+string WorldObject::getName()
+{
+	/*
+	if (m_type_info.m_type==TypeInfo::TYPE_MONSTER)
+	{
+		switch (m_type_info.m_subtype)
+		{
+			case TypeInfo::SUBTYPE_GOBLIN:
+				return "Goblin";
+				break;
+		}
+		return "Monster";
+	}
+	else if (m_type_info.m_type==TypeInfo::TYPE_PLAYER)
+	{
+		return "Player";
+	}
+	else if (m_type_info.m_type==TypeInfo::TYPE_FIXED_OBJECT)
+	{
+		return "Fixed";
+	}
+	*/
+	
+	return m_type_info.m_subtype;
+}
+
+
+string WorldObject::getNameId()
+{
+	ostringstream out_stream;
+	
+	out_stream.str("");
+	out_stream << getName() << ":" << getId();
+	return out_stream.str();
+}
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/core/worldobject.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,495 @@
+/*
+	Ein kleines Rollenspiel
+	Copyright (C) 2007 Hans Wulf
+
+	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.
+*/
+
+#ifndef WORLDOBJECT_H
+#define WORLDOBJECT_H
+
+#include <string>
+#include <cstring>
+#include <sstream>
+#include "debug.h"
+#include "charconv.h"
+
+using namespace std;
+
+
+/**
+ * \file worldobject.h
+ * \defgroup worldobject \Weltobjekt
+ * \ingroup world
+ * \brief Deklaration des WorldObject
+ * \author Hans Wulf
+ * \version 1.0
+ * \date 2007/05/28
+ * \note Bietet der Welt das WorldObject an
+ */
+
+
+
+/**
+ * \struct Shape
+ * \brief Repraesentiert eine Geometrische Form, moeglich sind Rechteck und Kreis
+ */
+
+struct Shape
+{
+	/**
+	 * \enum ShapeType
+	 * \brief Typ der geometrischen Form
+	 */
+	enum ShapeType
+	{
+		RECT=1,
+		CIRCLE=2
+	};
+	/**
+	 * \var m_coordinate_x
+	 * \brief x-Koordinate des Objekts (Mittelpunkt)
+	 */
+	float m_coordinate_x;
+
+	/**
+	 * \var m_coordinate_y
+	 * \brief x-Koordinate des Objekts (Mittelpunkt)
+	 */
+	float m_coordinate_y;
+
+
+	/**
+	 * \var m_type
+	 * \brief Form des Objektes (kreis / rechteckfoermig)
+	 */
+	ShapeType m_type;
+
+	/**
+	 * \var m_extent_x
+	 * \brief Ausdehnung in x-Richtung (nur bei recheckigen Objekten verwendet)
+	 */
+	float m_extent_x;
+
+	/**
+	 * \var m_extent_y
+	 * \brief Ausdehnung in y-Richtung (nur bei recheckigen Objekten verwendet)
+	 */
+	float m_extent_y;
+
+	/**
+	 * \var m_radius
+	 * \brief Radius des Objektes ( nur bei kreisfoermigen Objekten verwendet)
+	 */
+	float m_radius;
+};
+
+/**
+ * \class WorldObject
+ * \brief ein Objekt, welches sich in der Spielwelt befindet
+ */
+class WorldObject {
+
+	public:
+
+	/**
+	 * \enum Relation
+	 * \brief Listet die verschiedenen Beziehungen zwischen Parties auf
+	 */
+	enum Relation
+	{
+		NEUTRAL = 0,
+		ALLIED = 1,
+ 		HOSTILE =2
+	};
+
+	
+	/**
+	 * \enum Group
+	 * \brief Listet verschiedene Grundtypen von Objekten auf
+	 */
+	enum Group
+	{
+		CREATURE_ONLY = 1,
+		PLAYER=2,
+		CREATURE = 3,
+  		FIXED = 4,
+  		DEAD = 8,
+  		GROUP_ALL = 15
+	};
+	
+	/**
+	* \struct WOBaseInformation
+	* \brief Beinhaltet alle grundlegenen Eigenschaften eines WorldObject.
+	*/
+	struct Geometry
+	{
+		/**
+		* \enum Layer
+		* \brief TODO
+		*/
+		enum Layer
+		{
+			LAYER_BASE =0x01,
+			LAYER_AIR = 0x02,
+			LAYER_DEAD = 0x04,
+   /*
+			LAYER_FIXED =  0x1F,
+			LAYER_CREATURE = 0x6F,
+			LAYER_MONSTER=  0x2F,
+			LAYER_PLAYER = 0x4F,
+   */
+			LAYER_ALL = 0x0F,
+   
+	//		LAYER_ALL_TYPES = 0xF0,
+			LAYER_SPECIAL = 0x10,
+		};
+
+
+		//Fields
+		/**
+		* \var m_shape
+		* \brief Form des Objektes
+		*/
+		Shape m_shape;
+
+		/**
+		* \var m_angle
+		* \brief Winkel um den das Objekt gegenueber dem Koordinatensystem gedreht ist
+		*/
+		float m_angle;
+
+		/**
+		* \var m_layer
+		* \brief Ebene in der sich das Objekt befindet
+		*/
+		short m_layer;
+	};
+
+	/**
+	 * \struct TypeInfo
+	 * \brief Enthaelt alle Informationen zum Typ eines Objektes
+	 */
+	struct TypeInfo
+	{
+		/**
+		 * \enum ObjectType
+		 * \brief Grundtypen von Objekten
+		 */
+		enum ObjectType
+		{
+			TYPE_NONE=0,
+			TYPE_PLAYER =1,
+			TYPE_MONSTER= 2,
+			TYPE_TRADER=3,
+			TYPE_FIXED_OBJECT=4
+		};
+
+		/**
+		 * \var ObjectSubtype
+		 * \brief genauere Unterteilung von Objekten
+		 */
+		typedef std::string ObjectSubtype;
+		/*
+		enum ObjectSubtype
+		{
+			SUBTYPE_NONE=0,
+
+			SUBTYPE_WARRIOR = 1,
+			SUBTYPE_ARCHER =2,
+			SUBTYPE_PRIEST = 3,
+			SUBTYPE_MAGE =4,
+
+			SUBTYPE_GOBLIN = 10,
+			SUBTYPE_GOBLIN_DOG = 11,
+			SUBTYPE_LICH = 20,
+
+			SUBTYPE_FENCE = 1000,
+			SUBTYPE_TREE = 1010,
+
+		};
+		*/
+
+		/**
+		 * \enum Category
+		 * \brief Verschiedene Kategorien von Lebewesen
+		 */
+		enum Category
+		{
+			NOCATEGORY =0,
+			HUMAN = 0x10,
+			DEMON = 0x20,
+			UNDEAD = 0x40,
+			DWARF = 0x80,
+			DRAKE = 0x100,
+			FAIRY = 0x200,
+			GOBLIN = 0x400,
+			ANIMAL = 0x800,
+			SUMMONED = 0x1000
+		};
+
+		/**
+		 * \enum Fraction
+		 * \brief Parteien fuer die Lebewesen kaempfen koennen
+		 */
+		enum Fraction
+		{
+			NOFRACTION = 0,
+			FRAC_HUMAN = 1,
+			FRAC_DEMON = 2,
+			FRAC_UNDEAD = 3,
+			FRAC_DWARF = 4,
+			FRAC_SUMMONER = 5,
+			FRAC_MONSTER = 6,
+			FRAC_HOSTILE_TO_ALL=9,
+			FRAC_PLAYER_PARTY = 10,
+		};
+
+
+
+		/**
+		* \var m_type
+		* \brief Informationen zum Objekttyp, unter anderem welcher abgeleiteten Klasse das Objekt angeh&ouml;rt
+		*/
+		ObjectType m_type;
+
+		/**
+		* \var m_subtype;
+		* \brief Gibt den Untertyp des Objektes an
+		*/
+		ObjectSubtype m_subtype;
+
+		/**
+		 * \var Category m_category
+		 * \brief Kategorie des Objektes
+		 */
+		Category m_category;
+
+		/**
+		 * \var Fraction m_fraction
+		 * \brief Fraktion des Objektes
+		 */
+		Fraction m_fraction;
+
+	};
+
+	/**
+	 * \struct MoveInfo
+	 * \brief Informationen zum aktuelle Bewegungszustand eines Objektes
+	 */
+	struct MoveInfo
+	{
+			/**
+		* \var m_speed_x
+		* \brief TODO
+			*/
+		float m_speed_x;
+
+		/**
+		* \var m_speed_y
+		* \brief TODO
+		*/
+		float m_speed_y;
+	};
+
+	/**
+	 * \enum State
+	 * \brief zaehlt Zustaende von Objekten auf
+	 */
+	enum State
+	{
+			STATE_INACTIVE=0,
+			STATE_ACTIVE =1,
+			STATE_DIEING =2,
+			STATE_DEAD =3,
+			STATE_REGION_ENTERED =5,
+			STATE_STATIC = 10,
+	};
+
+	/**
+	 * \enum SpecialFlags
+	 * \brief zaehlt Spezialzustaende und -eigenschaften von Objekten auf
+	 */
+	enum SpecialFlags
+	{
+		FIRESWORD = 0x1,
+		FLAMESWORD = 0x2,
+		FLAMEARMOR = 0x4,
+		DECOY = 0x8,
+		SCARE = 0x10,
+		CRIT_HITS = 0x20,
+		ICE_ARROWS = 0x40,
+		FROST_ARROWS = 0x80,
+		WIND_ARROWS = 0x100,
+		STORM_ARROWS = 0x200,
+		WIND_WALK = 0x400,
+		BURNING_RAGE = 0x800,
+		STATIC_SHIELD = 0x1000
+
+	};
+
+
+
+
+	//Fields
+	//Constructors
+	/**
+ 	 * \fn WorldObject(unsigned int id)
+	 * \brief Konstruktor
+	 * \param world World Objekt, in dem sich das neue WorldObject befindet
+	 * \param id ID des WorlObject
+	 *
+	 * Erstellt ein neues WorldObject
+	 */
+	WorldObject(int id)
+	{
+		m_id = id;
+		m_state = STATE_ACTIVE;
+	}
+
+
+	/**
+	 * \fn virtual ~WorldObject()
+	 * \brief Destruktor
+	 */
+	virtual ~WorldObject()
+	{
+	}
+
+	//Accessor Methods
+    /**
+	 * \fn void setSubType(TypeInfo::ObjectSubtype t)
+	 * \brief Setzt den Subtyp des Objektes
+	 * \param t neuer Subtyp
+	 */
+    void setSubType(TypeInfo::ObjectSubtype t)
+    {
+        m_type_info.m_subtype =t;
+    }
+
+
+	/**
+	 * \fn Geometry* getGeometry()
+	 * \brief Gibt einen Zeiger auf die Struktur mit den Basisinformationen zurueck
+	 * \return Zeiger auf die Struktur
+	 */
+	Geometry* getGeometry()
+	{
+		return &m_geometry;
+	}
+
+	/**
+	 * \fn TypeInfo* getTypeInfo()
+	 * \brief Gibt einen Zeiger auf die Struktur mit den Typinformationen zurueck
+	 * \return Zeiger auf die Struktur
+	 */
+	TypeInfo* getTypeInfo()
+	{
+		return &m_type_info;
+	}
+
+	/**
+	 * \fn State getState()
+	 * \brief Gibt den aktuellen Status des Objektes aus
+	 * \return Status des Objektes
+	 */
+	State getState()
+	{
+		return m_state;
+	}
+
+	/**
+	 * \fn void setState(State s)
+	 * \brief Setzt den Status
+	 * \param s Status
+	 */
+	void setState(State s)
+	{
+		m_state = s;
+	}
+
+	/**
+	 * \fn int getId()
+	 * \brief Gibt die ID des objektes zurueck
+	 * \return ID
+	 */
+	int getId()
+	{
+		return m_id;
+	}
+
+	/**
+	 * \fn void toString(CharConv* cv)
+	 * \brief Konvertiert das Objekt in einen String und schreibt ihn in der Puffer
+	 * \param buf Ausgabepuffer
+	 * \return Zeiger hinter den beschriebenen Datenbereich
+	 */
+	virtual void toString(CharConv* cv);
+
+
+	/**
+	 * \fn void fromString(char* buf)
+	 * \brief Erzeugt das Objekt aus einem String
+	 * \param buf Objekt als String
+	 * \return Zeiger hinter den gelesenen Datenbereich
+	 */
+	virtual void fromString(CharConv* cv);
+
+	/**
+	 * \fn String getName()
+	 * \brief Gibt den Name des Objektes aus
+	 */
+	virtual string getName();
+
+
+	/**
+	 * \fn String getNameId()
+	 * \brief Gibt Name mit angehaengter ID aus
+	 */
+	string getNameId();
+
+
+//Private stuff
+private:
+
+	/**
+	 * \var m_base_info
+	 * \brief Beinhaltet alle zur Geometrie Objekt
+	 */
+	Geometry m_geometry;
+
+	/**
+	 * \var WOTypeInfo m_type_info
+	 * \brief Beeinhaltet alle Informationen zum Typ des Objektes
+	 */
+	TypeInfo m_type_info;
+
+	/**
+	 * \var m_state;
+	 * \brief Gibt den Status des Objekts an
+	 */
+	State m_state;
+
+	/**
+	 * \var m_id
+	 * \brief ID des Objekts
+	 */
+	int m_id;
+
+
+};
+
+
+#endif //WORLDOBJECT_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gl_gui/Makefile	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,56 @@
+# Debug level in build time
+# 	-1	deactivate all log messages
+# 	0	allow only error messages
+# 	1	allow also warnings
+# 	2	allow info messages
+# 	3	allow debug messages
+DEBUG_LEVEL = 5 
+
+# executable file for project
+RUN = client_app
+
+LDFLAGS =
+LOADLIBES =
+LIBS = OIS RakNet
+LDLIBS = `pkg-config  $(LIBS) --libs`
+LDLIBS += -lm -lrt  -lGL -lglut
+#LDLIBS += -L../../server/trunk
+
+CFLAGS = -m32 -O3
+CXXFLAGS = $(CFLAGS) 
+CXXFLAGS += `pkg-config  $(LIBS) --cflags`
+#CXXFLAGS += -I../../shared -I..
+CXXFLAGS += -DDEBUG_LEVEL=$(DEBUG_LEVEL)
+
+
+OBJS = $(shell cat ./Makefile.objs )
+DIRS = $(shell find . -mindepth 1 -maxdepth 1 -type d -not -iname .svn )
+
+build: compile $(RUN)
+
+compile: $(OBJS)
+#	@for dir in $(DIRS) ; do \
+#		cd $$dir ; \
+#		$(MAKE) $(TARGET) ; \
+#		cd .. ; \
+#	done
+
+link: compile
+	$(CXX) $(CXXFLAGS) -o $(RUN) $(OBJS) $(LDLIBS)
+
+
+$(RUN): link
+	
+	
+run: $(RUN)
+	./$(RUN)
+
+%.o : %.c
+	$(CC) $(CFLAGS) -o $@ -c $<
+
+%.o : %.cpp
+	$(CXX) $(CXXFLAGS) -o $@ -c $<
+
+clean:	
+	rm -f $(OBJS) $(RUN)
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gl_gui/Makefile.objs	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,17 @@
+../document.o
+../../shared/action.o
+../../shared/worldobject.o
+../../shared/networkstruct.o
+../../shared/projectile.o
+../../shared/party.o
+../../shared/debug.o
+../../shared/itemlist.o
+../../shared/item.o
+../../shared/dropitem.o
+../../shared/serveritem.o
+../../shared/damage.o
+../clientnetwork.o
+../clientwobject.o
+../clientmplayer.o
+main.o
+window_main_gl.o
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gl_gui/config	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,2 @@
+127.0.0.1
+134.109.114.56
\ No newline at end of file
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gl_gui/main.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,67 @@
+/*
+	Summoning Wars - main.cpp
+	Copyright (C) 2007  Michael Kempf
+
+	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/>.
+*/
+
+
+#include "window_main_gl.h"
+
+
+
+Document* global_doc=NULL;
+
+
+int main (int argc, char *argv[])
+{
+
+    WindowMain* win_main = NULL;
+
+	string save;
+	if (argc>=2)
+	{
+		save = argv[1];
+	}
+	else
+	{
+		save = "../save/warrior.sav";
+	}
+
+	// Globales Document anlegen
+	global_doc = new Document(Document::GL_GUI);
+	global_doc->setSaveFile(save);
+	global_doc->serverConnect();
+
+	//Gtk::Main mn( argc,argv );
+	//Gtk::GL::init( argc,argv );
+
+
+
+	if ( true )
+	{
+		//win_main=new WindowMain(global_doc);
+		win_main=new WindowMain();
+
+		DEBUG("starting main window");
+
+		//Gtk::Main::run( *win_main );
+
+		delete win_main;
+	}
+
+	delete global_doc;
+
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gl_gui/window_main_gl.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,722 @@
+#include "window_main_gl.h"
+
+
+extern Document* global_doc;
+
+void WindowMain::ReshapeFunc (int w, int h) {
+	glMatrixMode (GL_PROJECTION);
+	glLoadIdentity ();
+	gluPerspective (45, (double)w/(double)h, 1, 2000);
+	glViewport (0, 0, w, h);
+	glMatrixMode (GL_MODELVIEW);	// Sicherheit halber
+	glLoadIdentity ();				// Modelierungsmatrix einstellen
+}
+
+void WindowMain::SetCamera() {
+
+	//gluLookAt (0,0,1.2*FIELD_DIM, 0,0,0, 0, 1, 0);
+	glMatrixMode( GL_PROJECTION  );
+	glLoadIdentity();
+	gluOrtho2D( -9, 9, -5, 5);
+}
+
+void WindowMain::KeyboardUpFunc (unsigned char key, int x, int y)
+{
+	DEBUG5("key up %i",key);
+
+			// shift
+	if (key == 60)
+	{
+		global_doc->getGUIState()->m_shift_hold = false;
+	}
+
+
+}
+
+void WindowMain::KeyboardFunc (unsigned char key, int xin, int yin)
+{
+	DEBUG5("key down %i",key);
+
+	int n =0;
+	WorldObject::TypeInfo::ObjectSubtype i;
+	if (global_doc->getMainPlayer()!=0)
+		i = global_doc->getMainPlayer()->getTypeInfo()->m_subtype;
+
+	if (i=="warrior")
+		n=32;
+	if (i=="mage")
+		n=96;
+	if (i=="archer")
+		n=64;
+	if (i=="priest")
+		n=128;
+
+	if (key >=97 && key < 123)
+	{
+
+		global_doc->setLeftAction((Action::ActionType) (key - 97+n));
+	}
+
+	if (key >=65 && key < 90)
+	{
+		global_doc->setRightAction((Action::ActionType) (key - 65+n));
+	}
+
+	if (key >=49 && key <59)
+	{
+		global_doc->setLeftAction((Action::ActionType) (key -49+4));
+	}
+
+
+	// shift
+	if (key == 60)
+	{
+		global_doc->getGUIState()->m_shift_hold = true;
+	}
+
+
+
+	if (key == 43)
+	{
+		global_doc ->Document::onButtonPartyAccept(0);
+	}
+
+	// ESC
+	if (key == 27)
+	{
+		global_doc ->onKeyPress(OIS::KC_ESCAPE);
+	}
+
+}
+
+void WindowMain::SpecialKeyboardUpFunc (int key, int x, int y)
+{
+
+}
+
+void WindowMain::SpecialKeyboardFunc (int key, int x, int y)
+{
+	DEBUG5("skey down %i",key);
+	// F1-F4 - Party management
+	if (key >=1 && key <= 4)
+	{
+		global_doc ->Document::onButtonPartyApply(key - 1);
+	}
+
+}
+
+void WindowMain::TimerFunc(int dummy)
+{
+	if (global_doc->getState() == Document::SHUTDOWN)
+		exit(0);
+	
+	global_doc->update();
+
+	glutTimerFunc(25,TimerFunc,0);
+	glutPostRedisplay();
+}
+
+void WindowMain::MouseFunc (int button, int state, int xin, int yin)
+{
+	DEBUG5("mouse %i  %i %i",button,xin,yin);
+
+	float x=xin,y=yin;
+
+	// Transformieren der Koordinaten
+	float fielddim = 50;
+	float  x_dim = 9;
+	float y_dim = 5;
+	x=(x/fielddim)-x_dim;
+	y=y_dim-(y/fielddim);
+	if (state == GLUT_DOWN)
+	{
+		if (button==0)
+		{
+
+			global_doc->getGUIState()->m_left_mouse_hold=true;
+			global_doc->onLeftMouseButtonClick(x, y);
+
+			DEBUG5("Left Button press");
+		}
+
+
+		if (button==2)
+		{
+			global_doc->getGUIState()->m_right_mouse_hold=true;
+			global_doc->onRightMouseButtonClick(x, y);
+
+			DEBUG5("right Button press");
+
+		}
+	}
+	else
+	{
+		if (button==0)
+		{
+			DEBUG5("Button release");
+			global_doc->getGUIState()->m_left_mouse_hold=false;
+			global_doc->getGUIState()->m_clicked_object_id=0;
+		}
+
+		if (button==2)
+		{
+			DEBUG5("Right Button release");
+			global_doc->getGUIState()->m_right_mouse_hold=false;
+			global_doc->getGUIState()->m_clicked_object_id=0;
+		}
+	}
+}
+
+WindowMain::WindowMain()
+{
+	int i=0;
+	glutInit (&i,0);
+	glutInitWindowSize (900,500);
+	glutInitWindowPosition (0,0);
+	glutInitDisplayMode (GLUT_RGBA|GLUT_DEPTH|GLUT_DOUBLE);
+	glutCreateWindow ("test");
+
+	// OpenGL Initialisierungen
+	glEnable (GL_DEPTH_TEST);
+
+
+	// Callback funktion
+	glutDisplayFunc (DisplayFunc);
+	glutReshapeFunc (ReshapeFunc);
+	glutMouseFunc (MouseFunc);
+	glutKeyboardFunc (KeyboardFunc);
+	glutSpecialFunc (SpecialKeyboardFunc);
+	glutKeyboardUpFunc(KeyboardUpFunc);
+	glutSpecialUpFunc(SpecialKeyboardUpFunc);
+	glutIgnoreKeyRepeat(1);
+
+	glutTimerFunc(25,TimerFunc,0);
+
+	// Die Hauptschleife
+	glutMainLoop ();
+
+}
+
+void WindowMain::DisplayFunc ()
+{
+	SetCamera();
+
+	// Buffer neu initialisieren
+	glMatrixMode (GL_MODELVIEW);
+	glClear (GL_COLOR_BUFFER_BIT | GL_DEPTH_BUFFER_BIT);
+	glLoadIdentity ();
+
+
+	static std::map<int,ClientWObject*>::iterator i;
+
+	static float x = 0;
+	static float y = 0;
+	float cx,cy,ex,ey,r;
+
+
+	glDisable(GL_BLEND);
+
+	if (global_doc->getMainPlayer()==0)
+	{
+		glFlush ();				// Daten an Server (fuer die Darstellung)
+							// schicken
+		glutSwapBuffers();		// Buffers wechseln
+		return;
+	}
+
+
+	// Daten sperren
+	global_doc->lock();
+
+
+	x = global_doc->getMainPlayer()->getGeometry()->m_shape.m_coordinate_x;
+	y = global_doc->getMainPlayer()->getGeometry()->m_shape.m_coordinate_y;
+
+
+
+	int action_idx ;
+	ClientWObject* cwo;
+	WorldObject* wo;
+
+	float c[3];
+
+
+	Matrix2d<char>* mat = global_doc->getRegionData()->m_tiles;
+	int dimx = global_doc->getRegionData()->m_dimx;
+	int dimy = global_doc->getRegionData()->m_dimy;
+	for (int i = max(0,(int) x/2-5);i<= min((int) x/2+5,2*dimx-1);i++)
+	{
+		for (int j = max(0,(int) y/2-4);j<= min((int) x/2+4,2*dimy-1);j++)
+		{
+			if (*(mat->ind(i,j)) == 0)
+			{
+				continue;
+			}
+
+			switch(*(mat->ind(i,j)))
+			{
+				case TILE_GRASS:
+					c[0]=0;c[1]=0.4;c[2]=0;
+					break;
+
+				case TILE_CAVE:
+					c[0]=0.4;c[1]=0.2;c[2]=0;
+					break;
+
+				case TILE_WATER:
+					c[0]=0;c[1]=0;c[2]=0.6;
+					break;
+
+
+
+			}
+
+
+			glPushMatrix();
+			glTranslatef(i*2-x,j*2-y,0);
+
+			glColor3f(c[0],c[1],c[2]);
+
+			glBegin(GL_QUADS);
+			glVertex3f(0,0,0);
+			glVertex3f(0,2,0);
+			glVertex3f(2,2,0);
+			glVertex3f(2,0,0);
+
+			glEnd();
+
+			glPopMatrix();
+
+		}
+
+	}
+
+
+	map<int,WorldObject*>::iterator it;
+	map<int,WorldObject*>* stat_objs = (global_doc->getRegionData()->m_static_objects);
+
+	for (it = stat_objs->begin(); it !=stat_objs->end();++it)
+	{
+		glPushMatrix();
+
+		wo = it->second;
+
+		cx = wo->getGeometry()->m_shape.m_coordinate_x;
+		cy = wo->getGeometry()->m_shape.m_coordinate_y;
+
+		glTranslatef(cx-x,cy-y,0);
+		glRotatef( wo->getGeometry()->m_angle*180/3.141,0,0,1);
+		if (wo->getGeometry()->m_angle !=0)
+		{
+			DEBUG5("angle %f",wo->getGeometry()->m_angle);
+		}
+		glColor3f(0,0,1);
+
+		if (wo->getGeometry()->m_shape.m_type == Shape::RECT)
+		{
+
+
+			ex = wo->getGeometry()->m_shape.m_extent_x;
+			ey = wo->getGeometry()->m_shape.m_extent_y;
+
+
+			glBegin(GL_QUADS);
+			glVertex3f(-ex,-ey,0.05);
+			glVertex3f(+ex,-ey,0.05);
+			glVertex3f(+ex,+ey,0.05);
+			glVertex3f(-ex,+ey,0.05);
+
+			glEnd();
+		}
+
+		if (wo->getGeometry()->m_shape.m_type == Shape::CIRCLE)
+		{
+
+			r = wo->getGeometry()->m_shape.m_radius;
+
+			glBegin(GL_TRIANGLE_FAN);
+			glVertex3f(0, 0,0);
+
+			for (float a=0;a<= 2 *3.2;a+=0.103)
+			{
+				glVertex3f(cos(a)*r, sin(a)*r,0.05);
+			}
+			glEnd();
+		}
+
+		glPopMatrix();
+	}
+
+	for (i = global_doc->getObjects()->begin(); i != global_doc->getObjects()->end(); ++i)
+	{
+		glPushMatrix();
+
+		cwo = i->second;
+		//DEBUG("displaying obj %i",cwo->getId());
+		c[0]=0;
+		c[1]=0;
+		c[2]=0;
+
+		cx = cwo->getGeometry()->m_shape.m_coordinate_x;
+		cy = cwo->getGeometry()->m_shape.m_coordinate_y;
+
+		glTranslatef(cx-x,cy-y,0);
+		glRotatef( cwo->getGeometry()->m_angle*180/3.141,0,0,1);
+		if (wo->getGeometry()->m_angle !=0)
+		{
+			DEBUG5("angle %f",cwo->getGeometry()->m_angle);
+		}
+
+		switch( cwo->getTypeInfo()->m_type )
+		{
+			case WorldObject::TypeInfo::TYPE_PLAYER:
+				if ( cwo->getTypeInfo()->m_subtype == "warrior" )
+				{
+					c[1]=1;
+				}
+				else if ( cwo->getTypeInfo()->m_subtype == "mage" )
+				{
+					c[1]=0.7;c[2]=0.5;
+				}
+				else if ( cwo->getTypeInfo()->m_subtype == "archer" )
+				{
+					c[1]=1;c[2]=0.5;c[0]=0.5;
+				}
+				else if ( cwo->getTypeInfo()->m_subtype == "priest" )
+				{
+					c[1]=1;c[2]=0;c[0]=0.5;
+				}
+
+				break;
+
+			case WorldObject::TypeInfo::TYPE_MONSTER:
+				c[0]=1;
+				break;
+
+			case WorldObject::TypeInfo::TYPE_FIXED_OBJECT:
+				c[2]=1;
+
+			default:
+
+				break;
+		}
+		glColor3f(c[0],c[1],c[2]);
+		if (cwo->getGeometry()->m_shape.m_type == Shape::RECT)
+		{
+
+
+			ex = cwo->getGeometry()->m_shape.m_extent_x;
+			ey = cwo->getGeometry()->m_shape.m_extent_y;
+
+
+			glBegin(GL_QUADS);
+			glVertex3f(-ex,-ey,0.05);
+			glVertex3f(+ex,-ey,0.05);
+			glVertex3f(+ex,+ey,0.05);
+			glVertex3f(-ex,+ey,0.05);
+
+			glEnd();
+		}
+
+		if (cwo->getGeometry()->m_shape.m_type == Shape::CIRCLE)
+		{
+
+			r = cwo->getGeometry()->m_shape.m_radius;
+
+			glBegin(GL_TRIANGLE_FAN);
+			glVertex3f(0, 0, 0.05);
+
+			for (float a=0;a<= 2 *3.2;a+=0.103)
+			{
+				glVertex3f(cos(a)*r, sin(a)*r,0.05);
+			}
+			glEnd();
+
+			if (cwo->getTypeInfo()->m_type != WorldObject::TypeInfo::TYPE_FIXED_OBJECT)
+			{
+				glColor3f(0,0,0);
+				glBegin(GL_QUADS);
+				glVertex3f(-0.8*r,-0.2*r,0.1);
+				glVertex3f(+0.8*r,-0.2*r,0.1);
+				glVertex3f(+0.8*r,+0.2*r,0.1);
+				glVertex3f(-0.8*r,+0.2*r,0.1);
+				glEnd();
+
+
+				DEBUG5("health percent %f",cwo->m_health_perc);
+				float p = cwo->m_health_perc;
+				if (p<=0)
+					p=0;
+				glColor3f(c[0],c[1],c[2]);
+				glBegin(GL_QUADS);
+				glVertex3f(-0.8*r,-0.2*r,0.2);
+				glVertex3f(-0.8*r+p*1.6*r,-0.2*r,0.2);
+				glVertex3f(-0.8*r+p*1.6*r,+0.2*r,0.2);
+				glVertex3f(-0.8*r,+0.2*r,0.2);
+
+				glEnd();
+
+				if (cwo->m_status_mods & 1)
+				{
+					glColor3f(1,1,1);
+					glBegin(GL_QUADS);
+					glVertex3f(-0.6*r,+0.6*r,0.2);
+					glVertex3f(-0.3*r,+0.6*r,0.2);
+					glVertex3f(-0.3*r,+0.3*r,0.2);
+					glVertex3f(-0.6*r,+0.3*r,0.2);
+
+					glEnd();
+				}
+
+				if (cwo->m_status_mods & 2)
+				{
+					glColor3f(0,0.6,0);
+					glBegin(GL_QUADS);
+					glVertex3f(-0.3*r,+0.6*r,0.2);
+					glVertex3f(-0.0*r,+0.6*r,0.2);
+					glVertex3f(-0.0*r,+0.3*r,0.2);
+					glVertex3f(-0.3*r,+0.3*r,0.2);
+
+					glEnd();
+				}
+
+				if (cwo->m_status_mods & 4)
+				{
+					glColor3f(0.7,0,0);
+					glBegin(GL_QUADS);
+					glVertex3f(+0.3*r,+0.6*r,0.2);
+					glVertex3f(-0.0*r,+0.6*r,0.2);
+					glVertex3f(-0.0*r,+0.3*r,0.2);
+					glVertex3f(+0.3*r,+0.3*r,0.2);
+
+					glEnd();
+				}
+
+				if (cwo->m_status_mods & 8)
+				{
+					glColor3f(0.5,0.5,0.5);
+					glBegin(GL_QUADS);
+					glVertex3f(+0.3*r,+0.6*r,0.2);
+					glVertex3f(+0.6*r,+0.6*r,0.2);
+					glVertex3f(+0.6*r,+0.3*r,0.2);
+					glVertex3f(+0.3*r,+0.3*r,0.2);
+
+					glEnd();
+				}
+
+				if (cwo->m_status_mods & 16)
+				{
+					glColor3f(0.7,0,0.7);
+					glBegin(GL_QUADS);
+					glVertex3f(-0.3*r,-0.6*r,0.2);
+					glVertex3f(-0.6*r,-0.6*r,0.2);
+					glVertex3f(-0.6*r,-0.3*r,0.2);
+					glVertex3f(-0.3*r,-0.3*r,0.2);
+
+					glEnd();
+				}
+
+				if (cwo->m_status_mods & 32)
+				{
+					glColor3f(1,1,0);
+					glBegin(GL_QUADS);
+					glVertex3f(-0.3*r,-0.6*r,0.2);
+					glVertex3f(-0.0*r,-0.6*r,0.2);
+					glVertex3f(-0.0*r,-0.3*r,0.2);
+					glVertex3f(-0.3*r,-0.3*r,0.2);
+
+					glEnd();
+				}
+
+				if (cwo->m_status_mods & 64)
+				{
+					glColor3f(0.6,0.6,1);
+					glBegin(GL_QUADS);
+					glVertex3f(+0.3*r,-0.6*r,0.2);
+					glVertex3f(-0.0*r,-0.6*r,0.2);
+					glVertex3f(-0.0*r,-0.3*r,0.2);
+					glVertex3f(+0.3*r,-0.3*r,0.2);
+
+					glEnd();
+				}
+
+				if (cwo->m_status_mods & 128)
+				{
+					glColor3f(1,0.8,0.3);
+					glBegin(GL_QUADS);
+					glVertex3f(+0.3*r,-0.6*r,0.2);
+					glVertex3f(0.6*r,-0.6*r,0.2);
+					glVertex3f(0.6*r,-0.3*r,0.2);
+					glVertex3f(+0.3*r,-0.3*r,0.2);
+
+					glEnd();
+				}
+			}
+
+
+
+
+		}
+		glPopMatrix();
+
+
+	}
+
+	map<int,Projectile*>::iterator i2;
+	Projectile* pr;
+	for (i2=global_doc->getProjectiles()->begin(); i2 != global_doc->getProjectiles()->end(); ++i2)
+	{
+		pr = (i2->second);
+		glPushMatrix();
+		c[0]=0;
+		c[1]=0;
+		c[2]=0;
+
+		cx = pr->getGeometry()->m_coordinate_x;
+		cy = pr->getGeometry()->m_coordinate_y;
+		r = pr->getGeometry()->m_radius;
+		DEBUG5("draw projectile %f %f %f",cx,cy,r);
+
+		glTranslatef(cx-x,cy-y,0);
+
+		switch (pr->getType())
+		{
+			case Projectile::MAGIC_ARROW:
+				c[0]=1;c[1]= 0.5;
+				break;
+
+			case Projectile::FIRE_BOLT:
+			case Projectile::FIRE_WAVE:
+			case Projectile::FIRE_BALL:
+			case Projectile::FIRE_WALL:
+			case Projectile::FIRE_ARROW:
+			case Projectile::FIRE_EXPLOSION:
+			case Projectile::EXPLOSION:
+				c[0]=1;c[1]= 0.2;
+				break;
+
+			case Projectile::ICE_BOLT:
+			case Projectile::ICE_RING:
+			case Projectile::FREEZE:
+			case Projectile::BLIZZARD:
+			case Projectile::ICE_ARROW:
+			case Projectile::ICE_EXPLOSION:
+
+				c[0]=0.6;c[1]= 0.6;c[2]=1;
+				break;
+
+			case Projectile::LIGHTNING:
+			case Projectile::THUNDERSTORM:
+			case Projectile::CHAIN_LIGHTNING:
+			case Projectile::WIND_EXPLOSION:
+			case Projectile::WIND_ARROW:
+				c[0]=1;c[1]= 1;c[2]=0.6;
+				break;
+
+			case Projectile::ARROW:
+				c[0]=0.7;c[1]=0;c[2]=0;
+				break;
+			case Projectile::GUIDED_ARROW:
+				c[0]=1;c[1]=1;c[2]=1;
+				break;
+
+			case Projectile::LIGHT_BEAM:
+				c[0]=1;c[1]=1;c[2]=1;
+				break;
+
+			case Projectile::ACID:
+				c[1]=0.6;
+				break;
+
+			case Projectile::DIVINE_BEAM:
+				c[0]=1;c[1]= 1;c[2]=0.3;
+				break;
+
+			case Projectile::HYPNOSIS:
+				c[0]=0.6;c[1]= 0.6;c[2]=0.6;
+				break;
+
+			case Projectile::ELEM_EXPLOSION:
+				c[0]=0.1;c[1]= 0.1;
+
+			case Projectile::STATIC_SHIELD:
+				c[0]=1;c[1]=1;c[2]=2;
+
+
+
+		}
+
+		glColor3f(c[0],c[1],c[2]);
+		r = pr->getGeometry()->m_radius;
+
+		if (r<0.5)
+		{
+			glBegin(GL_TRIANGLE_FAN);
+			glVertex3f(0, 0,0.6);
+
+			for (float a=0;a<= 2 *3.2;a+=0.103)
+			{
+				glVertex3f(cos(a)*r, sin(a)*r,0.6);
+			}
+			glEnd();
+		}
+		else
+		{
+			glBegin(GL_QUADS);
+			{
+				for (float a=0;a<= 2 *3.2;a+=0.1/r)
+				{
+					glVertex3f(cos(a)*r, sin(a)*r,+0.6);
+					glVertex3f(cos(a+0.1/r)*r, sin(a+0.1/r)*r,+0.6);
+
+					glVertex3f(cos(a+0.1/r)*(r-0.5), sin(a+0.1/r)*(r-0.5),+0.6);
+					glVertex3f(cos(a)*(r-0.5), sin(a)*(r-0.5),+0.6);
+
+
+				}
+			}
+			glEnd();
+		}
+		glPopMatrix();
+	}
+
+
+	r=0.5;
+	glPushMatrix();
+	glTranslatef(-8,-4,0);
+
+	glColor3f(1,1,1);
+	glBegin(GL_TRIANGLE_FAN);
+	glVertex3f(0, 0,0.8);
+
+	for (float a=0;a<=(1-global_doc->getMainPlayer()->m_timer1_perc)*6.3;a+=0.1)
+	{
+		glVertex3f(cos(a)*r, sin(a)*r,0.8);
+	}
+	glEnd();
+	glPopMatrix();
+
+
+	glPushMatrix();
+	glTranslatef(8,-4,0);
+
+	glColor3f(1,1,1);
+	glBegin(GL_TRIANGLE_FAN);
+	glVertex3f(0, 0,0.8);
+
+	for (float a=0;a<=(1-global_doc->getMainPlayer()->m_timer2_perc)*6.3;a+=0.1)
+	{
+		glVertex3f(cos(a)*r, sin(a)*r,0.8);
+	}
+	glEnd();
+	glPopMatrix();
+
+
+	// Daten entsperren
+	global_doc->unlock();
+
+	glFlush ();				// Daten an Server (fuer die Darstellung)
+							// schicken
+	glutSwapBuffers();		// Buffers wechseln
+
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gl_gui/window_main_gl.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,35 @@
+#ifndef WINMAIN_H
+#define WINMAIN_H
+
+class WindowMain
+{
+	public:
+
+
+	WindowMain();
+	~WindowMain(){}
+
+	static void DisplayFunc ();
+	static void ReshapeFunc (int,int);
+	static void MouseFunc (int,int,int,int);
+	static void SetCamera();
+	static void KeyboardFunc (unsigned char,int,int);
+	static void KeyboardUpFunc (unsigned char,int,int);
+	static void SpecialKeyboardUpFunc (int key, int x, int y);
+	static void SpecialKeyboardFunc (int key, int x, int y);
+	static void TimerFunc(int dummy);
+
+
+};
+
+#pragma message("WinMain definiert")
+
+#include <GL/glut.h>
+#include "../document.h"
+
+#include <stdlib.h>
+#include <math.h>
+
+#pragma message("header ende")
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gui/Makefile	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,56 @@
+# Debug level in build time
+# 	-1	deactivate all log messages
+# 	0	allow only error messages
+# 	1	allow also warnings
+# 	2	allow info messages
+# 	3	allow debug messages
+DEBUG_LEVEL = 5 
+
+# executable file for project
+RUN = client_app
+
+LDFLAGS =
+LOADLIBES =
+LIBS = OGRE OIS CEGUI CEGUI-OGRE RakNet
+LDLIBS = `pkg-config  $(LIBS) --libs`
+LDLIBS += -lm -lrt  -lGL -lglut
+#LDLIBS += -L../../server/trunk
+
+CFLAGS = -m32 -O3
+CXXFLAGS = $(CFLAGS) 
+CXXFLAGS += `pkg-config  $(LIBS) --cflags`
+#CXXFLAGS += -I../shared
+CXXFLAGS += -DDEBUG_LEVEL=$(DEBUG_LEVEL)
+
+
+OBJS = $(shell cat ./Makefile.objs )
+DIRS = $(shell find . -mindepth 1 -maxdepth 1 -type d -not -iname .svn )
+
+build: compile $(RUN)
+
+compile: $(OBJS)
+#	@for dir in $(DIRS) ; do \
+#		cd $$dir ; \
+#		$(MAKE) $(TARGET) ; \
+#		cd .. ; \
+#	done
+
+link: compile
+	$(CXX) $(CXXFLAGS) -o $(RUN) $(OBJS) $(LDLIBS)
+
+
+$(RUN): link
+	
+	
+run: $(RUN)
+	./$(RUN)
+
+%.o : %.c
+	$(CC) $(CFLAGS) -o $@ -c $<
+
+%.o : %.cpp
+	$(CXX) $(CXXFLAGS) -o $@ -c $<
+
+clean:	
+	rm -f $(OBJS) $(RUN)
+	
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gui/Makefile.objs	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,20 @@
+document.o
+../shared/action.o
+../shared/worldobject.o
+../shared/networkstruct.o
+../shared/projectile.o
+../shared/party.o
+../shared/debug.o
+../shared/itemlist.o
+../shared/item.o
+../shared/dropitem.o
+clientnetwork.o
+clientwobject.o
+clientmplayer.o
+main_gui.o
+client.o
+mainwindow.o
+numberedwindow.o
+../shared/serveritem.o
+../shared/damage.o
+scene.o
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gui/client.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,394 @@
+#include "client.h"
+
+Client::Client()
+{
+	// Anwendung initialisieren
+	bool ret = init();
+
+	if (ret == false)
+	{
+		// ERRORMSG("Initialisation failed, stop");
+		m_shutdown = true;
+	}
+
+}
+
+bool Client::init()
+{
+	bool ret = true;
+
+	// Ogre Root erzeugen
+	// pluginfile: plugins.cfg
+	// configfile: keines
+	#ifdef WIN32
+        m_ogre_root = new Ogre::Root("plugins_win.cfg", "ogre.cfg");
+    #else
+        m_ogre_root = new Ogre::Root("plugins.cfg", "ogre.cfg");
+    #endif
+
+	if (m_ogre_root ==0)
+			return false;
+
+	// Ogre configurieren
+	ret = configureOgre();
+	if (ret==false)
+	{
+		 ERRORMSG("Configuring Ogre failed");
+		return false;
+	}
+
+	// Ogre initialisieren
+	ret = initOgre();
+	if (ret==false)
+	{
+		 ERRORMSG("Initialisation of Ogre failed");
+		return false;
+	}
+
+	// Ressourcen festlegen
+	ret = setupResources();
+	if (ret==false)
+	{
+		 ERRORMSG("Setting up Resources failed");
+		return false;
+	}
+
+	//Gettext initialisieren
+	ret = initGettext();
+	if (ret==false)
+	{
+		ERRORMSG("Initialisation of Gettext failed");
+		return false;
+	}
+
+
+	//CEGUI initialisieren
+	ret = initCEGUI();
+	if (ret==false)
+	{
+		 ERRORMSG("Initialisation of CEGUI failed");
+		return false;
+	}
+
+	// Document anlegen
+	ret = createDocument();
+	if (ret==false)
+	{
+		 ERRORMSG("cant create document");
+		return false;
+	}
+	// View anlegen
+	ret = createView();
+	if (ret==false)
+	{
+		 ERRORMSG("cant create view");
+		return false;
+	}
+
+	DEBUG("application initialized");
+	// debugging
+	//MyFrameListener* mfl = new MyFrameListener(m_main_window,m_document);
+	//m_ogre_root->addFrameListener(mfl);
+
+	return true;
+}
+
+
+Client::~Client()
+{
+	// dynamisch angelegte Objekte in umgekehrter Reihenfolge freigeben
+
+	printf("deleting application\n");
+	delete m_main_window;
+	delete m_document;
+	delete m_ogre_cegui_renderer;
+	delete m_ogre_root;
+}
+
+void Client::run()
+{
+	printf("started\n");
+	Ogre::Timer timer;
+	unsigned long ltime;
+	float time=0;
+	float uptime =0;
+	//m_ogre_root->startRendering();
+	float timesum=0;
+	int count=0;
+    Ogre::Timer timer2;
+
+	while (m_document->getState() != Document::SHUTDOWN)
+	{
+
+		ltime =timer.getMicroseconds ();
+		time = ltime / ( 1000000.0);
+		timer.reset();
+
+        if (time>0.025)
+       {
+            DEBUG5("frame time was %f",time*1000);
+       }
+
+		update();
+
+        ltime =timer.getMicroseconds ();
+		uptime = ltime / ( 1000000.0);
+        if (uptime>0.025)
+        {
+            DEBUG("update time was %f",time*1000);
+        }
+
+
+		// run the message pump
+		Ogre::WindowEventUtilities::messagePump();
+
+		// Document aktualisieren
+		DEBUG5("document update");
+		m_document->update(time*1000);
+		DEBUG5("done");
+
+		count ++;
+		timesum += time;
+		if (count ==100)
+		{
+			count =0;
+			timesum *=10;
+			DEBUG5("frame time is %f",timesum);
+			timesum =0;
+		}
+
+		try
+		{
+			// View aktualisieren
+			DEBUG5("main window update");
+			m_main_window->update();
+		}
+		catch (CEGUI::Exception e)
+		{
+			ERRORMSG("Error message: %s",e.getMessage().c_str());
+		}
+
+
+		//DEBUG("frame time in s %f",time);
+		m_cegui_system->injectTimePulse(time);
+
+
+		// rendern
+		DEBUG5("ogre frame");
+		timer2.reset();
+
+		m_ogre_root->renderOneFrame();
+
+		ltime =timer.getMicroseconds ();
+		time = ltime / ( 1000000.0);
+
+        if (time>0.025)
+        {
+            DEBUG5("ogre frame time was %f",time*1000);
+        }
+
+		DEBUG5("ogre frame end");
+	}
+
+	
+
+}
+
+bool Client::initOgre()
+{
+	DEBUG("init ogre");
+	// Fenster anlegen, Ogre initialisieren
+	m_window = m_ogre_root->initialise(true);
+
+	// Szenemanager anlegen
+	m_scene_manager = m_ogre_root->createSceneManager(Ogre::ST_GENERIC,"DefaultSceneManager");
+
+	return true;
+
+}
+
+bool Client::configureOgre()
+{
+	DEBUG("configure ogre");
+	// Logging nur fuer Fehlermeldungen verwenden
+	Ogre::LogManager::getSingleton().setLogDetail(Ogre::LL_LOW );
+	// Rendering System waehlen
+	// Liste aller verfuegbaren Systeme ausgeben lassen und das erste davon nehmen
+	Ogre::RenderSystemList *renderSystems = NULL;
+	Ogre::RenderSystemList::iterator r_it;
+	renderSystems = m_ogre_root->getAvailableRenderers();
+	if (renderSystems->empty())
+	{
+		// ERRORMSG("no rendering system available");
+		return false;
+	}
+	r_it = renderSystems->begin();
+	m_ogre_root->setRenderSystem(*r_it);
+
+	// config Dialog anzeigen
+	// TODO: Einstellungen direkt setzen oder aus einem File einlesen
+	bool result = true;
+	//result = m_ogre_root->showConfigDialog();
+	m_ogre_root->restoreConfig();
+	if (result == false)
+	{
+		// DEBUG("User pressed Cancel on config Dialog");
+		return false;
+	}
+
+
+	return true;
+}
+
+bool Client::setupResources()
+{
+	DEBUG("initalizing resources");
+	Ogre::ResourceGroupManager::getSingleton().addResourceLocation("../client/resources/models", "FileSystem", "General");
+	Ogre::ResourceGroupManager::getSingleton().addResourceLocation("../client/resources/materials/scripts", "FileSystem", "General");
+	Ogre::ResourceGroupManager::getSingleton().addResourceLocation("../client/resources/materials/textures", "FileSystem", "General");
+	Ogre::ResourceGroupManager::getSingleton().addResourceLocation("../client/resources/particle", "FileSystem", "General");
+
+	// CEGUI Resourcen laden
+	Ogre::ResourceGroupManager::getSingleton().addResourceLocation("../client/resources/gui/configs", "FileSystem", "GUI");
+	Ogre::ResourceGroupManager::getSingleton().addResourceLocation("../client/resources/gui/fonts", "FileSystem", "GUI");
+
+	Ogre::ResourceGroupManager::getSingleton().addResourceLocation("../client/resources/gui/imagesets", "FileSystem", "GUI");
+	Ogre::ResourceGroupManager::getSingleton().addResourceLocation("../client/resources/gui/layouts", "FileSystem", "GUI");
+	Ogre::ResourceGroupManager::getSingleton().addResourceLocation("../client/resources/gui/looknfeel", "FileSystem", "GUI");
+	Ogre::ResourceGroupManager::getSingleton().addResourceLocation("../client/resources/gui/schemes", "FileSystem", "GUI");
+
+	Ogre::ResourceGroupManager::getSingleton().addResourceLocation("../client/resources/gui/schemes", "FileSystem", "GUI");
+
+	Ogre::ResourceGroupManager::getSingleton().addResourceLocation("../client/save", "FileSystem", "Savegame");
+
+
+#if defined(WIN32)
+	Ogre::ResourceGroupManager::getSingleton().addResourceLocation("c:\\windows\\fonts", "FileSystem", "GUI");
+#endif
+
+	// Gruppen initialisieren
+	Ogre::ResourceGroupManager::getSingleton().initialiseResourceGroup("General");
+	Ogre::ResourceGroupManager::getSingleton().initialiseResourceGroup("Savegame");
+	Ogre::ResourceGroupManager::getSingleton().initialiseResourceGroup("GUI");
+
+	// Debugging: Meshes direkt anlegen
+
+	Ogre::Plane plane(Ogre::Vector3::UNIT_Y, 0);
+
+	Ogre::MeshManager::getSingleton().createPlane("Tile", Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, plane,100,100,1,1,true,1,1,1,Ogre::Vector3::UNIT_X);
+
+
+	Ogre::MeshManager::getSingleton().createPlane("Item", Ogre::ResourceGroupManager::DEFAULT_RESOURCE_GROUP_NAME, plane,25,25,1,1,true,1,1,1,Ogre::Vector3::UNIT_X);
+
+
+
+	return true;
+}
+
+bool Client::initGettext()
+{
+	DEBUG("initializing internationalisation");
+	#ifndef WIN32
+	bool result = false;
+	char * language;
+	language = getenv("LANG");
+
+	if ((language[0] == 'd' && language[1] == 'e') ||
+		(language[0] == 'e' && language[1] == 'n'))
+	{
+		result = setlocale (LC_MESSAGES, "");
+		//result = setlocale (LC_MESSAGES, "de_DE");
+	}
+	else
+	{
+		result = setlocale (LC_MESSAGES, "en");
+
+		if (!result)
+			result = setlocale (LC_MESSAGES, "en_GB");
+		if (!result)
+			result = setlocale (LC_MESSAGES, "en_US");
+		if (!result)
+			result = setlocale (LC_MESSAGES, "en_NZ");
+	}
+
+	bindtextdomain ("sumwars","../shared/translation/");
+	textdomain ("sumwars");
+	return result;
+	#endif
+	return true;
+}
+
+bool Client::initCEGUI()
+{
+	DEBUG("init CEGUI\n");
+	m_ogre_cegui_renderer = new CEGUI::OgreCEGUIRenderer(
+	m_window,							// Fenster in das CEGUi rendert
+	Ogre::RENDER_QUEUE_OVERLAY,	// Render Queue von CEGUI
+	false,								// CEGUI in der Render Queue zuerst bearbeitet
+	3000,									// max quads for the UI
+ 	m_scene_manager						// verwendeter Szenemanager
+	);
+
+	// Groesse festlegen
+	m_ogre_cegui_renderer->setDisplaySize(CEGUI::Size((int) m_window->getWidth(),(int) m_window->getHeight()));
+
+	// Basisklasse von CEGUI erzeugen
+	m_cegui_system = new CEGUI::System(m_ogre_cegui_renderer);
+
+
+	// Log level
+	CEGUI::Logger::getSingleton().setLoggingLevel(CEGUI::Informative);
+
+	// Scheme laden
+	CEGUI::SchemeManager::getSingleton().loadScheme((CEGUI::utf8*)"TaharezLook.scheme", (CEGUI::utf8*)"GUI");
+
+	// Imagesets laden
+	//CEGUI::Imageset* imgset = CEGUI::ImagesetManager::getSingleton().createImageset("test.imageset");
+	CEGUI::Imageset* imgset = CEGUI::ImagesetManager::getSingleton().createImageset("skills.imageset");
+
+	// Mauscursor setzen (evtl eher in View auslagern ? )
+	m_cegui_system->setDefaultMouseCursor((CEGUI::utf8*)"TaharezLook", (CEGUI::utf8*)"MouseArrow");
+
+	// Font setzen
+	CEGUI::FontManager::getSingleton().createFont("DejaVuSerif-8.font", (CEGUI::utf8*)"GUI");
+	m_cegui_system->setDefaultFont((CEGUI::utf8*)"DejaVuSerif-8");
+
+	// default ToolTip erzeugen
+	CEGUI::System::getSingleton().setDefaultTooltip( (CEGUI::utf8*)"TaharezLook/Tooltip" );
+	CEGUI::Tooltip* ttip = CEGUI::System::getSingleton().getDefaultTooltip();
+	ttip->setDisplayTime(0);
+
+	// eigene Factorys einfuegen
+	/*
+	CEGUI::WindowFactoryManager& win_fact_man = CEGUI::WindowFactoryManager::getSingleton();
+	NumberedWindowFactory* num_win_fac = new NumberedWindowFactory();
+	win_fact_man.addFactory(num_win_fac);
+	win_fact_man.addFalagardWindowMapping("Taharez/NumberedStaticText","NumberedWindow","TaharezLook/StaticText",win_fact_man.getMappedRendererForType ("TaharezLook/StaticText"));
+	*/
+	return true;
+}
+
+bool Client::createDocument()
+{
+	DEBUG("create document\n");
+	m_document = new Document();
+
+
+	return true;
+}
+
+bool Client::createView()
+{
+	DEBUG("create view\n");
+	m_main_window = new MainWindow(m_ogre_root, m_cegui_system,m_window,m_document);
+
+	DEBUG("done");
+	return true;
+}
+
+void  Client::update()
+{
+
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gui/client.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,198 @@
+
+#ifndef CLIENT_H
+#define CLIENT_H
+
+
+
+#include "Ogre.h"
+#include <OgreTimer.h>
+
+// needed to be able to create the CEGUI renderer interface
+#include "OgreCEGUIRenderer.h"
+
+
+// CEGUI includes
+#include "CEGUISystem.h"
+#include "CEGUIInputEvent.h"
+#include "CEGUIWindow.h"
+#include "CEGUIWindowManager.h"
+#include "CEGUISchemeManager.h"
+#include "CEGUIFontManager.h"
+#include "elements/CEGUIFrameWindow.h"
+
+#include <stdio.h>
+
+#include "mainwindow.h"
+
+
+
+/**
+ * \class Client
+ * \brief Basisklasse der Anwendung
+ */
+
+class Client
+{
+	
+	public:
+		/**
+		 * \fn Client()
+		 * \brief Konstruktor
+		 */
+		Client();
+	
+		/**
+		 * \fn ~Client()
+		 * \brief Destruktor
+		 */
+		~Client();
+		
+		/**
+		 * \fn run()
+		 * \brief Startet die Applikation
+		 */
+		void run();
+		
+		// nur zum debuggen
+		Document* getDocument()
+		{
+			return m_document;
+		}
+	
+	private:
+		// Funktionen
+		/**
+		* \fn init()
+		* \brief Initialisiert die Anwendung
+		 */
+		bool init();
+		
+		/**
+		 * \fn initOgre()
+		 * \brief Initialisiert die Ogre Rendering Engine
+		 */
+		bool initOgre();
+		
+		/**
+		 * \fn configureOgre()
+		 * \brief Konfiguriert die Ogre Rendering Engine
+		 */
+		bool configureOgre();
+		
+		/**
+		 * \fn setupResources()
+		 * \brief Stellt die Ressourcen fuer Ogre und CEGUI ein
+		 */
+		bool setupResources();
+		
+		/**
+		 * \fn initGettext()
+		 * \brief Initialisiert Gettext
+		 */
+		bool initGettext();
+		
+		/**
+		 * \fn initCEGUI()
+		 * \brief Initialisiert CEGUI
+		 */
+		bool initCEGUI();
+		
+		/**
+		 * \fn bool createView()
+		 * \brief Erzeugt die Ansichten
+		 */
+		bool createView();
+		
+		/**
+		 * \fn bool createDocument()
+		 * \brief Erzeugt das Document
+		 */
+		bool createDocument();
+		
+		/**
+		 * \fn virtual void update()
+		 * \brief Aktualisierungen
+		 */
+		virtual void update();
+		
+		// Member
+		/**
+		 * \var Ogre::Root *m_ogre_root
+		 * \brief Basisobjekt der Ogre Engine
+		 */
+		Ogre::Root *m_ogre_root;
+		
+		/**
+		 * \var CEGUI::System* m_cegui_system
+		 * \brief Basisobjekt von CEGUI
+		 */
+		CEGUI::System* m_cegui_system;
+		
+		/**
+		 * \var CEGUI::OgreCEGUIRenderer* m_ogre_cegui_renderer
+		 * \brief Objekt zum Rendern von CEGUI mittels Ogre
+		 */
+		CEGUI::OgreCEGUIRenderer* m_ogre_cegui_renderer;
+		
+		/**
+		 * \var Ogre::RenderWindow *window
+		 * \brief Fenster der Applikation
+		 */
+		Ogre::RenderWindow *m_window;
+		
+		/**
+		 * \var Ogre::SceneManager *m_scene_manager
+		 * \brief Objekt fuer das Management der Szene
+		 */
+ 		Ogre::SceneManager *m_scene_manager;
+		
+		// Kamera
+		// temporaer, wird spaeter View zugeordnet
+		Ogre::Camera *m_camera;
+		
+		/**
+		 * \var bool m_shutdown
+		 * \brief true, wenn die Anwendung beendet werden soll
+		 */
+		bool m_shutdown;
+		
+		// zum testen
+
+		//CEGUI::Window* pLayout;		// pseudo view
+		
+	protected:
+		/**
+		 * \var Document* m_document
+		 * \brief Dokument, enthaelt alle Daten fuer die Darstellung
+		 */
+		Document* m_document;
+		
+		/**
+		 * \var MainWindow* m_main_window
+		 * \brief Hauptfenster der Applikation
+		 */
+		MainWindow* m_main_window;
+		
+};
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gui/clientmplayer.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,112 @@
+#include "clientmplayer.h"
+
+ClientMPlayer::ClientMPlayer(int id) : ClientWObject(id)
+{
+	m_equipement=new Equipement(5,14,30);
+}
+
+ClientMPlayer::~ClientMPlayer()
+{
+	DEBUG5("delete m_equipement %p",m_equipement);
+	delete m_equipement;
+	DEBUG5("done");
+}
+
+void ClientMPlayer::fromString(CharConv* cv)
+{
+	ClientWObject::fromString(cv);
+	cv->fromBuffer<char>(m_level);
+	cv->fromBuffer<float>(m_max_health);
+	cv->fromBuffer<float>(m_health);
+	cv->fromBuffer<short>(m_strength);
+	cv->fromBuffer<short>(m_dexterity);
+	cv->fromBuffer<short>(m_magic_power);
+	cv->fromBuffer<short>(m_willpower);
+	cv->fromBuffer<short>(m_attribute_points);
+	
+	int i;
+	for (i=0;i<4;i++)
+		cv->fromBuffer<short>(m_resistances[i]);
+	for (i=0;i<4;i++)
+		cv->fromBuffer<short>(m_resistances_cap[i]);
+	
+	
+	cv->fromBuffer<float>(m_max_experience);
+	cv->fromBuffer<float>(m_experience);
+	cv->fromBuffer<short>(m_armor);
+	cv->fromBuffer<short>(m_block);
+	cv->fromBuffer<short>(m_attack);
+	cv->fromBuffer<short>(m_attack_speed);
+	cv->fromBuffer<float>(m_attack_range);
+	cv->fromBuffer<float>(m_power);
+	
+	m_base_damage.fromString(cv);
+	m_left_damage.fromString(cv);
+	m_right_damage.fromString(cv);
+	
+	/*
+	for (i=0;i<4;i++)
+	{
+		printf("%s %f - %f\n",Damage::getDamageTypeName((Damage::DamageType) i).c_str(),m_left_damage.m_min_damage[i],m_left_damage.m_max_damage[i]);
+		printf("%s %f - %f\n",Damage::getDamageTypeName((Damage::DamageType) i).c_str(),m_right_damage.m_min_damage[i],m_right_damage.m_max_damage[i]);		
+	}
+	*/
+	
+	m_base_damage.normalize();
+	m_left_damage.normalize();
+	m_right_damage.normalize();
+	
+	
+	
+	for (i=0;i<6;i++)
+		cv->fromBuffer<int>(m_abilities[i]);	
+	cv->fromBuffer<float>(m_timer1_perc);
+	cv->fromBuffer<float>(m_timer2_perc);
+	
+
+}
+
+bool ClientMPlayer::checkAbility(Action::ActionType at)
+{
+	if (at<0 || at >=192)
+		return false;
+	
+	int nr = at / 32;
+	int mask = 1 << (at % 32);
+		
+	if ((m_abilities[nr] & mask) !=0)
+	{
+		return true;
+	}
+	return false;
+}
+
+bool ClientMPlayer::checkAbilityLearnable(Action::ActionType at)
+{
+	if (checkAbility(at))
+	{
+		// Faehigkeit ist schon erlernt
+		return false;
+	}
+	
+	Action::ActionInfo* aci = Action::getActionInfo(at);
+	
+	if (aci->m_req_level > m_level)
+	{
+		// Levelvorraussetzung nicht erfuellt
+		return false;
+	}
+		
+	
+	for (int i=0;i<3;i++)
+	{
+		if (!checkAbility(aci->m_req_ability[i]))
+		{
+			// Faehigkeiten Vorraussetzung nicht erfuellt	
+			return false;
+		}
+	}
+	return true;
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gui/clientmplayer.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,203 @@
+#ifndef CLIENTMPLAYER_H
+#define CLIENTMPLAYER_H
+
+#include "clientwobject.h"
+#include "../shared/itemlist.h"
+#include <string>
+#include "../shared/damage.h"
+
+/**
+ * \class class ClientMPlayer
+ * \brief Klasse fuer die Spielerfigur auf Serverseite
+ */
+class ClientMPlayer : public ClientWObject
+{
+	public:
+		/**
+	 * \fn ClientMPlayer(int id)
+		 * \brief Konstruktor
+		 * \param id ID des Objektes
+		 */
+		ClientMPlayer(int id);
+		
+		/**
+		 * \fn ~ClientMPlayer()
+		 * \brief Destruktor
+		 */
+		virtual ~ClientMPlayer();
+		
+		/**
+		 * \fn void fromString(CharConv* cv)
+		 * \brief Erzeugt das Objekt aus einem String
+		 * \param buf Objekt als String
+		 * \return Zeiger hinter den gelesenen Datenbereich
+		 */
+		virtual void fromString(CharConv* cv);
+		
+		/**
+		 * \fn bool checkAbility(Action::ActionType at)
+		 * \brief Testet ob eine Faehigkeit erlernt ist
+		 */
+		bool checkAbility(Action::ActionType at);
+		
+		/**
+		 * \fn bool checkAbilityLearnable(Action::ActionType at)
+		 * \brief Testet ob eine Faehigkeit erlernbar ist
+		 */
+		bool checkAbilityLearnable(Action::ActionType at);
+		
+		/** 
+		 * \var char m_level
+		 * \brief Level des Spielers
+		 */
+		char m_level;
+		
+		/**
+		 * \var m_health
+		 * \brief aktuelle Lebenspunkte des Spielers
+		 */
+		float m_health;
+		
+		/**
+		 * \var m_max_health
+		 * \brief Maximale Lebenspunkte des Spielers
+		 */
+		float m_max_health;
+		
+		/**
+		 * \var short m_strength
+		 * \brief Staerke des Spielers
+		 */
+		short m_strength;
+		
+		/**
+		 * \var short m_dexterity
+		 * \brief Geschick des Spielers
+		 */
+		short m_dexterity;
+		
+		/**
+		 * \var short m_magic_power
+		 * \brief Magie des Spielers
+		 */
+		short m_magic_power;
+		
+		/**
+		 * \var short m_willpower
+		 * \brief Willenskraft des Spielers
+		 */
+		short m_willpower;
+		
+		/**
+		 * \var short m_attribute_points
+		 * \brief Anzahl noch zu verteilender Attributspunkte
+		 */
+		short m_attribute_points;
+		
+		/**
+		 * \var m_attack_speed
+		 * \brief gibt die Geschwindigkeit an, mit der der Spieler angreifen kann, 1000 entspricht einem Schlag pro Sekunde 
+		 */
+		short  m_attack_speed;
+		
+		/**
+		 * \var m_attack_range
+		 * \brief Gibt die Reichweite der Waffe an.
+		 */
+		float m_attack_range;
+		
+		/**
+		 * \var m_power
+		 * \brief Gibt die Durchschlagskraft an.
+		 */
+		float m_power;
+		
+		/**
+		 * \var Damage m_base_damage
+		 * \brief Schaden der mit der Basisattacke ausgeteilt wird
+		 */
+		Damage m_base_damage;
+		
+		/**
+		 * \var  Damage m_left_damage
+		 * \brief Schaden der mit der auf Linksklick ausgeloesten Faehigkeit ausgeteilt wird
+		 */
+		Damage m_left_damage;
+		
+		/**
+		 * \var Damage m_right_damage
+		 * \brief Schaden der mit der auf Rechtsklick ausgeloesten Faehigkeit ausgeteilt wird
+		 */
+		Damage m_right_damage;
+		
+		/**
+		 * \var m_resistances[4]
+		 * \brief Resistenzen des Spielers gegen die vier Schadensarten in Prozent
+		 */
+		short m_resistances[4];
+	
+		/**
+		 * \var m_resistances_cap[4]
+		 * \brief Obergrenzen fuer die Resistenzen des Spielers gegen die vier Schadensarten in Prozent
+		 */
+		short m_resistances_cap[4];
+		
+		/**
+		 * \var m_experience
+		 * \brief aktueller Erfahrungswert
+		 */
+		float m_experience;
+		
+		/**
+		 * \var m_max_experience
+		 * \brief maximaler Erfahrungswert vor Erreichen des naechsten Level
+		 */
+		float m_max_experience;
+		
+		/** \var m_armor;
+		 * \brief Ruestungswert, beeinflusst den Schaden von Angriffen
+		 */
+		short m_armor;
+	
+		/**
+		 * \var m_block;
+		 * \brief Blockwert, beeinflusst die Chance Angriffe abzuwehren
+	 	*/
+		short m_block;
+	
+	
+		/**
+		 * \var m_attack;
+		 * \brief Attackewert, beeinflusst die Chance zu treffen
+	 	*/
+		short m_attack;
+		
+		/**
+		 * \var m_abilities[6]
+		 * \brief Bitmaske die angibt, welche Fähigkeiten der Spieler benutzen kann.
+		 */
+		int m_abilities[6];
+		
+		/**
+		 * \var float m_timer1_perc
+		 * \brief Prozentsatz der Zeit von Timer1 die noch ablaufen muss
+		 */
+		float m_timer1_perc;
+		
+		/**
+		 * \var float m_timer2_perc
+		 * \brief Prozentsatz der Zeit von Timer2 die noch ablaufen muss
+		 */
+		float m_timer2_perc;
+		
+		/**
+		 * \var Equipement* m_equipement
+		 * \brief Ausruestung des Spielers
+		 */
+		Equipement* m_equipement;
+		
+};
+
+
+#endif // CLIENTMPLAYER_H
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gui/clientwobject.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,47 @@
+#include "clientwobject.h"
+
+ClientWObject::ClientWObject(int id) : WorldObject(id)
+{
+	m_health_perc =1;
+	
+}
+
+void ClientWObject::fromString(CharConv* cv)
+{
+	
+	WorldObject::fromString(cv);
+	
+	if (getTypeInfo()->m_type != TypeInfo:: TYPE_FIXED_OBJECT)
+	{
+		char tmp;
+		cv->fromBuffer<char>(tmp);
+		getTypeInfo()->m_category = (WorldObject::TypeInfo::Category) tmp;
+		cv->fromBuffer<char>(tmp);
+		getTypeInfo()->m_fraction = (WorldObject::TypeInfo::Fraction) tmp;
+		m_action.fromString(cv);
+		cv->fromBuffer<float>(m_health_perc);
+		cv->fromBuffer<char>(m_status_mods);
+		cv->fromBuffer<char>(m_effects);
+		if (getTypeInfo()->m_type == TypeInfo:: TYPE_PLAYER)
+		{
+			char name[32];
+			cv->fromBuffer(name,32);
+			name[31]=0;
+			m_name.assign(name);
+		}
+		else
+		{
+			// TODO: Name anhand Typ/ Subtyp setzen
+			m_name = WorldObject::getName();
+		}
+	}
+	else
+	{
+		m_health_perc=1;
+		m_status_mods =0;
+		m_action.m_type = Action::NOACTION;
+	}
+	//DEBUG("bytes read: %i",bp-buf);
+
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gui/clientwobject.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,111 @@
+#ifndef CLIENTWOBJECT_H
+#define CLIENTWOBJECT_H
+
+#include "../shared/worldobject.h"
+#include "../shared/action.h"
+
+/**
+ * \class ClientWObject
+ * \brief Klasse fuer ein Objekt der Spielwelt auf Clientseite
+ */
+class ClientWObject : public WorldObject
+{
+	public:
+		
+	
+	/** \fn ClientWObject(int id)
+	 * \brief Konstruktor
+	 * \param id ID des Objektes
+	 */
+	ClientWObject(int id);
+	
+	/**
+	 * \fn virtual ~ClientWObject()
+	 * \brief Destruktor
+	 */
+	virtual ~ClientWObject()
+	{
+	}
+	
+	/**
+	 * \fn Action* getAction()
+	 * \brief Gibt Zeiger auf die aktuelle Aktion zurueck
+	 * \return Aktion
+	 */
+	Action* getAction()
+	{
+		return &m_action;
+	}
+	
+	/**
+	 * \fn float getHealthPerc()
+	 * \brief Gibt Prozentsatz der Lebenspunkte von den Maximallebenspunkten aus
+	 * \return Prozentsatz Lebenspunkte
+	 */
+	float getHealthPerc()
+	{
+		return m_health_perc;
+	}
+		
+	/**
+	 * \fn char getStatusMods()
+	 * \brief Gibt die Statusveraenderungen aus
+	 * \return Statusveraenderungen
+	 */
+	char getStatusMods()
+	{
+		return m_status_mods;
+	}
+	
+	/**
+	 * \fn string getName()
+	 * 
+	 * \brief Gibt den Name des Objektes aus
+	 * \return Name
+	 */
+	string getName()
+	{
+		return m_name;
+	}
+	
+	
+	/**
+	 * \fn void fromString(CharConv* cv)
+	 * \brief Erzeugt das Objekt aus einem String
+	 * \param buf Objekt als String
+	 * \return Zeiger hinter den gelesenen Datenbereich
+	 */
+	virtual void fromString(CharConv* cv);
+	
+		/**
+	 	* \var Action m_action
+		* \brief Aktion die das Objekt gerade ausfuehrt
+		*/
+		Action m_action;
+		
+		/**
+		 * \var float m_health_perc
+		 * \brief Prozentsatz der Lebenpunkte von den maximalen Lebenspunkten
+		 */
+		float m_health_perc;
+		
+		/**
+		 * \var char m_status_mods
+		 * \brief Statusveraenderungen
+		 */
+		char m_status_mods;
+		
+		/**
+		 * \var char m_effects
+		 * \brief visuelle Effekte in Bitkodierung
+		 */
+		char m_effects;
+		
+		/**
+		 * \var std::string m_name
+		 * \brief Name des Objektes
+		 */
+		std::string m_name;
+};
+
+#endif // CLIENTWOBJECT_H
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gui/main_gui.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,56 @@
+
+#include <stdio.h>
+#include "client.h"
+
+#if defined(WIN32)
+#include "windows.h"
+
+
+INT WINAPI WinMain(HINSTANCE hInstance, HINSTANCE hPrevInstance, LPSTR lpCmdLine, int nCmdShow) {
+#else
+int main (int argc, char *argv[]) {
+#endif
+
+
+	// Applikation anlegen
+	Client* app = new Client();
+
+	// Debugging: Kommandozeilen Parameter auslesen und Savefile setzen
+	string save;
+	#ifndef WIN32
+	if (argc>=2)
+	{
+		save = argv[1];
+	}
+	else
+	{
+		save = "save/default.sav";
+	}
+	#else
+        save = "save/default.sav";
+    #endif
+	Document* doc = app->getDocument();
+	doc->setSaveFile(save);
+	doc->setState(Document::CONNECT_REQUEST);
+	doc->getGUIState()->m_sheet= Document::GAME_SCREEN;
+	doc->getGUIState()->m_shown_windows = Document::NO_WINDOWS;
+
+	// laufen lassen
+	try
+	{
+
+		app->run();
+	}
+	catch (std::exception &e)
+	{
+		ERRORMSG("Error message: %s",e.what());
+	}
+
+
+
+	// Applikation loeschen
+	delete app;
+
+	// Ende
+	return 0;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gui/mainwindow.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,3455 @@
+#include "mainwindow.h"
+
+#include <string>
+#include <sstream>
+
+using namespace std;
+
+
+MainWindow::MainWindow(Ogre::Root* ogreroot, CEGUI::System* ceguisystem,Ogre::RenderWindow* window,Document* doc)
+{
+	m_ogre_root = ogreroot;
+	m_cegui_system = ceguisystem;
+	m_window = window;
+	m_document = doc;
+	m_scene_manager = m_ogre_root->getSceneManager("DefaultSceneManager");
+
+	// Initialisieren
+	bool res = init();
+	if (res==false)
+	{
+		ERRORMSG("GUI erzeugen fehlgeschlagen");
+	}
+}
+
+bool MainWindow::init()
+{
+	bool result = true;
+
+
+	// Eingabegeraete initialisieren
+	result &= initInputs();
+
+
+	// Hauptmenue erzeugen
+	result &= setupMainMenu();
+
+	// Hauptspielfenster erzeugen
+	result &= setupGameScreen();
+
+	// Aktuelle Ebene setzen
+	CEGUI::System::getSingleton().setGUISheet(m_game_screen);
+
+
+	return result;
+
+}
+
+
+MainWindow::~MainWindow()
+{
+	m_ois->destroyInputObject(m_mouse);
+	m_ois->destroyInputObject(m_keyboard);
+	OIS::InputManager::destroyInputSystem(m_ois);
+
+	// Dynamisch angelegte Objekte loeschen
+	delete m_scene;
+}
+
+bool MainWindow::initInputs()
+{
+	DEBUG4("init inputs");
+	OIS::ParamList pl;
+	// Handle fuer das aktuelle Fenster
+	unsigned long hWnd;
+	m_window->getCustomAttribute("WINDOW", &hWnd);
+	// OIS mitteilen fuer welches Fenster die Eingaben abgefangen werden sollen
+	pl.insert(OIS::ParamList::value_type("WINDOW", Ogre::StringConverter::toString(hWnd)));
+	m_ois = OIS::InputManager::createInputSystem( pl );
+
+	// Maus initialisieren
+	m_mouse = static_cast<OIS::Mouse*>(m_ois->createInputObject( OIS::OISMouse, true ));
+	m_mouse->setEventCallback(this);
+	m_mouse->getMouseState().width = (int) m_window->getWidth();
+	m_mouse->getMouseState().height = (int) m_window->getHeight();
+
+	// Tastatur initialisieren
+	m_keyboard = static_cast<OIS::Keyboard*>(m_ois->createInputObject( OIS::OISKeyboard, true));
+	m_keyboard->setEventCallback(this);
+
+	return true;
+}
+
+bool MainWindow::setupMainMenu()
+{
+	try
+	{
+
+		DEBUG4("setup main menu");
+		// GUI Elemente erzeugen
+
+		CEGUI::WindowManager& win_mgr = CEGUI::WindowManager::getSingleton();
+
+		// Oberstes Fenster der Hauptmenue Schicht
+		m_main_menu = win_mgr.createWindow("DefaultWindow", "MainMenu");
+
+		// Rahmen fuer das Menue Savegame auswaehlen
+		CEGUI::FrameWindow* save_menu = (CEGUI::FrameWindow*) win_mgr.createWindow("TaharezLook/FrameWindow", "SavegameMenu");
+		m_main_menu->addChildWindow(save_menu);
+		save_menu->setPosition(CEGUI::UVector2(cegui_reldim(0.0f), cegui_reldim( 0.0f))); //0.0/0.8
+		save_menu->setSize(CEGUI::UVector2(cegui_reldim(0.5f), cegui_reldim( 1.0f))); //1.0/0.2
+		save_menu->setProperty("FrameEnabled","false");
+		save_menu->setProperty("TitlebarEnabled","false");
+		save_menu->setProperty("CloseButtonEnabled","false");
+
+		// Bestandteile der Kontrollleiste hinzufuegen
+		CEGUI::PushButton* btn;
+		CEGUI::Window* label;
+
+		// Label Savegame waehlen
+		label = win_mgr.createWindow("TaharezLook/StaticText", "SavegameChooseLabel");
+		save_menu->addChildWindow(label);
+		label->setProperty("FrameEnabled", "true");
+		label->setProperty("BackgroundEnabled", "true");
+		label->setPosition(CEGUI::UVector2(cegui_reldim(0.1f), cegui_reldim( 0.1f)));
+		label->setSize(CEGUI::UVector2(cegui_reldim(0.8f), cegui_reldim( 0.1f)));
+		label->setText("Savegame auswaehlen");
+
+		CEGUI::MultiColumnList* savelist = (CEGUI::MultiColumnList*) win_mgr.createWindow("TaharezLook/MultiColumnList", "SavegameList");
+		save_menu->addChildWindow(savelist);
+		savelist->setPosition(CEGUI::UVector2(cegui_reldim(0.1f), cegui_reldim( 0.2f)));
+		savelist->setSize(CEGUI::UVector2(cegui_reldim(0.8f), cegui_reldim( 0.6f)));
+
+		savelist->setSelectionMode(CEGUI::MultiColumnList::RowSingle);
+		savelist->subscribeEvent(CEGUI::MultiColumnList::EventSelectionChanged, CEGUI::Event::Subscriber(&MainWindow::onSavegameChosen, this));
+
+		savelist->addColumn("Name",0,CEGUI::UDim(0.5,0));
+		savelist->addColumn("Klasse",1,CEGUI::UDim(0.3,0));
+		savelist->addColumn("Level",2,CEGUI::UDim(0.2,0));
+
+		// Button Savegame akzeptieren
+		btn = static_cast<CEGUI::PushButton*>(win_mgr.createWindow("TaharezLook/Button", "SelectSavegameButton"));
+		save_menu->addChildWindow(btn);
+ 		btn->setPosition(CEGUI::UVector2(cegui_reldim(0.1f), cegui_reldim( 0.85f)));
+		btn->setSize(CEGUI::UVector2(cegui_reldim(0.2f), cegui_reldim( 0.10f)));
+		btn->setText("Ok");
+		btn->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&MainWindow::onSavegameSelected, this));
+		btn->setWantsMultiClickEvents(false);
+
+		// Rahmen fuer das Menue Savegame auswaehlen
+		CEGUI::FrameWindow* start_menu = (CEGUI::FrameWindow*) win_mgr.createWindow("TaharezLook/FrameWindow", "StartMenu");
+		m_main_menu->addChildWindow(start_menu);
+		start_menu->setPosition(CEGUI::UVector2(cegui_reldim(0.25f), cegui_reldim( 0.25f))); //0.0/0.8
+		start_menu->setSize(CEGUI::UVector2(cegui_reldim(0.5f), cegui_reldim( 0.5f))); //1.0/0.2
+		start_menu->setProperty("FrameEnabled","false");
+		start_menu->setProperty("TitlebarEnabled","false");
+		start_menu->setProperty("CloseButtonEnabled","false");
+
+		// Button Einzelspieler
+		btn = static_cast<CEGUI::PushButton*>(win_mgr.createWindow("TaharezLook/Button", "SinglePlayerButton"));
+		start_menu->addChildWindow(btn);
+		btn->setPosition(CEGUI::UVector2(cegui_reldim(0.1f), cegui_reldim( 0.1f)));
+		btn->setSize(CEGUI::UVector2(cegui_reldim(0.8f), cegui_reldim( 0.2f)));
+		btn->setText("Einzelspieler");
+		btn->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&MainWindow::onStartSinglePlayer, this));
+		btn->setWantsMultiClickEvents(false);
+
+		// Button Server beitreten
+		btn = static_cast<CEGUI::PushButton*>(win_mgr.createWindow("TaharezLook/Button", "ServerJoinButton"));
+		start_menu->addChildWindow(btn);
+		btn->setPosition(CEGUI::UVector2(cegui_reldim(0.1f), cegui_reldim( 0.4f)));
+		btn->setSize(CEGUI::UVector2(cegui_reldim(0.8f), cegui_reldim( 0.2f)));
+		btn->setText("Server beitreten");
+		btn->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&MainWindow::onStartMultiPlayer, this));
+		btn->setWantsMultiClickEvents(false);
+
+		// Button Server aufsetzen
+		btn = static_cast<CEGUI::PushButton*>(win_mgr.createWindow("TaharezLook/Button", "ServerHostButton"));
+		start_menu->addChildWindow(btn);
+		btn->setPosition(CEGUI::UVector2(cegui_reldim(0.1f), cegui_reldim( 0.7f)));
+		btn->setSize(CEGUI::UVector2(cegui_reldim(0.8f), cegui_reldim( 0.2f)));
+		btn->setText("Server aufsetzen");
+		btn->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&MainWindow::onStartMultiPlayerHost, this));
+		btn->setWantsMultiClickEvents(false);
+
+	// Verbinden mit dem Document
+	}
+	catch (CEGUI::Exception e)
+	{
+		ERRORMSG("Error message: %s",e.getMessage().c_str());
+	}
+	return true;
+}
+
+void MainWindow::update()
+{
+	// Eingaben abfangen
+	m_mouse->capture();
+	m_keyboard->capture();
+
+	CEGUI::WindowManager& win_mgr = CEGUI::WindowManager::getSingleton();
+
+	// Flags, welche Fenster gezeigt werden
+	int wflags = m_document->getGUIState()->m_shown_windows;
+
+
+
+	// Testen ob die Anzeige der Fenster geaendert werden muss
+	if (m_document->getModified() & Document::GUISHEET_MODIFIED)
+	{
+		if (m_document->getGUIState()->m_sheet ==  Document::MAIN_MENU)
+		{
+			updateMainMenu();
+			m_cegui_system->setGUISheet(m_main_menu);
+
+		}
+
+		if (m_document->getGUIState()->m_sheet ==  Document::GAME_SCREEN)
+		{
+			m_cegui_system->setGUISheet(m_game_screen);
+		}
+		m_document->setModified(m_document->getModified() & (~Document::GUISHEET_MODIFIED));
+	}
+
+	// Testen ob Anzeige der Subfenster geaendert werden muss
+	if (m_document->getModified() & Document::WINDOWS_MODIFIED)
+	{
+
+		DEBUG5("new shown windows %i",wflags);
+
+		// Auswahlliste Savegames  anzeigen wenn entsprechendes Flag gesetzt
+		CEGUI::FrameWindow* savelist = (CEGUI::FrameWindow*) win_mgr.getWindow("SavegameMenu");
+		if (wflags & Document::SAVEGAME_LIST)
+		{
+			savelist->setVisible(true);
+		}
+		else
+		{
+			savelist->setVisible(false);
+		}
+
+		// Menu Spielstart anzeigen wenn entsprechendes Flag gesetzt
+		CEGUI::FrameWindow* start_menu = (CEGUI::FrameWindow*) win_mgr.getWindow("StartMenu");
+		if (wflags & Document::START_MENU)
+		{
+			start_menu->setVisible(true);
+		}
+		else
+		{
+			start_menu->setVisible(false);
+		}
+
+
+		// Charinfo anzeigen wenn entsprechendes Flag gesetzt
+		CEGUI::FrameWindow* char_info = (CEGUI::FrameWindow*) win_mgr.getWindow("CharInfo");
+		if (wflags & Document::CHARINFO)
+		{
+			char_info->setVisible(true);
+		}
+		else
+		{
+			char_info->setVisible(false);
+		}
+
+		// Inventar anzeigen wenn entsprechendes Flag gesetzt
+		CEGUI::FrameWindow* inventory = (CEGUI::FrameWindow*) win_mgr.getWindow("Inventory");
+		if (wflags & Document::INVENTORY)
+		{
+			inventory->setVisible(true);
+		}
+		else
+		{
+			inventory->setVisible(false);
+		}
+
+		if (m_document->getMainPlayer()!=0)
+		{
+			// Skilltree anzeigen wenn entsprechendes Flag gesetzt
+			CEGUI::TabControl* skilltree = (CEGUI::TabControl*) win_mgr.getWindow("SkilltreeMage");
+			ClientMPlayer* player = m_document->getMainPlayer();
+
+			// Skilltree einstellen der der Spielerklasse entspricht
+			if (player->getTypeInfo()->m_subtype == "warrior")
+				skilltree = (CEGUI::TabControl*) win_mgr.getWindow("SkilltreeWarrior");
+			if (player->getTypeInfo()->m_subtype == "archer")
+				skilltree = (CEGUI::TabControl*) win_mgr.getWindow("SkilltreeArcher");
+			if (player->getTypeInfo()->m_subtype == "priest")
+				skilltree = (CEGUI::TabControl*) win_mgr.getWindow("SkilltreePriest");
+
+			if (wflags & Document::SKILLTREE)
+			{
+				skilltree->setVisible(true);
+			}
+			else
+			{
+				skilltree->setVisible(false);
+			}
+		}
+		m_document->setModified(m_document->getModified() & ~Document::WINDOWS_MODIFIED);
+	}
+
+
+	if (m_document->getModified() & Document::ITEM_MODIFIED)
+	{
+		// Tooltip fuer das Item ueber dem die Maus ist neu setzen
+		updateItemTooltip();
+		m_document->setModified(m_document->getModified() & ~Document::ITEM_MODIFIED);
+	}
+
+	if (m_document->getModified() & Document::ABILITY_MODIFIED)
+	{
+		// Tooltip fuer die Faehigkeit ueber der die Maus ist neu setzen
+		updateAbilityTooltip();
+		m_document->setModified(m_document->getModified() & ~Document::ABILITY_MODIFIED);
+	}
+
+	// Objekte aus dem Dokument darstellen
+	if (m_document->getMainPlayer()!=0)
+	{
+		// Szene aktualisieren
+		m_scene->update();
+
+		// ObjectInfo aktualisieren
+		updateObjectInfo();
+
+		if (wflags & Document::CHARINFO)
+		{
+			// Fenster CharacterInfo aktualisieren
+			updateCharInfo();
+		}
+
+
+		// Steuerleiste aktualisieren
+		updateControlPanel();
+
+
+		if (wflags & Document::INVENTORY)
+		{
+			// Fenster Inventar aktualisieren
+			updateInventory();
+		}
+		if (wflags & Document::SKILLTREE)
+		{
+			// Skilltree aktualisieren
+			updateSkilltree();
+		}
+	}
+}
+
+
+bool MainWindow::setupGameScreen()
+{
+	DEBUG4("setup game screen");
+	try
+	{
+		// Szene erzeugen
+		m_scene = new Scene(m_document,m_window);
+
+		// GUI Elemente erzeugen
+		CEGUI::WindowManager& win_mgr = CEGUI::WindowManager::getSingleton();
+
+		// Oberstes Fenster der Hauptmenue Schicht
+		m_game_screen =  win_mgr.createWindow("DefaultWindow", "GameScreen");
+
+		// Kontrollleiste anlegen
+		setupControlPanel();
+
+		// Inventar Fenster anlegen
+		setupInventory();
+
+		// CharInfo Fenster anlegen
+		setupCharInfo();
+
+		// Skilltree Fenster anlegen
+		setupSkilltree();
+
+		// Leiste fuer Objekt-Info anlegen
+		setupObjectInfo();
+	}
+	catch (CEGUI::Exception e)
+	{
+		ERRORMSG("Error message: %s",e.getMessage().c_str());
+	}
+
+	return true;
+}
+
+void MainWindow::setupControlPanel()
+{
+	DEBUG4("setup control panel");
+
+	CEGUI::WindowManager& win_mgr = CEGUI::WindowManager::getSingleton();
+
+	std::string name;
+
+	// Rahmen fuer die untere Kontrollleiste
+	CEGUI::FrameWindow* ctrl_panel = (CEGUI::FrameWindow*) win_mgr.createWindow("TaharezLook/FrameWindow", "ControlPanel");
+	m_game_screen->addChildWindow(ctrl_panel);
+	ctrl_panel->setPosition(CEGUI::UVector2(cegui_reldim(0.0f), cegui_reldim( 0.88f))); //0.0/0.8
+	ctrl_panel->setSize(CEGUI::UVector2(cegui_reldim(1.0f), cegui_reldim( 0.12f))); //1.0/0.2
+	ctrl_panel->setProperty("FrameEnabled","false");
+	ctrl_panel->setProperty("TitlebarEnabled","false");
+	ctrl_panel->setProperty("CloseButtonEnabled","false");
+	ctrl_panel->subscribeEvent(CEGUI::Window::EventMouseButtonDown, CEGUI::Event::Subscriber(&MainWindow::consumeEvent, this));
+	ctrl_panel->setWantsMultiClickEvents(false);
+
+
+	// Bestandteile der Kontrollleiste hinzufuegen
+	CEGUI::PushButton* btn;
+	CEGUI::Window* label;
+
+	// Balken fuer HP
+	CEGUI::ProgressBar* bar = static_cast<CEGUI::ProgressBar*>(win_mgr.createWindow("TaharezLook/ProgressBar", "HealthProgressBar"));
+	ctrl_panel->addChildWindow(bar);
+	bar->setPosition(CEGUI::UVector2(cegui_reldim(0.01f), cegui_reldim( 0.05f)));
+	bar->setSize(CEGUI::UVector2(cegui_reldim(0.10f), cegui_reldim( 0.30f)));
+	bar->setWantsMultiClickEvents(false);
+	bar->setProgress(0.0);
+
+
+	// Button Inventar
+	btn = static_cast<CEGUI::PushButton*>(win_mgr.createWindow("TaharezLook/Button", "InventoryButton"));
+	ctrl_panel->addChildWindow(btn);
+	btn->setPosition(CEGUI::UVector2(cegui_reldim(0.4475f), cegui_reldim( 0.65f)));
+	btn->setSize(CEGUI::UVector2(cegui_reldim(0.05f), cegui_reldim( 0.30f)));
+	btn->setText("I");
+	btn->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&MainWindow::onButtonInventoryClicked, this));
+	btn->setWantsMultiClickEvents(false);
+
+	// Button Charakterinfo
+	btn = static_cast<CEGUI::PushButton*>(win_mgr.createWindow("TaharezLook/Button", "CharInfoButton"));
+	ctrl_panel->addChildWindow(btn);
+	btn->setPosition(CEGUI::UVector2(cegui_reldim(0.3675f), cegui_reldim( 0.65f)));
+	btn->setSize(CEGUI::UVector2(cegui_reldim(0.05f), cegui_reldim( 0.30f)));
+	btn->setText("C");
+	btn->setWantsMultiClickEvents(false);
+	btn->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&MainWindow::onButtonCharInfoClicked, this));
+
+	// Button Chat oeffnen
+	btn = static_cast<CEGUI::PushButton*>(win_mgr.createWindow("TaharezLook/Button", "ChatOpenButton"));
+	ctrl_panel->addChildWindow(btn);
+	btn->setPosition(CEGUI::UVector2(cegui_reldim(0.64f), cegui_reldim( 0.65f)));
+	btn->setSize(CEGUI::UVector2(cegui_reldim(0.05f), cegui_reldim( 0.30f)));
+	btn->setText("M");
+	btn->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&MainWindow::onButtonOpenChatClicked, this));
+	btn->setWantsMultiClickEvents(false);
+
+	// Button SkillTree
+	btn = static_cast<CEGUI::PushButton*>(win_mgr.createWindow("TaharezLook/Button", "SkillTreeButton"));
+	ctrl_panel->addChildWindow(btn);
+	btn->setPosition(CEGUI::UVector2(cegui_reldim(0.5275f), cegui_reldim( 0.65f)));
+	btn->setSize(CEGUI::UVector2(cegui_reldim(0.05f), cegui_reldim( 0.30f)));
+	btn->setText("T");
+	btn->setWantsMultiClickEvents(false);
+	btn->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&MainWindow::onButtonSkilltreeClicked, this));
+
+	// Button Party
+	btn = static_cast<CEGUI::PushButton*>(win_mgr.createWindow("TaharezLook/Button", "PartyButton"));
+	ctrl_panel->addChildWindow(btn);
+	btn->setPosition(CEGUI::UVector2(cegui_reldim(0.255f), cegui_reldim( 0.65f)));
+	btn->setSize(CEGUI::UVector2(cegui_reldim(0.05f), cegui_reldim( 0.30f)));
+	btn->setText("P");
+	btn->setWantsMultiClickEvents(false);
+	btn->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&MainWindow::onButtonPartyClicked, this));
+
+	// Button Speichern und Beenden
+	btn = static_cast<CEGUI::PushButton*>(win_mgr.createWindow("TaharezLook/Button", "SaveExitButton"));
+	ctrl_panel->addChildWindow(btn);
+	btn->setPosition(CEGUI::UVector2(cegui_reldim(0.835f), cegui_reldim( 0.30f)));
+	btn->setSize(CEGUI::UVector2(cegui_reldim(0.155f), cegui_reldim( 0.30f)));
+	btn->setText(gettext("main_saveexit"));
+	btn->setWantsMultiClickEvents(false);
+	btn->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&MainWindow::onButtonSaveExitClicked, this));
+
+	// Button Optionen
+	btn = static_cast<CEGUI::PushButton*>(win_mgr.createWindow("TaharezLook/Button", "OptionsButton"));
+	ctrl_panel->addChildWindow(btn);
+	btn->setPosition(CEGUI::UVector2(cegui_reldim(0.835f), cegui_reldim( 0.65f)));
+	btn->setSize(CEGUI::UVector2(cegui_reldim(0.155f), cegui_reldim( 0.30f)));
+	btn->setWantsMultiClickEvents(false);
+	btn->setText(gettext("main_options"));
+
+	// Anzeige linke Maustaste Faehigkeit
+	label = win_mgr.createWindow("TaharezLook/StaticImage", "LeftClickAbilityImage");
+	ctrl_panel->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.12f), cegui_reldim( 0.05f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.10f), cegui_reldim( 0.90f)));
+
+	// Balken fuer linke Maustaste Faehigkeit
+	bar = static_cast<CEGUI::ProgressBar*>(win_mgr.createWindow("TaharezLook/ProgressBar", "LeftClickAbilityProgressBar"));
+	ctrl_panel->addChildWindow(bar);
+	bar->setPosition(CEGUI::UVector2(cegui_reldim(0.12f), cegui_reldim( 0.75f)));
+	bar->setSize(CEGUI::UVector2(cegui_reldim(0.10f), cegui_reldim( 0.20f)));
+	bar->setWantsMultiClickEvents(false);
+	bar->setProgress(0.0);
+	bar->setAlpha(0.5);
+	bar->setAlwaysOnTop(true);
+
+	// Anzeige rechte Maustaste Faehigkeit
+	label = win_mgr.createWindow("TaharezLook/StaticImage", "RightClickAbilityImage");
+	ctrl_panel->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.725f), cegui_reldim( 0.05f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.10f), cegui_reldim( 0.90f)));
+
+	// Balken fuer rechte Maustaste Faehigkeit
+	bar = static_cast<CEGUI::ProgressBar*>(win_mgr.createWindow("TaharezLook/ProgressBar", "RightClickAbilityProgressBar"));
+	ctrl_panel->addChildWindow(bar);
+	bar->setPosition(CEGUI::UVector2(cegui_reldim(0.725f), cegui_reldim( 0.75f)));
+	bar->setSize(CEGUI::UVector2(cegui_reldim(0.10f), cegui_reldim( 0.20f)));
+	bar->setWantsMultiClickEvents(false);
+	bar->setProgress(0.0);
+	bar->setAlpha(0.5);
+	bar->setAlwaysOnTop(true);
+
+	// Inventar Guertel
+	int i;
+	ostringstream outStream;
+	for (i=0;i<10;i++)
+	{
+		outStream.str("");
+		outStream << "InventoryItem" << i;
+		label = win_mgr.createWindow("TaharezLook/StaticText", outStream.str());
+		ctrl_panel->addChildWindow(label);
+		label->setProperty("FrameEnabled", "true");
+		label->setProperty("BackgroundEnabled", "true");
+		label->setPosition(CEGUI::UVector2(cegui_reldim(0.225f+i*0.05f), cegui_reldim( 0.05f)));
+		label->setSize(CEGUI::UVector2(cegui_reldim(0.045f), cegui_reldim( 0.5f)));
+		outStream.str("");
+		outStream << "I" << i;
+		label->setText(outStream.str());
+		label->setID(Equipement::SMALL_ITEMS+i);
+		label->subscribeEvent(CEGUI::Window::EventMouseButtonDown, CEGUI::Event::Subscriber(&MainWindow::onItemMouseButtonPressed, this));
+		label->subscribeEvent(CEGUI::Window::EventMouseButtonUp, CEGUI::Event::Subscriber(&MainWindow::onItemMouseButtonReleased, this));
+		label->subscribeEvent(CEGUI::Window::EventMouseEnters, CEGUI::Event::Subscriber(&MainWindow::onItemHover, this));
+	}
+
+	DEBUG("end");
+
+	// Verbinden mit dem Document
+}
+
+void MainWindow::setupCharInfo()
+{
+	DEBUG4("setup charinfo");
+
+	CEGUI::WindowManager& win_mgr = CEGUI::WindowManager::getSingleton();
+
+
+	// Rahmen fuer CharInfo Fenster
+	CEGUI::FrameWindow* char_info = (CEGUI::FrameWindow*) win_mgr.createWindow("TaharezLook/FrameWindow", "CharInfo");
+	m_game_screen->addChildWindow(char_info);
+	char_info->setPosition(CEGUI::UVector2(cegui_reldim(0.0f), cegui_reldim( 0.0f)));
+	char_info->setSize(CEGUI::UVector2(cegui_reldim(0.48f), cegui_reldim( 0.77f)));
+	char_info->setProperty("FrameEnabled","false");
+	char_info->setProperty("TitlebarEnabled","false");
+	char_info->setProperty("CloseButtonEnabled","false");
+	char_info->subscribeEvent(CEGUI::Window::EventMouseButtonDown, CEGUI::Event::Subscriber(&MainWindow::consumeEvent, this));
+	char_info->setWantsMultiClickEvents(false);
+	char_info->setAlpha(0.7);
+
+	// Bestandteile des Charakterfensters hinzufuegen
+	CEGUI::PushButton* btn;
+	CEGUI::Window* label;
+
+	// Label Name
+	label = win_mgr.createWindow("TaharezLook/StaticText", "NameLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.0f), cegui_reldim( 0.0f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.4f), cegui_reldim( 0.1f)));
+	label->setText("Name");
+
+	// Label Klasse
+	label = win_mgr.createWindow("TaharezLook/StaticText", "ClassLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.4f), cegui_reldim( 0.0f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.4f), cegui_reldim( 0.1f)));
+	label->setText("Klasse");
+
+	// Label Level
+	label = win_mgr.createWindow("TaharezLook/StaticText", "LevelLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.8f), cegui_reldim( 0.0f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.2f), cegui_reldim( 0.1f)));
+	label->setText("Level 1");
+
+	// Label Staerke
+	label = win_mgr.createWindow("TaharezLook/StaticText", "StrengthLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.05f), cegui_reldim( 0.15f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.20f), cegui_reldim( 0.06f)));
+	label->setText(gettext("main_power"));
+
+	// Label Staerke (Wert)
+	label = win_mgr.createWindow("TaharezLook/StaticText", "StrengthValueLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.25f), cegui_reldim( 0.15f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.1f), cegui_reldim( 0.06f)));
+	label->setText("20");
+
+	// Button Staerke erhoehen
+	btn = static_cast<CEGUI::PushButton*>( win_mgr.createWindow("TaharezLook/Button", "StrengthAddButton"));
+	char_info->addChildWindow(btn);
+	btn->setPosition(CEGUI::UVector2(cegui_reldim(0.40f), cegui_reldim( 0.15f)));
+	btn->setSize(CEGUI::UVector2(cegui_reldim(0.05f), cegui_reldim( 0.06f)));
+	btn->setText("+");
+	btn->setID(CreatureBaseAttr::STRENGTH);
+	btn->setWantsMultiClickEvents(false);
+	btn->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&MainWindow::onIncreaseAttributeButtonClicked, this));
+
+
+	// Label Geschick
+	label = win_mgr.createWindow("TaharezLook/StaticText", "DexterityLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.05f), cegui_reldim( 0.23f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.20f), cegui_reldim( 0.06f)));
+	label->setText(gettext("main_dexterity"));
+
+	// Label Geschick (Wert)
+	label = win_mgr.createWindow("TaharezLook/StaticText", "DexterityValueLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.25f), cegui_reldim( 0.23f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.1f), cegui_reldim( 0.06f)));
+	label->setText("20");
+
+	// Button Geschick erhoehen
+	btn = static_cast<CEGUI::PushButton*>( win_mgr.createWindow("TaharezLook/Button", "DexterityAddButton"));
+	char_info->addChildWindow(btn);
+	btn->setPosition(CEGUI::UVector2(cegui_reldim(0.40f), cegui_reldim( 0.23f)));
+	btn->setSize(CEGUI::UVector2(cegui_reldim(0.05f), cegui_reldim( 0.06f)));
+	btn->setText("+");
+	btn->setID(CreatureBaseAttr::DEXTERITY);
+	btn->setWantsMultiClickEvents(false);
+	btn->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&MainWindow::onIncreaseAttributeButtonClicked, this));
+
+	// Label Willenskraft
+	label = win_mgr.createWindow("TaharezLook/StaticText", "WillpowerLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.05f), cegui_reldim( 0.31f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.20f), cegui_reldim( 0.06f)));
+	label->setText(gettext("main_willpower"));
+
+	// Label Willenskraft (Wert)
+	label = win_mgr.createWindow("TaharezLook/StaticText", "WillpowerValueLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.25f), cegui_reldim( 0.31f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.1f), cegui_reldim( 0.06f)));
+	label->setText("20");
+
+	// Button Willenskraft erhoehen
+	btn = static_cast<CEGUI::PushButton*>( win_mgr.createWindow("TaharezLook/Button", "WillpowerAddButton"));
+	char_info->addChildWindow(btn);
+	btn->setPosition(CEGUI::UVector2(cegui_reldim(0.40f), cegui_reldim( 0.31f)));
+	btn->setSize(CEGUI::UVector2(cegui_reldim(0.05f), cegui_reldim( 0.06f)));
+	btn->setText("+");
+	btn->setID(CreatureBaseAttr::WILLPOWER);
+	btn->setWantsMultiClickEvents(false);
+	btn->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&MainWindow::onIncreaseAttributeButtonClicked, this));
+
+	// Label Zauberkraft
+	label = win_mgr.createWindow("TaharezLook/StaticText", "MagicpowerLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.05f), cegui_reldim( 0.39f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.20f), cegui_reldim( 0.06f)));
+	label->setText(gettext("main_magic_power"));
+
+	// Label Zauberkraft (Wert)
+	label = win_mgr.createWindow("TaharezLook/StaticText", "MagicpowerValueLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.25f), cegui_reldim( 0.39f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.1f), cegui_reldim( 0.06f)));
+	label->setText("20");
+
+	// Button Zauberkraft erhoehen
+	btn = static_cast<CEGUI::PushButton*>( win_mgr.createWindow("TaharezLook/Button", "MagicpowerAddButton"));
+	char_info->addChildWindow(btn);
+	btn->setPosition(CEGUI::UVector2(cegui_reldim(0.40f), cegui_reldim( 0.39f)));
+	btn->setSize(CEGUI::UVector2(cegui_reldim(0.05f), cegui_reldim( 0.06f)));
+	btn->setText("+");
+	btn->setID(CreatureBaseAttr::MAGIC_POWER);
+	btn->setWantsMultiClickEvents(false);
+	btn->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&MainWindow::onIncreaseAttributeButtonClicked, this));
+
+	// Label Attributpunkte
+	label = win_mgr.createWindow("TaharezLook/StaticText", "AttrPointsLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.05f), cegui_reldim( 0.47f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.20f), cegui_reldim( 0.06f)));
+	label->setText(gettext("main_credits"));
+
+	// Label  Attributpunkte (Wert)
+	label = win_mgr.createWindow("TaharezLook/StaticText", "AttrPointsValueLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.25f), cegui_reldim( 0.47f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.1f), cegui_reldim( 0.06f)));
+	label->setText("5");
+
+	// Label Exp
+	label = win_mgr.createWindow("TaharezLook/StaticText", "ExperienceLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.50f), cegui_reldim( 0.15f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.20f), cegui_reldim( 0.06f)));
+	label->setText(gettext("main_experience"));
+
+	// Label Exp (Wert)
+	label = win_mgr.createWindow("TaharezLook/StaticText", "ExperienceValueLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.70f), cegui_reldim( 0.15f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.25f), cegui_reldim( 0.06f)));
+	label->setText("0/100");
+
+	// Label HP
+	label = win_mgr.createWindow("TaharezLook/StaticText", "HitpointsLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.50f), cegui_reldim( 0.23f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.20f), cegui_reldim( 0.06f)));
+	label->setText(gettext("main_healthpoints"));
+
+	// Label HP (Wert)
+	label = win_mgr.createWindow("TaharezLook/StaticText", "HitpointsValueLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.70f), cegui_reldim( 0.23f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.25f), cegui_reldim( 0.06f)));
+	label->setText("0/100");
+
+	// Label Attacke
+	label = win_mgr.createWindow("TaharezLook/StaticText", "AttackLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.05f), cegui_reldim( 0.55f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.20f), cegui_reldim( 0.06f)));
+	label->setText(gettext("main_attack"));
+
+	// Label Attacke (Wert)
+	label = win_mgr.createWindow("TaharezLook/StaticText", "AttackValueLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.25f), cegui_reldim( 0.55f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.10f), cegui_reldim( 0.06f)));
+	label->setText("20");
+
+	// Label Attackegeschwindigkeit
+	label = win_mgr.createWindow("TaharezLook/StaticText", "AttackSpeedLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.05f), cegui_reldim( 0.62f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.20f), cegui_reldim( 0.06f)));
+	label->setText(gettext("main_attacks_per_second"));
+
+	// Label Attacke (Wert)
+	label = win_mgr.createWindow("TaharezLook/StaticText", "AttackSpeedValueLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.25f), cegui_reldim( 0.62f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.10f), cegui_reldim( 0.06f)));
+	label->setText("20");
+
+	// Label Reichweite
+	label = win_mgr.createWindow("TaharezLook/StaticText", "RangeLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.05f), cegui_reldim( 0.69f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.20f), cegui_reldim( 0.06f)));
+	label->setText(gettext("main_range"));
+
+	// Label Reichweite (Wert)
+	label = win_mgr.createWindow("TaharezLook/StaticText", "RangeValueLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.25f), cegui_reldim( 0.69f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.10f), cegui_reldim( 0.06f)));
+	label->setText("2");
+
+	// Label Durchschlagskraft
+	label = win_mgr.createWindow("TaharezLook/StaticText", "PowerLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.05f), cegui_reldim( 0.76f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.20f), cegui_reldim( 0.06f)));
+	label->setText(gettext("main_penetration_power"));
+
+	// Label Durchschlagskraft
+	label = win_mgr.createWindow("TaharezLook/StaticText", "PowerValueLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.25f), cegui_reldim( 0.76f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.10f), cegui_reldim( 0.06f)));
+	label->setText("30");
+
+	// Label Ruestung
+	label = win_mgr.createWindow("TaharezLook/StaticText", "ArmorLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.05f), cegui_reldim( 0.83f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.20f), cegui_reldim( 0.06f)));
+	label->setText(gettext("main_armour"));
+
+	// Label Ruestung
+	label = win_mgr.createWindow("TaharezLook/StaticText", "ArmorValueLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.25f), cegui_reldim( 0.83f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.10f), cegui_reldim( 0.06f)));
+	label->setText("40");
+
+	// Label Block
+	label = win_mgr.createWindow("TaharezLook/StaticText", "BlockLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.05f), cegui_reldim( 0.90f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.20f), cegui_reldim( 0.06f)));
+	label->setText(gettext("main_block"));
+
+	// Label Block
+	label = win_mgr.createWindow("TaharezLook/StaticText", "BlockValueLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.25f), cegui_reldim( 0.90f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.10f), cegui_reldim( 0.06f)));
+	label->setText("20");
+
+	// Label Basisschaden
+	label = win_mgr.createWindow("TaharezLook/StaticText", "BaseDmgLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.50f), cegui_reldim( 0.48f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.20f), cegui_reldim( 0.06f)));
+	label->setText(gettext("main_base_damage"));
+
+	// Label Basisschaden (Wert)
+	label = win_mgr.createWindow("TaharezLook/StaticText", "BaseDmgValueLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.70f), cegui_reldim( 0.48f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.25f), cegui_reldim( 0.06f)));
+	label->setText("5-10");
+
+	// Label Skill1 Schaden
+	label = win_mgr.createWindow("TaharezLook/StaticText", "Skill1DmgLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.50f), cegui_reldim( 0.55f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.20f), cegui_reldim( 0.06f)));
+	label->setText("Skill1");
+
+	// Label Skill1 Schaden (Wert)
+	label = win_mgr.createWindow("TaharezLook/StaticText", "Skill1DmgValueLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.70f), cegui_reldim( 0.55f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.25f), cegui_reldim( 0.06f)));
+	label->setText("10-20");
+
+	// Label Skill2 Schaden
+	label = win_mgr.createWindow("TaharezLook/StaticText", "Skill2DmgLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.50f), cegui_reldim( 0.62f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.20f), cegui_reldim( 0.06f)));
+	label->setText("Skill2");
+
+	// Label Skill2 Schaden (Wert)
+	label = win_mgr.createWindow("TaharezLook/StaticText", "Skill2DmgValueLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.70f), cegui_reldim( 0.62f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.25f), cegui_reldim( 0.06f)));
+	label->setText("20-30");
+
+	// Label physisches Resistenz
+	label = win_mgr.createWindow("TaharezLook/StaticText", "ResistPhysLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.50f), cegui_reldim( 0.69f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.20f), cegui_reldim( 0.06f)));
+	label->setText(gettext("main_physical_resistance"));
+
+	// Label physische Resistenz (Wert)
+	label = win_mgr.createWindow("TaharezLook/StaticText", "ResistPhysValueLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.70f), cegui_reldim( 0.69f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.25f), cegui_reldim( 0.06f)));
+	label->setText("0");
+
+	// Label Feuerresistenz
+	label = win_mgr.createWindow("TaharezLook/StaticText", "ResistFireLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.50f), cegui_reldim( 0.76f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.20f), cegui_reldim( 0.06f)));
+	label->setText(gettext("main_fire_resistance"));
+
+	// Label Feuerresistenz (Wert)
+	label = win_mgr.createWindow("TaharezLook/StaticText", "ResistFireValueLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.70f), cegui_reldim( 0.76f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.25f), cegui_reldim( 0.06f)));
+	label->setText("0");
+
+	// Label Luftresistenz
+	label = win_mgr.createWindow("TaharezLook/StaticText", "ResistAirLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.50f), cegui_reldim( 0.83f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.20f), cegui_reldim( 0.06f)));
+	label->setText(gettext("main_air_resistance"));
+
+	// Label Feuerresistenz (Wert)
+	label = win_mgr.createWindow("TaharezLook/StaticText", "ResistAirValueLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.70f), cegui_reldim( 0.83f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.25f), cegui_reldim( 0.06f)));
+	label->setText("0");
+
+	// Label Eisresistenz
+	label = win_mgr.createWindow("TaharezLook/StaticText", "ResistIceLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.50f), cegui_reldim( 0.90f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.20f), cegui_reldim( 0.06f)));
+	label->setText(gettext("main_ice_resistance"));
+
+	// Label Eisresistenz (Wert)
+	label = win_mgr.createWindow("TaharezLook/StaticText", "ResistIceValueLabel");
+	char_info->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.70f), cegui_reldim( 0.90f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.25f), cegui_reldim( 0.06f)));
+	label->setText("0");
+
+	// Charakterinfo anfangs ausblenden
+	char_info->setVisible(false);
+}
+
+void MainWindow::setupInventory()
+{
+	DEBUG4("setup inventory");
+
+	CEGUI::WindowManager& win_mgr = CEGUI::WindowManager::getSingleton();
+
+	// Rahmen fuer Inventar Fenster
+	CEGUI::FrameWindow* inventory = (CEGUI::FrameWindow*) win_mgr.createWindow("TaharezLook/FrameWindow", "Inventory");
+	m_game_screen->addChildWindow(inventory);
+	inventory->setPosition(CEGUI::UVector2(cegui_reldim(0.52f), cegui_reldim( 0.0f)));
+	inventory->setSize(CEGUI::UVector2(cegui_reldim(0.48f), cegui_reldim( 0.78f)));
+	inventory->setProperty("FrameEnabled","false");
+	inventory->setProperty("TitlebarEnabled","false");
+	inventory->setProperty("CloseButtonEnabled","false");
+	inventory->subscribeEvent(CEGUI::Window::EventMouseButtonDown, CEGUI::Event::Subscriber(&MainWindow::consumeEvent, this));
+	inventory->setWantsMultiClickEvents(false);
+	inventory->setAlpha(0.7);
+
+	// Bestandteile des Charakterfensters hinzufuegen
+	CEGUI::PushButton* btn;
+	CEGUI::Window* label;
+	NumberedWindow* numlabel;
+
+	int i,j;
+
+	// Label fuer grosse Items
+	ostringstream outStream;
+	for (i=0;i<5;i++)
+	{
+		outStream.str("");
+		outStream << "BigItem" << i<< "Label";
+		label = win_mgr.createWindow("TaharezLook/StaticText", outStream.str());
+		inventory->addChildWindow(label);
+		label->setProperty("FrameEnabled", "true");
+		label->setProperty("BackgroundEnabled", "true");
+		label->setPosition(CEGUI::UVector2(cegui_reldim(0.05f+i*0.18f), cegui_reldim( 0.5f)));
+		label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+		outStream.str("");
+		outStream << "B" << i;
+		label->setText(outStream.str());
+		label->setID(Equipement::BIG_ITEMS+i);
+		label->subscribeEvent(CEGUI::Window::EventMouseButtonDown, CEGUI::Event::Subscriber(&MainWindow::onItemMouseButtonPressed, this));
+		label->subscribeEvent(CEGUI::Window::EventMouseButtonUp, CEGUI::Event::Subscriber(&MainWindow::onItemMouseButtonReleased, this));
+		label->subscribeEvent(CEGUI::Window::EventMouseEnters, CEGUI::Event::Subscriber(&MainWindow::onItemHover, this));
+	}
+
+	// Label fuer mittlere Items
+	for (j=0;j<2;j++)
+	{
+		for (i=0;i<7;i++)
+		{
+			outStream.str("");
+			outStream << "MediumItem" << j*7+i<< "Label";
+			label = win_mgr.createWindow("TaharezLook/StaticText", outStream.str());
+			inventory->addChildWindow(label);
+			label->setProperty("FrameEnabled", "true");
+			label->setProperty("BackgroundEnabled", "true");
+			label->setPosition(CEGUI::UVector2(cegui_reldim(0.05f+i*0.13f), cegui_reldim( 0.61f+0.09*j)));
+			label->setSize(CEGUI::UVector2(cegui_reldim(0.115f), cegui_reldim( 0.08f)));
+			outStream.str("");
+			outStream << "M" << j*7+i;
+			label->setText(outStream.str());
+			label->setID(Equipement::MEDIUM_ITEMS+j*7+i);
+			label->subscribeEvent(CEGUI::Window::EventMouseButtonDown, CEGUI::Event::Subscriber(&MainWindow::onItemMouseButtonPressed, this));
+			label->subscribeEvent(CEGUI::Window::EventMouseButtonUp, CEGUI::Event::Subscriber(&MainWindow::onItemMouseButtonReleased, this));
+			label->subscribeEvent(CEGUI::Window::EventMouseEnters, CEGUI::Event::Subscriber(&MainWindow::onItemHover, this));
+		}
+	}
+	// Label fuer kleine Items
+	for (j=0;j<3;j++)
+	{
+		for (i=0;i<10;i++)
+		{
+			outStream.str("");
+			outStream << "SmallItem" << j*10+i<< "Label";
+			label = win_mgr.createWindow("TaharezLook/StaticText", outStream.str());
+			inventory->addChildWindow(label);
+			label->setProperty("FrameEnabled", "true");
+			label->setProperty("BackgroundEnabled", "true");
+			label->setPosition(CEGUI::UVector2(cegui_reldim(0.02f+i*0.096f), cegui_reldim( 0.79f+0.07*j)));
+			label->setSize(CEGUI::UVector2(cegui_reldim(0.086f), cegui_reldim( 0.06f)));
+			outStream.str("");
+			outStream << "S" << j*10+i;
+			label->setText(outStream.str());
+			label->setID(Equipement::SMALL_ITEMS+j*10+i);
+			label->subscribeEvent(CEGUI::Window::EventMouseButtonDown, CEGUI::Event::Subscriber(&MainWindow::onItemMouseButtonPressed, this));
+			label->subscribeEvent(CEGUI::Window::EventMouseButtonUp, CEGUI::Event::Subscriber(&MainWindow::onItemMouseButtonReleased, this));
+			label->subscribeEvent(CEGUI::Window::EventMouseEnters, CEGUI::Event::Subscriber(&MainWindow::onItemHover, this));
+		}
+	}
+
+	// Label Ruestung
+	label = win_mgr.createWindow("TaharezLook/StaticText", "ArmorItemLabel");
+	inventory->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.05f), cegui_reldim( 0.35f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+	label->setText("Ruestung");
+	label->setID(Equipement::ARMOR);
+	label->subscribeEvent(CEGUI::Window::EventMouseButtonDown, CEGUI::Event::Subscriber(&MainWindow::onItemMouseButtonPressed, this));
+	label->subscribeEvent(CEGUI::Window::EventMouseButtonUp, CEGUI::Event::Subscriber(&MainWindow::onItemMouseButtonReleased, this));
+	label->subscribeEvent(CEGUI::Window::EventMouseEnters, CEGUI::Event::Subscriber(&MainWindow::onItemHover, this));
+
+
+
+	/*
+	try
+	{
+		numlabel = (NumberedWindow*) win_mgr.createWindow("Taharez/NumberedStaticText", "ArmorItemLabel");
+		inventory->addChildWindow(numlabel);
+		numlabel->setProperty("FrameEnabled", "true");
+		numlabel->setProperty("BackgroundEnabled", "true");
+		numlabel->setPosition(CEGUI::UVector2(cegui_reldim(0.05f), cegui_reldim( 0.35f)));
+		numlabel->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+		numlabel->setText("Ruestung");
+		DEBUG("NumberedWindow2 created");
+	}
+	catch (CEGUI::UnknownObjectException e)
+	{
+		ERRORMSG("Error message: %s",e.getMessage().c_str());
+	}
+	*/
+
+	// Label Waffe
+	label = win_mgr.createWindow("TaharezLook/StaticText", "WeaponItemLabel");
+	inventory->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.05f), cegui_reldim( 0.14f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+	label->setText("Waffe");
+	label->setID(Equipement::WEAPON);
+	label->subscribeEvent(CEGUI::Window::EventMouseButtonDown, CEGUI::Event::Subscriber(&MainWindow::onItemMouseButtonPressed, this));
+	label->subscribeEvent(CEGUI::Window::EventMouseButtonUp, CEGUI::Event::Subscriber(&MainWindow::onItemMouseButtonReleased, this));
+	label->subscribeEvent(CEGUI::Window::EventMouseEnters, CEGUI::Event::Subscriber(&MainWindow::onItemHover, this));
+
+	// Label Helm
+	label = win_mgr.createWindow("TaharezLook/StaticText", "HelmetItemLabel");
+	inventory->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.07f), cegui_reldim( 0.05f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.1f), cegui_reldim( 0.07f)));
+	label->setText("Helm");
+	label->setID(Equipement::HELMET);
+	label->subscribeEvent(CEGUI::Window::EventMouseButtonDown, CEGUI::Event::Subscriber(&MainWindow::onItemMouseButtonPressed, this));
+	label->subscribeEvent(CEGUI::Window::EventMouseButtonUp, CEGUI::Event::Subscriber(&MainWindow::onItemMouseButtonReleased, this));
+	label->subscribeEvent(CEGUI::Window::EventMouseEnters, CEGUI::Event::Subscriber(&MainWindow::onItemHover, this));
+
+	// Label Schild
+	label = win_mgr.createWindow("TaharezLook/StaticText", "ShieldItemLabel");
+	inventory->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.8f), cegui_reldim( 0.14f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+	label->setText("Schild");
+	label->setID(Equipement::SHIELD);
+	label->subscribeEvent(CEGUI::Window::EventMouseButtonDown, CEGUI::Event::Subscriber(&MainWindow::onItemMouseButtonPressed, this));
+	label->subscribeEvent(CEGUI::Window::EventMouseButtonUp, CEGUI::Event::Subscriber(&MainWindow::onItemMouseButtonReleased, this));
+	label->subscribeEvent(CEGUI::Window::EventMouseEnters, CEGUI::Event::Subscriber(&MainWindow::onItemHover, this));
+
+	// Label Handschuhe
+	label = win_mgr.createWindow("TaharezLook/StaticText", "GlovesItemLabel");
+	inventory->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.83f), cegui_reldim( 0.35f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.1f), cegui_reldim( 0.07f)));
+	label->setText("Handschuhe");
+	label->setID(Equipement::GLOVES);
+	label->subscribeEvent(CEGUI::Window::EventMouseButtonDown, CEGUI::Event::Subscriber(&MainWindow::onItemMouseButtonPressed, this));
+	label->subscribeEvent(CEGUI::Window::EventMouseButtonUp, CEGUI::Event::Subscriber(&MainWindow::onItemMouseButtonReleased, this));
+	label->subscribeEvent(CEGUI::Window::EventMouseEnters, CEGUI::Event::Subscriber(&MainWindow::onItemHover, this));
+
+	// Ring links
+	label = win_mgr.createWindow("TaharezLook/StaticText", "RingLeftItemLabel");
+	inventory->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.85f), cegui_reldim( 0.26f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.086f), cegui_reldim( 0.06f)));
+	label->setText("Ring1");
+	label->setID(Equipement::RING_LEFT);
+	label->subscribeEvent(CEGUI::Window::EventMouseButtonDown, CEGUI::Event::Subscriber(&MainWindow::onItemMouseButtonPressed, this));
+	label->subscribeEvent(CEGUI::Window::EventMouseButtonUp, CEGUI::Event::Subscriber(&MainWindow::onItemMouseButtonReleased, this));
+	label->subscribeEvent(CEGUI::Window::EventMouseEnters, CEGUI::Event::Subscriber(&MainWindow::onItemHover, this));
+
+	// Ring rechts
+	label = win_mgr.createWindow("TaharezLook/StaticText", "RingRightItemLabel");
+	inventory->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.1f), cegui_reldim( 0.26f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.086f), cegui_reldim( 0.06f)));
+	label->setText("Ring2");
+	label->setID(Equipement::RING_RIGHT);
+	label->subscribeEvent(CEGUI::Window::EventMouseButtonDown, CEGUI::Event::Subscriber(&MainWindow::onItemMouseButtonPressed, this));
+	label->subscribeEvent(CEGUI::Window::EventMouseButtonUp, CEGUI::Event::Subscriber(&MainWindow::onItemMouseButtonReleased, this));
+	label->subscribeEvent(CEGUI::Window::EventMouseEnters, CEGUI::Event::Subscriber(&MainWindow::onItemHover, this));
+
+	// Amulett
+	label = win_mgr.createWindow("TaharezLook/StaticText", "AmuletItemLabel");
+	inventory->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.85f), cegui_reldim( 0.06f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.086f), cegui_reldim( 0.06f)));
+	label->setText("Amulett");
+	label->setID(Equipement::AMULET);
+	label->subscribeEvent(CEGUI::Window::EventMouseButtonDown, CEGUI::Event::Subscriber(&MainWindow::onItemMouseButtonPressed, this));
+	label->subscribeEvent(CEGUI::Window::EventMouseButtonUp, CEGUI::Event::Subscriber(&MainWindow::onItemMouseButtonReleased, this));
+	label->subscribeEvent(CEGUI::Window::EventMouseEnters, CEGUI::Event::Subscriber(&MainWindow::onItemHover, this));
+
+	// Button Ausruestung umschalten
+	btn = static_cast<CEGUI::PushButton*>(win_mgr.createWindow("TaharezLook/Button", "SwapEquipButton"));
+	inventory->addChildWindow(btn);
+	btn->setPosition(CEGUI::UVector2(cegui_reldim(0.70f), cegui_reldim( 0.06f)));
+	btn->setSize(CEGUI::UVector2(cegui_reldim(0.1f), cegui_reldim( 0.07f)));
+	btn->setText("1");
+	btn->subscribeEvent(CEGUI::PushButton::EventClicked, CEGUI::Event::Subscriber(&MainWindow::onSwapEquipClicked, this));
+
+	// Inventar anfangs ausblenden
+	inventory->setVisible(false);
+
+}
+
+
+void MainWindow::setupSkilltree()
+{
+	DEBUG4("setup skilltree");
+
+	CEGUI::WindowManager& win_mgr = CEGUI::WindowManager::getSingleton();
+
+
+	// Rahmen fuer Skilltree Fenster
+
+	// Bestandteile des Charakterfensters hinzufuegen
+	CEGUI::PushButton* btn;
+	CEGUI::Window* label;
+	CEGUI::DefaultWindow* tab;
+
+	ostringstream outStream;
+	std::string name;
+	std::string lname;
+	unsigned int act;
+
+	// Skilltree Magier
+	CEGUI::TabControl* skilltree_mage = (CEGUI::TabControl*) win_mgr.createWindow("TaharezLook/TabControl", "SkilltreeMage");
+	m_game_screen->addChildWindow(skilltree_mage);
+	skilltree_mage->setPosition(CEGUI::UVector2(cegui_reldim(0.52f), cegui_reldim( 0.0f)));
+	skilltree_mage->setSize(CEGUI::UVector2(cegui_reldim(0.48f), cegui_reldim( 0.77f)));
+	skilltree_mage->subscribeEvent(CEGUI::Window::EventMouseButtonDown, CEGUI::Event::Subscriber(&MainWindow::consumeEvent, this));
+	skilltree_mage->setWantsMultiClickEvents(false);
+	skilltree_mage->setAlpha(0.7);
+
+	// Tab Feuermagie
+	tab = (CEGUI::DefaultWindow*) win_mgr.createWindow("TaharezLook/TabContentPane", "SkilltreeMage_1");
+	tab->setText(gettext("main_firemagic"));
+	skilltree_mage->addTab(tab);
+
+	name =Action::getActionInfo(Action::MAGIC_ATTACK)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.2f), cegui_reldim(0.05f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+	label->setID(Action::MAGIC_ATTACK);
+	//label->setText(Action::getName(Action::MAGIC_ATTACK));
+	label->setProperty("Image", "set:skills image:magic_attack");
+	label->subscribeEvent(CEGUI::Window::EventMouseClick, CEGUI::Event::Subscriber(&MainWindow::onSkillMouseClicked, this));
+	label->subscribeEvent(CEGUI::Window::EventMouseEnters, CEGUI::Event::Subscriber(&MainWindow::onAbilityHover, this));
+
+
+	name =Action::getActionInfo(Action::FIRE_BOLT)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.05f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::FIRE_STRIKE)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::FIRE_BALL)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.7f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::INFERNO_BALL)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.7f), cegui_reldim(0.45f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::INFLAME)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.2f), cegui_reldim(0.45f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::FIRE_WALL)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.65f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::FIRE_WAVE)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.7f), cegui_reldim(0.65f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::FIRE_STORM)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.7f), cegui_reldim(0.85f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+
+	// Tab Eismagie
+	tab = (CEGUI::DefaultWindow*) win_mgr.createWindow("TaharezLook/TabContentPane", "SkilltreeMage_2");
+	skilltree_mage->addTab(tab);
+	tab->setText(gettext("main_icemagic"));
+
+	name =Action::getActionInfo(Action::ICE_BOLT)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.05f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::ICE_SPIKE)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::FREEZE)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.7f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::ICE_RING)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.2f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::CHILL)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.45f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::FROST_RING)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.2f), cegui_reldim(0.65f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::SNOW_STORM)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.65f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::BLIZZARD)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage",name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.85f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+
+
+	// Tab Luftmagie
+	tab = (CEGUI::DefaultWindow*) win_mgr.createWindow("TaharezLook/TabContentPane", "SkilltreeMage_3");
+	skilltree_mage->addTab(tab);
+	tab->setText(gettext("main_airmagic"));
+
+	name =Action::getActionInfo(Action::LIGHTNING)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.05f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::LIGHTNING_STRIKE)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::CHAIN_LIGHTNING)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage",name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.2f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::CHAIN_LIGHTNING2)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.2f), cegui_reldim(0.45f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::THUNDERSTORM)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage",name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.7f), cegui_reldim(0.45f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::THUNDERSTORM2)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.7f), cegui_reldim(0.85f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::STATIC_SHIELD)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.65f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::IONISATION)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.45f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+
+	// Label beschriften und verknuepfen
+
+	for (act =Action::FIRE_BOLT;act <=Action::IONISATION;act++)
+	{
+		name =Action::getActionInfo((Action::ActionType) act)->m_enum_name;
+		//lname =Action::getName((Action::ActionType) act);
+		//label = win_mgr.getWindow(name.append( "Label"));
+		label = win_mgr.getWindow(name + "Label");
+		label->setProperty("FrameEnabled", "true");
+		label->setProperty("BackgroundEnabled", "true");
+		label->setID(act);
+		//label->setText(lname);
+		label->setProperty("Image", "set:skills image:" + name);
+		label->subscribeEvent(CEGUI::Window::EventMouseClick, CEGUI::Event::Subscriber(&MainWindow::onSkillMouseClicked, this));
+		label->subscribeEvent(CEGUI::Window::EventMouseEnters, CEGUI::Event::Subscriber(&MainWindow::onAbilityHover, this));
+
+	}
+
+
+	skilltree_mage->setVisible(false);
+
+
+	// Skilltree Krieger
+	CEGUI::TabControl* skilltree_warrior = (CEGUI::TabControl*) win_mgr.createWindow("TaharezLook/TabControl", "SkilltreeWarrior");
+	m_game_screen->addChildWindow(skilltree_warrior);
+	skilltree_warrior->setPosition(CEGUI::UVector2(cegui_reldim(0.52f), cegui_reldim( 0.0f)));
+	skilltree_warrior->setSize(CEGUI::UVector2(cegui_reldim(0.48f), cegui_reldim( 0.77f)));
+	skilltree_warrior->subscribeEvent(CEGUI::Window::EventMouseButtonDown, CEGUI::Event::Subscriber(&MainWindow::consumeEvent, this));
+	skilltree_warrior->setWantsMultiClickEvents(false);
+	skilltree_warrior->setAlpha(0.7);
+
+
+	tab = (CEGUI::DefaultWindow*) win_mgr.createWindow("TaharezLook/TabContentPane", "SkilltreeWarrior_1");
+	tab->setText("Kampftechniken");
+	skilltree_warrior->addTab(tab);
+
+
+	/*
+	name =Action::getActionInfo(Action::ATTACK)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticText", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.2f), cegui_reldim(0.05f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+	label->setID(Action::ATTACK);
+	label->setText(Action::getName(Action::ATTACK));
+	label->subscribeEvent(CEGUI::Window::EventMouseClick, CEGUI::Event::Subscriber(&MainWindow::onSkillMouseClicked, this));
+	label->subscribeEvent(CEGUI::Window::EventMouseEnters, CEGUI::Event::Subscriber(&MainWindow::onAbilityHover, this));
+	*/
+
+
+	name =Action::getActionInfo(Action::ATTACK)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "false");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.2f), cegui_reldim(0.05f)));
+ 	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+	label->setID(Action::ATTACK);
+//	label->setText(Action::getName(Action::ATTACK));
+	label->setProperty("Image", "set:skills image:attack");
+	label->subscribeEvent(CEGUI::Window::EventMouseClick, CEGUI::Event::Subscriber(&MainWindow::onSkillMouseClicked, this));
+	label->subscribeEvent(CEGUI::Window::EventMouseEnters, CEGUI::Event::Subscriber(&MainWindow::onAbilityHover, this));
+
+
+	name =Action::getActionInfo(Action::BASH)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.05f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::HAMMER_BASH)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.45f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::HATE_MAGE)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.7f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::AROUND_BLOW)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.2f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::WHIRL_BLOW)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.2f), cegui_reldim(0.65f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::SMASH)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.65f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::CHARGE)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.7f), cegui_reldim(0.45f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::STORM_CHARGE)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.7f), cegui_reldim(0.85f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+
+
+	tab = (CEGUI::DefaultWindow*) win_mgr.createWindow("TaharezLook/TabContentPane", "SkilltreeWarrior_2");
+	skilltree_warrior->addTab(tab);
+	tab->setText("Passive Faehigkeiten");
+
+	name =Action::getActionInfo(Action::STEADFAST)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.05f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::BLOCK)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::WEAPONMASTER)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.45f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::MONSTER_HUNTER)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.2f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::MONSTER_SLAYER)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.2f), cegui_reldim(0.65f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::ENDURANCE)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.85f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+
+	tab = (CEGUI::DefaultWindow*) win_mgr.createWindow("TaharezLook/TabContentPane", "SkilltreeWarrior_3");
+	skilltree_warrior->addTab(tab);
+	tab->setText("??????");
+
+	name =Action::getActionInfo(Action::DECOY)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.05f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::SCARE)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.2f), cegui_reldim(0.45f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::BERSERK)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.2f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::WARCRY)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.85f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::REGENERATE)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::ANGER)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.45f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::FURY)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.65f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::FIRESWORD)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.7f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::FLAMEARMOR)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.7f), cegui_reldim(0.45f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::FLAMESWORD)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.7f), cegui_reldim(0.65f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	for (act =Action::BASH;act <=Action::FURY;act++)
+	{
+		name = Action::getActionInfo((Action::ActionType) act)->m_enum_name;
+		//lname = Action::getName((Action::ActionType) act);
+		//label = win_mgr.getWindow(name.append( "Label"));
+		label = win_mgr.getWindow(name + "Label");
+		label->setProperty("FrameEnabled", "true");
+		label->setProperty("BackgroundEnabled", "true");
+		label->setID(act);
+		//label->setText(lname);
+		label->setProperty("Image", "set:skills image:" + name);
+		label->subscribeEvent(CEGUI::Window::EventMouseClick, CEGUI::Event::Subscriber(&MainWindow::onSkillMouseClicked, this));
+		label->subscribeEvent(CEGUI::Window::EventMouseEnters, CEGUI::Event::Subscriber(&MainWindow::onAbilityHover, this));
+
+	}
+
+	skilltree_warrior->setVisible(false);
+
+
+	// Skilltree Schuetze
+	CEGUI::TabControl* skilltree_archer = (CEGUI::TabControl*) win_mgr.createWindow("TaharezLook/TabControl", "SkilltreeArcher");
+	m_game_screen->addChildWindow(skilltree_archer);
+	skilltree_archer->setPosition(CEGUI::UVector2(cegui_reldim(0.52f), cegui_reldim( 0.0f)));
+	skilltree_archer->setSize(CEGUI::UVector2(cegui_reldim(0.48f), cegui_reldim( 0.77f)));
+	skilltree_archer->subscribeEvent(CEGUI::Window::EventMouseButtonDown, CEGUI::Event::Subscriber(&MainWindow::consumeEvent, this));
+	skilltree_archer->setWantsMultiClickEvents(false);
+	skilltree_archer->setAlpha(0.7);
+
+
+	tab = (CEGUI::DefaultWindow*) win_mgr.createWindow("TaharezLook/TabContentPane", "SkilltreeArcher_1");
+	tab->setText("Kampffertigkeiten");
+	skilltree_archer->addTab(tab);
+
+	name =Action::getActionInfo(Action::RANGE_ATTACK)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.2f), cegui_reldim(0.05f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+	label->setID(Action::RANGE_ATTACK);
+	//label->setText(Action::getName(Action::RANGE_ATTACK));
+	label->setProperty("Image", "set:skills image:range_attack");
+	label->subscribeEvent(CEGUI::Window::EventMouseClick, CEGUI::Event::Subscriber(&MainWindow::onSkillMouseClicked, this));
+	label->subscribeEvent(CEGUI::Window::EventMouseEnters, CEGUI::Event::Subscriber(&MainWindow::onAbilityHover, this));
+
+	name =Action::getActionInfo(Action::TRIPLE_SHOT)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.35f), cegui_reldim(0.05f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::GUIDED_TRIPLE_SHOT)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.35f), cegui_reldim(0.45f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::PIERCE)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.35f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::MULTISHOT)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.15f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::VOLLEY_SHOT)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.15f), cegui_reldim(0.65f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::DEATH_ROULETTE)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.35f), cegui_reldim(0.85f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::WEAK_POINT)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.75f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::BLIND_RAGE)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.75f), cegui_reldim(0.65f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::EXPLODING_ARROW)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.55f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::EXPLOSION_CASCADE)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.55f), cegui_reldim(0.65f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::VACUUM)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.55f), cegui_reldim(0.45f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+
+	// Tab passive Faehigkeiten
+	tab = (CEGUI::DefaultWindow*) win_mgr.createWindow("TaharezLook/TabContentPane", "SkilltreeArcher_2");
+	skilltree_archer->addTab(tab);
+	tab->setText("passive Faehigkeiten");
+
+	name =Action::getActionInfo(Action::EVADE)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.05f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::CRITICAL_STRIKE)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.2f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::CONCENTRATION)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.45f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::MENTAL_WALL)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.85f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::RESIST_ICE)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.7f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::RESIST_AIR)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.7f), cegui_reldim(0.65f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	// Tab3 <hier Name einsetzen>
+	tab = (CEGUI::DefaultWindow*) win_mgr.createWindow("TaharezLook/TabContentPane", "SkilltreeArcher_3");
+	skilltree_archer->addTab(tab);
+	tab->setText("hmm was hier");
+
+	name =Action::getActionInfo(Action::AIMED_SHOT)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.05f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::WIND_WALK)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.45f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::BOW_SPIRIT)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.65f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::WIND_ARROWS)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.2f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::STORM_ARROWS)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.2f), cegui_reldim(0.65f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::ICE_ARROWS)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.7f), cegui_reldim(0.45f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::FREEZING_ARROWS)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.7f), cegui_reldim(0.85f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	for (act =Action::TRIPLE_SHOT;act <=Action::WIND_WALK;act++)
+	{
+		name =Action::getActionInfo((Action::ActionType) act)->m_enum_name;
+		//lname =Action::getName((Action::ActionType) act);
+		//label = win_mgr.getWindow(name.append( "Label"));
+		label = win_mgr.getWindow(name + "Label");
+		label->setProperty("FrameEnabled", "true");
+		label->setProperty("BackgroundEnabled", "true");
+		label->setID(act);
+		//label->setText(lname);
+		label->setProperty("Image", "set:skills image:" + name);
+		label->subscribeEvent(CEGUI::Window::EventMouseClick, CEGUI::Event::Subscriber(&MainWindow::onSkillMouseClicked, this));
+		label->subscribeEvent(CEGUI::Window::EventMouseEnters, CEGUI::Event::Subscriber(&MainWindow::onAbilityHover, this));
+
+	}
+
+	skilltree_archer->setVisible(false);
+
+
+	// Skilltree Priester
+	CEGUI::TabControl* skilltree_priest = (CEGUI::TabControl*) win_mgr.createWindow("TaharezLook/TabControl", "SkilltreePriest");
+	m_game_screen->addChildWindow(skilltree_priest);
+	skilltree_priest->setPosition(CEGUI::UVector2(cegui_reldim(0.52f), cegui_reldim( 0.0f)));
+	skilltree_priest->setSize(CEGUI::UVector2(cegui_reldim(0.48f), cegui_reldim( 0.77f)));
+	skilltree_priest->subscribeEvent(CEGUI::Window::EventMouseButtonDown, CEGUI::Event::Subscriber(&MainWindow::consumeEvent, this));
+	skilltree_priest->setWantsMultiClickEvents(false);
+	skilltree_priest->setAlpha(0.7);
+
+
+	// Tab Lichtmagie
+	tab = (CEGUI::DefaultWindow*) win_mgr.createWindow("TaharezLook/TabContentPane", "SkilltreePriest_1");
+	tab->setText(gettext("main_lightmagic"));
+	skilltree_priest->addTab(tab);
+
+	name =Action::getActionInfo(Action::HOLY_ATTACK)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.2f), cegui_reldim(0.05f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+	label->setID(Action::HOLY_ATTACK);
+	//label->setText(Action::getName(Action::HOLY_ATTACK));
+	label->setProperty("Image", "set:skills image:holy_attack");
+	label->subscribeEvent(CEGUI::Window::EventMouseClick, CEGUI::Event::Subscriber(&MainWindow::onSkillMouseClicked, this));
+	label->subscribeEvent(CEGUI::Window::EventMouseEnters, CEGUI::Event::Subscriber(&MainWindow::onAbilityHover, this));
+
+	name =Action::getActionInfo(Action::BLAZING_SHIELD)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.55f), cegui_reldim(0.05f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::MAGIC_SHIELD)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.55f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::BURNING_RAGE)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.55f), cegui_reldim(0.45f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::CURE_BLIND_MUTE)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.75f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::CURE_BLIND_MUTE_PARTY)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.75f), cegui_reldim(0.65f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::LIGHT_BEAM)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.35f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::BURNING_SUN)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.35f), cegui_reldim(0.85f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::HOLY_LIGHT)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.15f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::HOLY_FIRE)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.15f), cegui_reldim(0.65f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+
+	// Tab Wassermagie
+	tab = (CEGUI::DefaultWindow*) win_mgr.createWindow("TaharezLook/TabContentPane", "SkilltreePriest_2");
+	skilltree_priest->addTab(tab);
+	tab->setText(gettext("main_watermagic"));
+
+	name =Action::getActionInfo(Action::HEAL)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.05f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::CURE_POIS_BURN)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.7f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::HEAL_PARTY)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.45f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::ACID)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.7f), cegui_reldim(0.45f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::CURE_POIS_BURN_PARTY)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.7f), cegui_reldim(0.65f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::BREAK_BINDING)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.2f), cegui_reldim(0.45f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::DISRUPT_BINDING)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.2f), cegui_reldim(0.85f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+
+	// Tab Windmagie
+	tab = (CEGUI::DefaultWindow*) win_mgr.createWindow("TaharezLook/TabContentPane", "SkilltreePriest_3");
+	skilltree_priest->addTab(tab);
+	tab->setText(gettext("main_windmagic"));
+
+	name =Action::getActionInfo(Action::BLADE_STORM)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.05f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::KEEN_MIND)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.7f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::CURE_CONF_BSRK)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::CURE_CONF_BSRK_PARTY)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.45f), cegui_reldim(0.65f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::HYPNOSIS)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.7f), cegui_reldim(0.45f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::HYPNOSIS2)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.7f), cegui_reldim(0.85f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::DIVINE_WIND)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.2f), cegui_reldim(0.25f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	name =Action::getActionInfo(Action::DIVINE_STORM)->m_enum_name;
+	label = win_mgr.createWindow("TaharezLook/StaticImage", name.append( "Label") );
+	tab->addChildWindow(label);
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.2f), cegui_reldim(0.65f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.13f), cegui_reldim( 0.1f)));
+
+	for (act =Action::HOLY_LIGHT;act <=Action::KEEN_MIND;act++)
+	{
+		name =Action::getActionInfo((Action::ActionType) act)->m_enum_name;
+		//lname =Action::getName((Action::ActionType) act);
+		//label = win_mgr.getWindow(name.append( "Label"));
+		label = win_mgr.getWindow(name + "Label");
+		label->setProperty("FrameEnabled", "true");
+		label->setProperty("BackgroundEnabled", "true");
+		label->setID(act);
+		//label->setText(lname);
+		label->setProperty("Image", "set:skills image:" + name);
+		label->subscribeEvent(CEGUI::Window::EventMouseClick, CEGUI::Event::Subscriber(&MainWindow::onSkillMouseClicked, this));
+		label->subscribeEvent(CEGUI::Window::EventMouseEnters, CEGUI::Event::Subscriber(&MainWindow::onAbilityHover, this));
+
+	}
+
+	skilltree_priest->setVisible(false);
+}
+
+
+bool MainWindow::setupObjectInfo()
+{
+	DEBUG4("setup object info");
+
+	// Fenstermanager
+	CEGUI::WindowManager& win_mgr = CEGUI::WindowManager::getSingleton();
+	CEGUI::Window* label;
+
+	// Leiste fuer Informationen
+	label = win_mgr.createWindow("TaharezLook/StaticText", "ObjectInfoLabel");
+	m_game_screen->addChildWindow(label);
+	label->setProperty("FrameEnabled", "true");
+	label->setProperty("BackgroundEnabled", "true");
+	label->setPosition(CEGUI::UVector2(cegui_reldim(0.2f), cegui_reldim( 0.02f)));
+	label->setSize(CEGUI::UVector2(cegui_reldim(0.6f), cegui_reldim( 0.07f)));
+	label->setText("test");
+	label->setAlpha(0.5);
+	label->setProperty("MousePassThroughEnabled","true");
+
+	return true;
+}
+
+
+void  MainWindow::setWindowExtents(int width, int height){
+	//Set Mouse Region.. if window resizes, we should alter this to reflect as well
+	const OIS::MouseState &ms = m_mouse->getMouseState();
+	ms.width = width;
+	ms.height = height;
+}
+
+
+void  MainWindow::updateMainMenu()
+{
+
+	CEGUI::WindowManager& win_mgr = CEGUI::WindowManager::getSingleton();
+
+	CEGUI::MultiColumnList* savelist = (CEGUI::MultiColumnList*) win_mgr.getWindow("SavegameList");
+	savelist->resetList();
+
+	// Liste aller Files im Save Ordner der Form *.sav
+	Ogre::StringVectorPtr files = Ogre::ResourceGroupManager::getSingleton().findResourceNames("Savegame","*.sav");
+
+	ifstream file;
+	char head[50];
+	int len;
+	int n=0;
+	string name;
+	char lev;
+	std::string cl;
+	string classname;
+	std::ostringstream stream;
+	char* bp;
+
+	// iterieren ueber die Files
+	for (Ogre::StringVector::iterator it = files->begin(); it!= files->end();++it)
+	{
+		DEBUG("file found %s",it->c_str());
+		//File oeffnen
+
+		file.open(("../client/save/"+(*it)).c_str(),ios::in| ios::binary);
+		if (file.is_open())
+		{
+			savelist->addRow();
+
+			// Daten einlesen
+			for (int i=0;i<50;i++)
+			{
+				file.get(head[i]);
+			}
+
+			// nicht benoetigte Headerdaten ueberspringen
+			bp = head+7;
+			
+			char ctmp[11];
+			ctmp[10] = '\0';
+			strncpy(ctmp,bp,10);
+			cl = ctmp;
+
+			// Level einlesen
+			bp +=10;
+			DEBUG5("bp pointer: %i",bp-head);
+            lev = *(bp+32);
+			DEBUG5("level: %i",lev);
+			//hexwrite(bp,33);
+			stream.str("");
+			stream << (int) lev;
+			savelist->setItem(new ListItem(stream.str()),2,n);
+
+			// Klasse einlesen
+			if (cl=="warrior")
+				classname = "Krieger";
+			if (cl=="mage")
+				classname = "Magier";
+			if (cl=="archer")
+				classname = "Bogenschuetze";
+			if (cl=="priest")
+				classname = "Priester";
+			savelist->setItem(new ListItem(classname),1,n);
+
+			name = bp;
+			savelist->setItem(new SaveListItem(name,"save/"+(*it)),0,n);
+			n++;
+
+			file.close();
+		}
+	}
+
+}
+
+void MainWindow::updateCharInfo()
+{
+	// Spielerobjekt
+	ClientMPlayer* player = m_document->getMainPlayer();
+
+	std::string tooltip;
+
+	// Fenstermanager
+	CEGUI::WindowManager& win_mgr = CEGUI::WindowManager::getSingleton();
+
+	CEGUI::PushButton* btn;
+	CEGUI::Window* label;
+	ostringstream out_stream;
+
+	// Label Name
+	label =  win_mgr.getWindow("NameLabel");
+	out_stream.str("");
+	out_stream.str(player->getName());
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Label Klasse
+	label =  win_mgr.getWindow("ClassLabel");
+	out_stream.str("");
+	if (player->getTypeInfo()->m_subtype == "warrior")
+	{
+		out_stream.str(gettext("main_warrior"));
+	}
+	else if (player->getTypeInfo()->m_subtype == "mage")
+	{
+		out_stream.str(gettext("main_magician"));
+	}
+	else if (player->getTypeInfo()->m_subtype == "archer")
+	{
+		out_stream.str(gettext("main_archer"));
+	}
+	else if (player->getTypeInfo()->m_subtype == "priest")
+	{
+		out_stream.str(gettext("main_priest"));
+	}
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Label Level
+	label =  win_mgr.getWindow("LevelLabel");
+	out_stream.str("");
+	out_stream << "Level "<<(int) player->m_level;
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Label Staerke
+	label =  win_mgr.getWindow("StrengthValueLabel");
+	out_stream.str("");
+	out_stream << player->m_strength;
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Label Zauberkraft
+	label =  win_mgr.getWindow("MagicpowerValueLabel");
+	out_stream.str("");
+	out_stream << player->m_magic_power;
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Label Willenskraft
+	label =  win_mgr.getWindow("WillpowerValueLabel");
+	out_stream.str("");
+	out_stream << player->m_willpower;
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Label Geschick
+	label =  win_mgr.getWindow("DexterityValueLabel");
+	out_stream.str("");
+	out_stream << player->m_dexterity;
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Buttons zum erhoehen von Attributen sind nur sichtbar wenn Attributpunkt zu verteilen sind
+	bool add_but_vis = false;
+	if ( player->m_attribute_points>0)
+	{
+		add_but_vis=true;
+	}
+
+	// Sichtbarkeit der Buttons setzen
+	btn =   static_cast<CEGUI::PushButton*>(win_mgr.getWindow("StrengthAddButton"));
+	btn->setVisible(add_but_vis);
+	btn =  static_cast<CEGUI::PushButton*>(win_mgr.getWindow("DexterityAddButton"));
+	btn->setVisible(add_but_vis);
+	btn =  static_cast<CEGUI::PushButton*>(win_mgr.getWindow("WillpowerAddButton"));
+	btn->setVisible(add_but_vis);
+	btn =  static_cast<CEGUI::PushButton*>(win_mgr.getWindow("MagicpowerAddButton"));
+	btn->setVisible(add_but_vis);
+
+	// Label freie Attributspunkte
+	label =  win_mgr.getWindow("AttrPointsValueLabel");
+	out_stream.str("");
+	out_stream << player->m_attribute_points;;
+	//label->setVisible(add_but_vis);
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Label Ruestung
+	label =  win_mgr.getWindow("ArmorValueLabel");
+	out_stream.str("");
+	out_stream << player->m_armor;
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Label Attacke
+	label =  win_mgr.getWindow("AttackValueLabel");
+	out_stream.str("");
+	out_stream << player->m_base_damage.m_attack;
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Label Block
+	label =  win_mgr.getWindow("BlockValueLabel");
+	out_stream.str("");
+	out_stream << player->m_block;
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Label HP
+	label =  win_mgr.getWindow("HitpointsValueLabel");
+	out_stream.str("");
+	out_stream << (int) player->m_health <<"/" <<(int) player->m_max_health;
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Label Exp
+	label =  win_mgr.getWindow("ExperienceValueLabel");
+	out_stream.str("");
+	out_stream << (int) player->m_experience <<"/" <<(int) player->m_max_experience;
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Label Phys Resistenz
+	label =  win_mgr.getWindow("ResistPhysValueLabel");
+	out_stream.str("");
+	out_stream << player->m_resistances[Damage::PHYSICAL];
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Label Feuer Resistenz
+	label =  win_mgr.getWindow("ResistFireValueLabel");
+	out_stream.str("");
+		out_stream << player->m_resistances[Damage::FIRE];
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Label Eis Resistenz
+	label =  win_mgr.getWindow("ResistIceValueLabel");
+	out_stream.str("");
+	out_stream << player->m_resistances[Damage::ICE];
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Label Luft Resistenz
+	label =  win_mgr.getWindow("ResistAirValueLabel");
+	out_stream.str("");
+	out_stream << player->m_resistances[Damage::AIR];
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Label Angriffsgeschwindigkeit
+	label =  win_mgr.getWindow("AttackSpeedValueLabel");
+	out_stream.str("");
+	out_stream << player->m_attack_speed;
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Label Reichweite
+	label =  win_mgr.getWindow("RangeValueLabel");
+	out_stream.str("");
+	out_stream << player->m_attack_range;
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Label Durchschlagskraft
+	label =  win_mgr.getWindow("PowerValueLabel");
+	out_stream.str("");
+	out_stream << player->m_base_damage.m_power;
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Schaden Basisattacke
+	float minb=player->m_base_damage.getSumMinDamage();
+	float maxb=player->m_base_damage.getSumMaxDamage();
+	// Schaden Attacke links
+	float minl=player->m_left_damage.getSumMinDamage();
+	float maxl=player->m_left_damage.getSumMaxDamage();
+	// Schaden Attacke rechts
+	float minr=player->m_right_damage.getSumMinDamage();
+	float maxr=player->m_right_damage.getSumMaxDamage();
+
+
+
+	// Label Schaden Basisattacke
+	label =  win_mgr.getWindow( "BaseDmgLabel");
+	out_stream.str("");
+	if (player->getTypeInfo()->m_subtype == "mage")
+		out_stream << Action::getName(Action::MAGIC_ATTACK);
+	if (player->getTypeInfo()->m_subtype == "archer")
+		out_stream << Action::getName(Action::RANGE_ATTACK);
+	if (player->getTypeInfo()->m_subtype == "warrior")
+		out_stream << Action::getName(Action::ATTACK);
+	if (player->getTypeInfo()->m_subtype == "priest")
+		out_stream << Action::getName(Action::HOLY_ATTACK);
+
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Label Basisschaden
+	label =  win_mgr.getWindow("BaseDmgValueLabel");
+	out_stream.str("");
+	out_stream << (int) minb << "-" << (int) maxb;
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+	tooltip = player->m_base_damage.getDamageString();
+	if (tooltip != label->getTooltipText())
+	{
+		label->setTooltipText(tooltip);
+	}
+
+	// Label Attacke links
+	label =  win_mgr.getWindow( "Skill1DmgLabel");
+	out_stream.str("");
+	out_stream << Action::getName(m_document->getLeftAction());
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+
+	}
+
+	// Label Schaden Attacke links
+	label =  win_mgr.getWindow( "Skill1DmgValueLabel");
+	out_stream.str("");
+	out_stream << (int) minl << "-" << (int) maxl;
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+	tooltip = player->m_left_damage.getDamageString();
+	if (tooltip != label->getTooltipText())
+	{
+		label->setTooltipText(tooltip);
+	}
+
+
+
+	// Label Attacke rechts
+	label =  win_mgr.getWindow( "Skill2DmgLabel");
+	out_stream.str("");
+	out_stream << Action::getName(m_document->getRightAction());
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+
+	}
+
+	// Label Schaden Attacke rechts
+	label =  win_mgr.getWindow( "Skill2DmgValueLabel");
+	out_stream.str("");
+	out_stream << (int) minr << "-" << (int) maxr;
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+	tooltip = player->m_right_damage.getDamageString();
+	if (tooltip != label->getTooltipText())
+	{
+		label->setTooltipText(tooltip);
+	}
+}
+
+void MainWindow::updateControlPanel()
+{
+	// Fenstermanager
+	CEGUI::WindowManager& win_mgr = CEGUI::WindowManager::getSingleton();
+	CEGUI::Window* label;
+	ostringstream out_stream;
+	int timernr;
+	float perc=0;
+	std::string name;
+
+	// Balken fuer HP
+	CEGUI::ProgressBar* bar = static_cast<CEGUI::ProgressBar*>(win_mgr.getWindow( "HealthProgressBar"));
+	float hperc = m_document->getMainPlayer()->getHealthPerc();
+	if (bar->getProgress() != hperc)
+	{
+		bar->setProgress(hperc);
+	}
+
+	// Image Schaden Attacke links
+	label =  win_mgr.getWindow( "LeftClickAbilityImage");
+	name = Action::getActionInfo((Action::ActionType) m_document->getLeftAction())->m_enum_name;
+	if (("set:skills image:" + name) != label->getProperty("Image"))
+	{
+		label->setProperty("Image", "set:skills image:" + name);
+	}
+
+	// Balken fuer Schaden Attacke links
+	bar = static_cast<CEGUI::ProgressBar*>(win_mgr.getWindow( "LeftClickAbilityProgressBar"));
+	timernr =  Action::getActionInfo(m_document->getLeftAction())->m_timer_nr;
+	if (timernr==1)
+	{
+		perc = m_document->getMainPlayer()->m_timer1_perc;
+	}
+	if (timernr==2)
+	{
+		perc = m_document->getMainPlayer()->m_timer2_perc;
+	}
+
+	if (bar->getProgress() != perc)
+	{
+		bar->setProgress(perc);
+	}
+
+	perc =0;
+
+	// Image Attacke rechts
+	label =  win_mgr.getWindow( "RightClickAbilityImage");
+	name = Action::getActionInfo((Action::ActionType) m_document->getRightAction())->m_enum_name;
+	if (("set:skills image:" + name) != label->getProperty("Image"))
+	{
+		label->setProperty("Image", "set:skills image:" + name);
+	}
+
+	// Balken fuer Schaden Attacke rechts
+	bar = static_cast<CEGUI::ProgressBar*>(win_mgr.getWindow( "RightClickAbilityProgressBar"));
+	timernr =  Action::getActionInfo(m_document->getRightAction())->m_timer_nr;
+	if (timernr==1)
+	{
+		perc = m_document->getMainPlayer()->m_timer1_perc;
+	}
+	if (timernr==2)
+	{
+		perc = m_document->getMainPlayer()->m_timer2_perc;
+	}
+
+	if (bar->getProgress() != perc)
+	{
+		bar->setProgress(perc);
+	}
+
+	Item* it;
+	Equipement* equ = m_document->getMainPlayer()->m_equipement;
+
+	// Guertel
+	for (int i=0;i<10;i++)
+	{
+		out_stream.str("");
+		out_stream << "InventoryItem" << i;
+		label =  win_mgr.getWindow(out_stream.str().c_str());
+		it = equ->getItem(Equipement::SMALL_ITEMS+i);
+		out_stream.str("");
+		if (it!=0)
+		{
+			out_stream<< (it->getName());
+		}
+		if (label->getText()!=out_stream.str())
+		{
+			label->setText(out_stream.str());
+		}
+	}
+
+}
+
+void MainWindow::updateInventory()
+{
+	CEGUI::WindowManager& win_mgr = CEGUI::WindowManager::getSingleton();
+	CEGUI::Window* label;
+	ostringstream out_stream;
+
+	// Label Ruestung
+	out_stream.str("");
+	Equipement* equ = m_document->getMainPlayer()->m_equipement;
+	if (equ->getItem(Equipement::ARMOR)!=0)
+	{
+		out_stream << equ->getItem(Equipement::ARMOR)->getName();
+	}
+	label =  win_mgr.getWindow("ArmorItemLabel");
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Label Waffe
+	out_stream.str("");
+	if (equ->getItem(Equipement::WEAPON)!=0)
+	{
+		out_stream << equ->getItem(Equipement::WEAPON)->getName();
+	}
+	label =  win_mgr.getWindow("WeaponItemLabel");
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Label Helm
+	out_stream.str("");
+	if (equ->getItem(Equipement::HELMET)!=0)
+	{
+		out_stream << equ->getItem(Equipement::HELMET)->getName();
+	}
+	label =  win_mgr.getWindow("HelmetItemLabel");
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Label Schild
+	out_stream.str("");
+	if (equ->getItem(Equipement::SHIELD)!=0)
+	{
+		out_stream << equ->getItem(Equipement::SHIELD)->getName();
+	}
+	label =  win_mgr.getWindow("ShieldItemLabel");
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Label Handschuhe
+	out_stream.str("");
+	if (equ->getItem(Equipement::GLOVES)!=0)
+	{
+		out_stream << equ->getItem(Equipement::GLOVES)->getName();
+	}
+	label =  win_mgr.getWindow("GlovesItemLabel");
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Label Ring links
+	out_stream.str("");
+	if (equ->getItem(Equipement::RING_LEFT)!=0)
+	{
+		out_stream << equ->getItem(Equipement::RING_LEFT)->getName();
+	}
+	label =  win_mgr.getWindow("RingLeftItemLabel");
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	// Label Ring rechts
+	out_stream.str("");
+	equ = m_document->getMainPlayer()->m_equipement;
+	if (equ->getItem(Equipement::RING_RIGHT)!=0)
+	{
+		out_stream << equ->getItem(Equipement::RING_RIGHT)->getName();
+	}
+	label =  win_mgr.getWindow("RingRightItemLabel");
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+	// Label Amulet
+	out_stream.str("");
+	equ = m_document->getMainPlayer()->m_equipement;
+	if (equ->getItem(Equipement::AMULET)!=0)
+	{
+		out_stream << equ->getItem(Equipement::AMULET)->getName();
+	}
+	label =  win_mgr.getWindow("AmuletItemLabel");
+	if (label->getText()!=out_stream.str())
+	{
+		label->setText(out_stream.str());
+	}
+
+	int i;
+	Item* it;
+	// Inventar: grosse Items
+	for (i=0;i<5;i++)
+	{
+		out_stream.str("");
+		out_stream << "BigItem" << i<< "Label";
+		label =  win_mgr.getWindow(out_stream.str().c_str());
+		it = equ->getItem(Equipement::BIG_ITEMS+i);
+		out_stream.str("");
+		if (it!=0)
+		{
+			out_stream<< (it->getName());
+		}
+		if (label->getText()!=out_stream.str())
+		{
+			label->setText(out_stream.str());
+		}
+	}
+
+	// Inventar: mittlere Items
+	for (i=0;i<14;i++)
+	{
+		out_stream.str("");
+		out_stream << "MediumItem" << i<< "Label";
+		label =  win_mgr.getWindow(out_stream.str().c_str());
+		it = equ->getItem(Equipement::MEDIUM_ITEMS+i);
+		out_stream.str("");
+		if (it!=0)
+		{
+			out_stream<< (it->getName());
+		}
+		if (label->getText()!=out_stream.str())
+		{
+			label->setText(out_stream.str());
+		}
+	}
+
+	// Inventar: kleine Items
+	for (i=0;i<30;i++)
+	{
+		out_stream.str("");
+		out_stream << "SmallItem" << i<< "Label";
+		label =  win_mgr.getWindow(out_stream.str().c_str());
+		it = equ->getItem(Equipement::SMALL_ITEMS+i);
+		out_stream.str("");
+		if (it!=0)
+		{
+			out_stream<< (it->getName());
+		}
+		if (label->getText()!=out_stream.str())
+		{
+			label->setText(out_stream.str());
+		}
+	}
+
+
+}
+
+void MainWindow::updateSkilltree()
+{
+	CEGUI::WindowManager& win_mgr = CEGUI::WindowManager::getSingleton();
+	CEGUI::Window* label;
+	ostringstream out_stream;
+
+	ClientMPlayer* player = m_document->getMainPlayer();
+
+	// Enum Wert bei dem die Skillz des Spielers anfangen
+	int i=Action::BASH;
+	if (player->getTypeInfo()->m_subtype == "mage")
+		i = Action::FIRE_BOLT;
+	if (player->getTypeInfo()->m_subtype == "archer")
+		i= Action::TRIPLE_SHOT;
+	if (player->getTypeInfo()->m_subtype == "priest")
+		i= Action::HOLY_LIGHT;
+
+	// Schleife ueber alle Skill labels
+	for (int j=i;j<i+24;j++)
+	{
+		out_stream.str("");
+		out_stream << Action::getActionInfo((Action::ActionType) j)->m_enum_name << "Label";
+
+		// Label welches das Skillicon zeigt
+		label = win_mgr.getWindow(out_stream.str());
+
+		// Alpha Wert des Labels
+		float alpha = 0.2;
+
+		if (player->checkAbilityLearnable((Action::ActionType) j))
+		{
+			// Faehigkeit kann gelernt werden
+			alpha = 0.6;
+		}
+
+		if (player->checkAbility((Action::ActionType) j))
+		{
+			// Faehigkeit steht zur Verfuegung
+			alpha = 1.0;
+		}
+
+		if (label->getAlpha() != alpha)
+		{
+			label->setAlpha(alpha);
+		}
+	}
+}
+
+void MainWindow::updateItemTooltip()
+{
+	if (m_document->getDetailedItem())
+	{
+		short pos= m_document->getDetailedItemPos();
+		DEBUG5("setting tool tip for item at %i",pos);
+		CEGUI::WindowManager& win_mgr = CEGUI::WindowManager::getSingleton();
+		CEGUI::Window* label;
+		ostringstream out_stream;
+		out_stream.str("");
+		if (pos == Equipement::ARMOR)
+			out_stream << "ArmorItemLabel";
+		if (pos == Equipement::WEAPON || pos == Equipement::WEAPON2)
+			out_stream << "WeaponItemLabel";
+		if (pos == Equipement::HELMET)
+			out_stream << "HelmetItemLabel";
+		if (pos == Equipement::SHIELD || pos == Equipement::SHIELD2)
+			out_stream << "ShieldItemLabel";
+		if (pos == Equipement::GLOVES)
+			out_stream << "GlovesItemLabel";
+		if (pos == Equipement::RING_LEFT)
+			out_stream << "RingLeftLabel";
+		if (pos == Equipement::RING_RIGHT)
+			out_stream << "RingRightItemLabel";
+		if (pos == Equipement::AMULET)
+			out_stream << "AmuletItemLabel";
+		if (pos>= Equipement::BIG_ITEMS && pos <  Equipement::MEDIUM_ITEMS)
+		{
+			out_stream << "BigItem"<<pos-Equipement::BIG_ITEMS<<"Label";
+		}
+		if (pos>= Equipement::MEDIUM_ITEMS && pos < Equipement::SMALL_ITEMS)
+		{
+			out_stream << "MediumItem"<<pos-Equipement::MEDIUM_ITEMS<<"Label";
+		}
+		if (pos>= Equipement::SMALL_ITEMS)
+		{
+			out_stream << "SmallItem"<<pos-Equipement::SMALL_ITEMS<<"Label";
+		}
+		label = win_mgr.getWindow(out_stream.str());
+
+
+		std::string msg =m_document->getDetailedItem()->getDescription();
+		label->setTooltipText(msg);
+
+		if (pos>= Equipement::SMALL_ITEMS && pos< Equipement::SMALL_ITEMS+10)
+		{
+			// Item befindet sich im Guertel
+			out_stream.str("");
+			out_stream << "InventoryItem"<<pos-Equipement::SMALL_ITEMS;
+			label = win_mgr.getWindow(out_stream.str());
+			label->setTooltipText(msg);
+		}
+	}
+}
+
+void MainWindow::updateAbilityTooltip()
+{
+	if (m_document->getAbilityPos()!=Action::NOACTION)
+	{
+		DEBUG("update tooltip for %i", m_document->getAbilityPos());
+
+		CEGUI::WindowManager& win_mgr = CEGUI::WindowManager::getSingleton();
+		CEGUI::Window* label;
+		ostringstream out_stream;
+		out_stream.str("");
+		out_stream << Action::getActionInfo(m_document->getAbilityPos())->m_enum_name << "Label";
+
+		label = win_mgr.getWindow(out_stream.str());
+
+		std::string tooltip = m_document->getAbilityDescription();
+
+		label->setTooltipText(tooltip);
+
+	}
+}
+
+void MainWindow::updateObjectInfo()
+{
+	// Ogre Name des Objektes auf das der Mauszeiger zeigt
+	std::string objname = "";
+
+	// Fenstermanager
+	CEGUI::WindowManager& win_mgr = CEGUI::WindowManager::getSingleton();
+	CEGUI::Window* label = win_mgr.getWindow("ObjectInfoLabel");
+
+	// Position der Maus
+	float x = m_mouse->getMouseState().X.abs;
+	float y = m_mouse->getMouseState().Y.abs;
+
+
+		// Position des Mausklicks relativ zum Viewport
+	Ogre::Viewport* viewport = m_scene->getViewport();
+	float relx = x*1.0/(viewport->getActualWidth());
+	float rely = y*1.0/(viewport->getActualHeight());
+
+	// Strahl von der Kamera durch den angeklickten Punkt
+	Ogre::Camera* camera = m_scene->getCamera();
+	Ogre::Ray ray = camera->getCameraToViewportRay(relx,rely);
+
+	Ogre::Entity* ent;
+
+
+	// Ergebnispaar einer Intersection Abfrage
+	std::pair<bool,Ogre::Real> isec;
+
+	if (m_mouse->getMouseState().buttons !=0)
+	{
+		// fokussiertes Objekt nicht wechseln, wenn Maustaste gedrueckt
+		objname = m_document->getGUIState()->m_cursor_object;
+	}
+	else
+	{
+
+		ostringstream out_stream;
+		out_stream.str("");
+
+
+		// Objekte in der Szene
+		map<int,string>* objects = m_scene->getObjects();
+		map<int,string>::iterator it;
+
+		// minimale Distanz eine Objektes im Kamerastrahl
+		float mindist = 1000000;
+
+		for (it = objects->begin();it != objects->end();++it)
+		{
+			if (m_document->getMainPlayer()->getId() == it->first)
+			{
+				// Spieler selbst ueberspringen
+				continue;
+			}
+
+			ent = m_scene_manager->getEntity(it->second);
+
+			// Auf Ueberschneidung mit dem Kamerastrahl testen
+			const Ogre::AxisAlignedBox& box = ent->getWorldBoundingBox();
+			isec = ray.intersects(box);
+
+			if (isec.first)
+			{
+
+				// Objekt wird vom Kamerastrahl geschnitten
+				if (isec.second<mindist)
+				{
+					// Objekt ist das bisher naechste
+					objname = it->second;
+					mindist = isec.second;
+				}
+			}
+
+		}
+		m_document->getGUIState()->m_cursor_object=objname;
+
+		if (objname=="")
+		{
+			// aktuell kein Objekt unterm Mauszeiger
+			m_document->getGUIState()->m_cursor_object_id =0;
+
+			label->setVisible(false);
+		}
+	}
+
+	std::string name;
+	std::ostringstream string_stream;
+
+	if (objname!="")
+	{
+		// es gibt ein ein Objekt unterm Mauszeiger
+		m_document->getGUIState()->m_cursor_item_id =0;
+		label->setVisible(true);
+
+		// ID des Objektes ermitteln
+		int pos = objname.find(":");
+		std::string idstring = objname.substr(pos+1);
+		name = objname.substr(0,pos);
+		std::stringstream stream(idstring);
+		int id;
+		stream >> id;
+
+		string_stream<<name;
+
+		// zur ID gehoerendes Objekt
+		ClientWObject* cwo;
+		map<int, ClientWObject*>::iterator it2 =m_document->getObjects()->find(id);
+		if (it2 != m_document->getObjects()->end())
+		{
+		// Objekt existiert
+			m_document->getGUIState()->m_cursor_object_id = id;
+
+			cwo = it2->second;
+			if (cwo->getTypeInfo()->m_type != WorldObject::TypeInfo::TYPE_FIXED_OBJECT)
+			{
+			// Objekt ist ein Lebewesen
+			// Lebenspunkte anfuegen
+
+				string_stream << " " << max(0,(int) (cwo->getHealthPerc()*100)) <<"%";
+			}
+		}
+		else
+		{
+			m_document->getGUIState()->m_cursor_object_id =0;
+			m_document->getGUIState()->m_cursor_object="";
+		}
+	}
+	else
+	{
+		// Nach Items unterm Mauszeiger suchen
+		map<int,string>* itms = m_scene->getDropItems();
+		map<int,string>::iterator it;
+
+		int id=0;
+
+		for (it = itms->begin();it != itms->end();++it)
+		{
+			ent = m_scene_manager->getEntity(it->second);
+
+			// Auf Ueberschneidung mit dem Kamerastrahl testen
+			const Ogre::AxisAlignedBox& box = ent->getWorldBoundingBox();
+			isec = ray.intersects(box);
+
+			if (isec.first)
+			{
+
+				// Objekt wird vom Kamerastrahl geschnitten
+				objname = it->second;
+				break;
+
+			}
+
+		}
+
+		if (objname!="")
+		{
+			// Item gefunden
+			// ID des Objektes ermitteln
+			int pos = objname.find(":");
+			std::string idstring = objname.substr(pos+1);
+			name = objname.substr(0,pos);
+			std::stringstream stream(idstring);
+			int id;
+			stream >> id;
+			string_stream<<name;
+
+			map<int,DropItem>::iterator it3 =m_document->getDropItems()->find(id);
+
+			if (it3 != m_document->getDropItems()->end())
+			{
+				// Objekt existiert
+				m_document->getGUIState()->m_cursor_item_id = id;
+				label->setVisible(true);
+			}
+			else
+			{
+				m_document->getGUIState()->m_cursor_object_id =0;
+				m_document->getGUIState()->m_cursor_object="";
+			}
+		}
+
+
+	}
+
+
+
+	name = string_stream.str();
+
+	if (label->getText() != name)
+	{
+
+		label->setText(name);
+	}
+
+
+}
+
+// MouseListener
+bool MainWindow::mouseMoved(const OIS::MouseEvent &evt) {
+	m_cegui_system->injectMouseWheelChange(evt.state.Z.rel);
+	//return m_cegui_system->injectMouseMove(evt.state.X.rel, evt.state.Y.rel);
+	//DEBUG("injection position %i %i",evt.state.X.abs,evt.state.Y.abs);
+	return m_cegui_system->injectMousePosition(evt.state.X.abs,evt.state.Y.abs);
+}
+
+bool MainWindow::mousePressed(const OIS::MouseEvent &evt, OIS::MouseButtonID btn)
+{
+	m_gui_hit = false;
+
+	CEGUI::MouseButton button = CEGUI::NoButton;
+
+	if (btn == OIS::MB_Left)
+		button = CEGUI::LeftButton;
+
+	if (btn == OIS::MB_Middle)
+		button = CEGUI::MiddleButton;
+
+	if (btn == OIS::MB_Right)
+		button = CEGUI::RightButton;
+
+	bool ret = m_cegui_system->injectMouseButtonDown(button);
+
+	// Koordinaten an denen der Mausklick stattfand
+	int x =evt.state.X.abs;
+	int y =evt.state.Y.abs;
+	DEBUG5("maus %i %i",x,y);
+
+	ClientMPlayer* m_pl = m_document->getMainPlayer();
+	if (m_pl!=0)
+	{
+		// Spiel ist mit Server verbunden
+
+		// Testet, dass man nicht auf die untere Steuerleiste geklickt hat
+		// TODO: vernuenftige Vorgehensweise um Klicks auf GUI Elemente zu erkennen
+		if (not m_gui_hit && not ret)
+		{
+			if (m_document->getMainPlayer()->m_equipement->getItem(Equipement::CURSOR_ITEM)!=0)
+			{
+				// Spieler hat Item in der Hand, fallen lassen
+				m_document->dropCursorItem();
+			}
+			else
+			{
+
+				// Koordinaten des Spielers
+				float mpx=m_pl->getGeometry()->m_shape.m_coordinate_x;
+				float mpy=m_pl->getGeometry()->m_shape.m_coordinate_y;
+
+				// Position des Mausklicks relativ zum Viewport
+				Ogre::Viewport* viewport = m_scene->getViewport();
+				float relx = x*1.0/(viewport->getActualWidth());
+				float rely = y*1.0/(viewport->getActualHeight());
+				DEBUG5("relative Koordinaten %f %f",relx,rely);
+
+				// Strahl von der Kamera durch den angeklickten Punkt
+				Ogre::Camera* camera = m_scene->getCamera();
+				Ogre::Ray ray = camera->getCameraToViewportRay(relx,rely);
+
+				// Ursprung und Richtung des Strahles
+				const Ogre::Vector3& orig = ray.getOrigin();
+				DEBUG5("ray orig %f %f %f",orig.x,orig.y,orig.z);
+				const Ogre::Vector3& dir = ray.getDirection();
+				DEBUG5("ray dir %f %f %f",dir.x,dir.y,dir.z);
+
+				// Schnittpunkt mit der Ebene y=0 ausrechnen
+				if (dir.y <0)
+				{
+					// Strahl zeigt *nach unten*
+
+					// Durchstosspunkt durch die Ebene y=0
+					Ogre::Vector3 p = orig + dir*(orig.y/(-dir.y));
+					DEBUG5("schnittpunkt %f %f %f",p.x,p.y,p.z);
+
+					// Umrechnen in Spielkoordinaten
+					float gx = p.x/50;
+					float gy = p.z/50;
+					DEBUG5("Punkt in Spielkoordinaten %f %f",gx,gy);
+
+					// Koordinaten relativ zum Spieler
+					gx -= mpx;
+					gy -= mpy;
+
+					if (btn == OIS::MB_Left)
+					{
+						m_document->getGUIState()->m_left_mouse_hold=true;
+						m_document->onLeftMouseButtonClick(gx, gy);
+					}
+					else if (btn == OIS::MB_Right)
+					{
+						m_document->getGUIState()->m_right_mouse_hold=true;
+						m_document->onRightMouseButtonClick(gx, gy);
+					}
+
+
+				}
+				else
+				{
+					// Strahl zeigt nach oben, ueber den Horizont
+					// sollte eigentlich nicht passieren
+				}
+			}
+		}
+
+	}
+
+	return ret;
+}
+
+bool MainWindow::mouseReleased(const OIS::MouseEvent &evt, OIS::MouseButtonID btn) {
+	CEGUI::MouseButton button = CEGUI::NoButton;
+
+	if (btn==OIS::MB_Left)
+	{
+		DEBUG5("Button release");
+		m_document->getGUIState()->m_left_mouse_hold=false;
+		m_document->getGUIState()->m_clicked_object_id=0;
+	}
+
+	if (btn==OIS::MB_Right)
+	{
+		DEBUG5("Right Button release");
+		m_document->getGUIState()->m_right_mouse_hold=false;
+		m_document->getGUIState()->m_clicked_object_id=0;
+	}
+
+	if (btn == OIS::MB_Left)
+		button = CEGUI::LeftButton;
+
+	if (btn == OIS::MB_Middle)
+		button = CEGUI::MiddleButton;
+
+	if (btn == OIS::MB_Right)
+		button = CEGUI::RightButton;
+
+	return m_cegui_system->injectMouseButtonUp(button);
+}
+
+
+bool MainWindow::keyPressed(const OIS::KeyEvent &evt) {
+	unsigned int ch = evt.text;
+
+	m_cegui_system->injectKeyDown(evt.key);
+	DEBUG5("keycode %x",evt.key);
+	bool ret = m_cegui_system->injectChar(ch);
+	if (not ret)
+	{
+		ret = m_document->onKeyPress(evt.key);
+	}
+	return ret;
+}
+
+bool MainWindow::keyReleased(const OIS::KeyEvent &evt)
+{
+
+	bool ret = m_cegui_system->injectKeyUp(evt.key);
+
+	if (not ret)
+	{
+		ret = m_document->onKeyRelease(evt.key);
+	}
+
+	return ret;
+}
+
+
+bool MainWindow::onButtonSaveExitClicked(const CEGUI::EventArgs& evt)
+{
+	m_document->onButtonSaveExitClicked();
+	return true;
+}
+
+bool MainWindow::onButtonInventoryClicked(const CEGUI::EventArgs& evt)
+{
+	m_document->onButtonInventoryClicked();
+	return true;
+}
+
+bool MainWindow::onButtonCharInfoClicked(const CEGUI::EventArgs& evt)
+{
+	m_document->onButtonCharInfoClicked();
+	return true;
+}
+
+bool MainWindow::onButtonSkilltreeClicked(const CEGUI::EventArgs& evt)
+{
+	m_document->onButtonSkilltreeClicked();
+	return true;
+}
+
+bool MainWindow::onItemMouseButtonPressed(const CEGUI::EventArgs& evt)
+{
+	const CEGUI::MouseEventArgs& we =
+			static_cast<const CEGUI::MouseEventArgs&>(evt);
+	unsigned int id = we.window->getID();
+
+	if (we.button == CEGUI::LeftButton)
+	{
+		m_document->onItemLeftClick((short) id);
+	}
+
+	if (we.button == CEGUI::RightButton)
+	{
+		m_document->onItemRightClick((short) id);
+	}
+
+
+}
+
+bool MainWindow::onItemMouseButtonReleased(const CEGUI::EventArgs& evt)
+{
+	const CEGUI::MouseEventArgs& we =
+			static_cast<const CEGUI::MouseEventArgs&>(evt);
+	unsigned int id = we.window->getID();
+	if (we.button == CEGUI::LeftButton)
+	{
+		DEBUG("left button released on Item %i",id);
+	}
+
+}
+
+bool MainWindow::onSkillMouseClicked(const CEGUI::EventArgs& evt)
+{
+	const CEGUI::MouseEventArgs& we =
+			static_cast<const CEGUI::MouseEventArgs&>(evt);
+	unsigned int id = we.window->getID();
+
+	if (we.button == CEGUI::LeftButton)
+	{
+		DEBUG("left button pressed on skill %i",id);
+		if (m_document->getMainPlayer())
+		{
+			if (m_document->getMainPlayer()->checkAbility((Action::ActionType) id))
+			{
+				// Faehigkeit ist verfuegbar, setzen
+				m_document->setLeftAction((Action::ActionType) id);
+			}
+			else
+			{
+				// versuche Faehigkeit zu lernen
+				m_document->learnAbility((Action::ActionType) id);
+			}
+		}
+
+	}
+
+	if (we.button == CEGUI::RightButton)
+	{
+		DEBUG("right button pressed on skill %i",id);
+		m_document->setRightAction((Action::ActionType) id);
+	}
+
+}
+
+bool MainWindow::onSwapEquipClicked(const CEGUI::EventArgs& evt)
+{
+	m_document->onSwapEquip();
+}
+
+bool MainWindow::onItemHover(const CEGUI::EventArgs& evt)
+{
+	const CEGUI::MouseEventArgs& we =
+			static_cast<const CEGUI::MouseEventArgs&>(evt);
+	unsigned int id = we.window->getID();
+	DEBUG5("mouse entered Item %i",id);
+	m_document->requestItemDetailedInfo((short) id);
+}
+
+bool MainWindow::onAbilityHover(const CEGUI::EventArgs& evt)
+{
+	const CEGUI::MouseEventArgs& we =
+			static_cast<const CEGUI::MouseEventArgs&>(evt);
+	unsigned int id = we.window->getID();
+	DEBUG5("mouse entered Ability %i",id);
+	m_document->requestAbilityDamage((Action::ActionType) id);
+}
+
+bool MainWindow::onIncreaseAttributeButtonClicked(const CEGUI::EventArgs& evt)
+{
+	const CEGUI::MouseEventArgs& we =
+			static_cast<const CEGUI::MouseEventArgs&>(evt);
+	unsigned int id = we.window->getID();
+	DEBUG("left button pressed on skill %i",id);
+	m_document->increaseAttribute((CreatureBaseAttr::Attribute) id);
+
+}
+
+bool MainWindow::onButtonPartyClicked(const CEGUI::EventArgs& evt)
+{
+	// Debugging
+	m_document->emitDebugSignal(0);
+}
+
+bool MainWindow::onButtonOpenChatClicked(const CEGUI::EventArgs& evt)
+{
+	// Debugging
+	m_document->emitDebugSignal(1);
+}
+
+bool MainWindow::onSavegameChosen(const CEGUI::EventArgs& evt)
+{
+	CEGUI::WindowManager& win_mgr = CEGUI::WindowManager::getSingleton();
+
+	CEGUI::MultiColumnList* savelist = (CEGUI::MultiColumnList*) win_mgr.getWindow("SavegameList");
+
+	CEGUI::ListboxItem * itm = savelist->getFirstSelectedItem();
+
+
+	if (itm !=0)
+	{
+		SaveListItem * sitm = (SaveListItem *) itm;
+		m_document->setSaveFile(sitm->m_filename);
+		DEBUG("selected Savegame %s", sitm->m_filename.c_str());
+	}
+
+}
+
+bool MainWindow::onSavegameSelected(const CEGUI::EventArgs& evt)
+{
+	if (m_document->getSaveFile() != "")
+	{
+		DEBUG("savegame accepted %s", m_document->getSaveFile().c_str());
+		m_document->getGUIState()->m_shown_windows = Document::START_MENU;
+		m_document->setModified(Document::WINDOWS_MODIFIED);
+	}
+}
+
+bool MainWindow::onStartSinglePlayer(const CEGUI::EventArgs& evt)
+{
+	DEBUG("start single player game");
+	// Spieler ist selbst der Host
+	m_document->getNetworkInfo()->m_host = true;
+	// Server laeuft auf dem eigenen Rechner
+	strcpy(m_document->getNetworkInfo()->m_server_ip,"127.0.0.1");
+
+	// Verbindung aufbauen
+	m_document->setState(Document::START_SERVER);
+}
+
+bool MainWindow::onStartMultiPlayer(const CEGUI::EventArgs& evt)
+{
+	DEBUG("start multi player game");
+	// Spieler ist selbst der Host
+	m_document->getNetworkInfo()->m_host = false;
+
+	// Server laeuft auf dem entferntem Rechner
+	// IP setzen...
+	strcpy(m_document->getNetworkInfo()->m_server_ip,"127.0.0.1");;
+
+	// Verbindung aufbauen
+	m_document->setState(Document::CONNECT_REQUEST);
+}
+
+bool MainWindow::onStartMultiPlayerHost(const CEGUI::EventArgs& evt)
+{
+	DEBUG("start single player game");
+	// Spieler ist selbst der Host
+	m_document->getNetworkInfo()->m_host = true;
+
+	// Server laeuft auf dem eigenen Rechner
+	strcpy(m_document->getNetworkInfo()->m_server_ip,"127.0.0.1");
+
+	// Verbindung aufbauen
+	m_document->setState(Document::START_SERVER);
+}
+
+
+
+
+
+
+
+
+
+
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gui/mainwindow.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,435 @@
+
+#ifndef MAIN_WINDOW_H
+#define MAIN_WINDOW_H
+
+
+#include "Ogre.h"
+
+// needed to be able to create the CEGUI renderer interface
+#include "OgreCEGUIRenderer.h"
+
+// CEGUI includes
+#include "CEGUI.h"
+#include "numberedwindow.h"
+
+
+// OIS
+#include "OISEvents.h"
+#include "OISInputManager.h"
+#include "OISMouse.h"
+#include "OISKeyboard.h"
+#include "OISJoyStick.h"
+
+#include "document.h"
+#include "scene.h"
+#include "../shared/gettext.h"
+
+// Sample sub-class for ListboxTextItem that auto-sets the selection brush
+// image.  This saves doing it manually every time in the code.
+class ListItem : public CEGUI::ListboxTextItem
+{
+	public:
+		ListItem(const CEGUI::String& text) : ListboxTextItem(text)
+		{
+			setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
+		}
+};
+
+
+class SaveListItem : public ListItem
+{
+	public:
+		SaveListItem(const CEGUI::String& text, std::string file) : ListItem(text)
+		{
+			setSelectionBrushImage("TaharezLook", "MultiListSelectionBrush");
+			m_filename = file;
+		}
+
+		std::string m_filename;
+};
+
+
+
+/**
+ * \class MainWindow
+ * \brief Implementiert das Hauptfenster der Applikation
+ */
+class MainWindow :
+	public OIS::MouseListener,
+	public OIS::KeyListener
+{
+
+	public:
+
+
+	/**
+	 * \fn MainWindow(Ogre::Root* ogreroot, CEGUI::System* ceguisystem,Ogre::RenderWindow* window,Document* doc)
+	 * \param ogreroot Zeiger auf das Basisobjekt von Ogre
+	 * \param ceguisystem Zeiger auf das Basisobjekt von CEGUI
+	 * \param window Fenster in die Applikation gestartet wird
+	 * \param doc Zeiger auf das Dokument
+	 */
+	MainWindow(Ogre::Root* ogreroot, CEGUI::System* ceguisystem,Ogre::RenderWindow* window,Document* doc);
+
+	/**
+	 * \fn ~MainWindow()
+	 * \brief Destruktor
+	 */
+	~MainWindow();
+
+	/**
+	 * \fn init()
+	 * \brief Initialisiert das Objekt
+	 * \return true, wenn erfolgreich, sonst false
+	 */
+	bool init();
+
+	/**
+	 * \fn void update()
+	 * \brief aktualisiert die Anzeige
+	 */
+	void update();
+
+	/**
+	 * \fn bool setupMainScreen()
+	 * \brief Erstellt den Hauptspielbildschirm
+	 * \return true, wenn erfolgreich, sonst false
+	 */
+	bool setupGameScreen();
+
+	/**
+	 * \fn void setupControlPanel()
+	 * \brief Erzeugt die Kontrollleiste
+	 */
+	void setupControlPanel();
+
+	/**
+	 * \fn void setupInventory()
+	 * \brief Erzeugt das Fenster Inventar
+	 */
+	void setupInventory();
+
+	/**
+	 * \fn void setupCharInfo()
+	 * \brief Erzeugt das Fenster CharakterInfo
+	 */
+	void setupCharInfo();
+
+	/**
+	 * \fn void setupSkilltree()
+	 * \brief Erzeugt das Fenster Skilltree
+	 */
+	void setupSkilltree();
+
+
+	/**
+	 * \fn bool setupMainMenu()
+	 * \brief Erstellt das Hauptmenue
+	 * \return true, wenn erfolgreich, sonst false
+	 */
+	bool setupMainMenu();
+
+
+	/**
+	 * \fn bool setupObjectInfo()
+	 * \brief Erstellt die Leiste mit Informationen zu einem Objekt
+	 */
+	bool setupObjectInfo();
+
+	/**
+	 * \fn bool initInputs()
+	 * \brief Initialisiert die Eingabegeraete
+	 */
+	bool initInputs();
+
+	/**
+	 * \fn void updateMainMenu()
+	 * \brief Aktualisiert das Hauptmenue
+	 */
+	void updateMainMenu();
+
+	/**
+	 * \fn void updateCharInfo()
+	 * \brief Aktualisiert die Anzeigen des CharakterInfo Fensters
+	 */
+	void updateCharInfo();
+
+	/**
+	 * \fn void updateControlPanel()
+	 * \brief Aktualisiert die Kontrollleiste
+	 */
+	void updateControlPanel();
+
+	/**
+	 * \fn void updateInventory()
+	 * \brief Aktualisiert die Inventaranzeige
+	 */
+	void updateInventory();
+
+	/**
+	 * \fn void updateSkilltree()
+	 * \brief Aktualisiert Skilltree
+	 */
+	void updateSkilltree();
+
+	/**
+	 * \fn void updateItemTooltip()
+	 * \brief Aktualisiert den Tooltip fuer das Item ueber dem die Maus ist
+	 */
+	void updateItemTooltip();
+
+	/**
+	 * \fn void updateAbilityTooltip()
+	 * \brief Aktualisiert den Tooltip fuer die Faehigkeit ueber der die Maus ist
+	 */
+	void updateAbilityTooltip();
+
+	/**
+	 * \fn void updateObjectInfo()
+	 * \brief Aktualisiert die Leiste mit Informationen zu einem Objekt
+	 */
+	void updateObjectInfo();
+
+
+	/**
+	 * \fn bool mouseMoved(const OIS::MouseEvent &evt)
+	 * \brief Behandelt Mausbewegung
+	 */
+	bool mouseMoved(const OIS::MouseEvent &evt);
+
+	/**
+	 * \fn bool mousePressed(const OIS::MouseEvent &evt, OIS::MouseButtonID)
+	 * \brief Behandelt Druecken von Maustasten
+	 */
+	bool mousePressed(const OIS::MouseEvent &evt, OIS::MouseButtonID);
+
+	/**
+	 * \fn bool mouseReleased(const OIS::MouseEvent &evt, OIS::MouseButtonID)
+	 * \brief Behandelt Loslassen von Maustasten
+	 */
+	bool mouseReleased(const OIS::MouseEvent &evt, OIS::MouseButtonID);
+
+	/**
+	 * \fn bool keyPressed(const OIS::KeyEvent &evt)
+	 * \brief Behandelt Druecken von Tasten auf der Tastatur
+	 */
+	bool keyPressed(const OIS::KeyEvent &evt);
+
+	/**
+	 * \fn bool keyReleased(const OIS::KeyEvent &evt)
+	 * \brief Behandelt Loslassen von Tasten auf der Tastatur
+	 */
+	bool keyReleased(const OIS::KeyEvent &evt);
+
+	/**
+	 * \fn void setWindowExtents(int width, int height)
+	 * \brief Setzt die Groesse des Fensters
+	 * \param width Breite
+	 * \param height Hoehe
+	 */
+	void setWindowExtents(int width, int height);
+
+	/**
+	 * \fn bool onSavegameChosen(const CEGUI::EventArgs& evt)
+	 * \brief Behandelt Auswahl eines Savegames in der Liste
+	 */
+	bool onSavegameChosen(const CEGUI::EventArgs& evt);
+
+	/**
+	 * \fn bool onSavegameSelected(const CEGUI::EventArgs& evt)
+	 * \brief Behandelt Auswahl eines Savegames
+	 */
+	bool onSavegameSelected(const CEGUI::EventArgs& evt);
+
+
+	/**
+	 * \fn bool onStartSinglePlayer(const CEGUI::EventArgs& evt)
+	 * \brief Behandelt Start eines Einzelspielerspieles
+	 */
+	bool onStartSinglePlayer(const CEGUI::EventArgs& evt);
+
+	/**
+	 * \fn bool onStartMultiPlayer(const CEGUI::EventArgs& evt)
+	 * \brief Behandelt Start eines Einzelspielerspieles
+	 */
+	bool onStartMultiPlayer(const CEGUI::EventArgs& evt);
+
+	/**
+	 * \fn bool onStartMultiPlayerHost(const CEGUI::EventArgs& evt)
+	 * \brief Behandelt Start eines Einzelspielerspieles
+	 */
+	bool onStartMultiPlayerHost(const CEGUI::EventArgs& evt);
+
+	/**
+	 * \fn bool onButtonSaveExitClicked(const CEGUI::EventArgs& evt)
+	 * \brief Behandelt Klick auf Speichern/Beenden
+	 */
+	bool onButtonSaveExitClicked(const CEGUI::EventArgs& evt);
+
+	/**
+	 * \fn void onButtonInventoryClicked()
+	 * \brief Behandelt Klick auf Inventar Button
+	 */
+	bool onButtonInventoryClicked(const CEGUI::EventArgs& evt);
+
+	/**
+	 * \fn void onButtonCharInfoClicked()
+	 * \brief Behandelt Klick auf CharakterInfo Button
+	 */
+	bool onButtonCharInfoClicked(const CEGUI::EventArgs& evt);
+
+	/**
+	 *\fn bool onButtonPartyClicked(const CEGUI::EventArgs& evt)
+	 * \brief Behandelt Klick auf Party Button
+	 */
+	bool onButtonPartyClicked(const CEGUI::EventArgs& evt);
+
+	/**
+	 * \fn void onButtonSkilltreeClicked()
+	 * \brief Behandelt Klick auf Skilltree Button
+	 */
+	bool onButtonSkilltreeClicked(const CEGUI::EventArgs& evt);
+
+	/**
+	 * \fn void onButtonOpenChatClicked()
+	 * \brief Behandelt Klick auf Chat oeffnen Button
+	 */
+	bool onButtonOpenChatClicked(const CEGUI::EventArgs& evt);
+
+	/**
+	 * \fn bool onItemMouseButtonPressed(const CEGUI::EventArgs& evt)
+	 * \brief Behandelt Druecken der linken Maustaste ueber einen Item
+	 */
+	bool onItemMouseButtonPressed(const CEGUI::EventArgs& evt);
+
+	/**
+	 * \fn bool onItemMouseButtonReleased(const CEGUI::EventArgs& evt)
+	 * \brief Behandelt Loslassen der linken Maustaste ueber einen Item
+	 */
+	bool onItemMouseButtonReleased(const CEGUI::EventArgs& evt);
+
+	/**
+	 * \fn bool onSkillMouseClicked(const CEGUI::EventArgs& evt)
+	 * \brief Behandelt Mausklick auf eine Faehigkeit im Skilltree
+	 */
+	bool onSkillMouseClicked(const CEGUI::EventArgs& evt);
+
+	/**
+	 * \fn bool onSwapEquipClicked(const CEGUI::EventArgs& evt)
+	 * \brief Behandelt Mausklick auf Ausruestung wechseln
+	 */
+	bool onSwapEquipClicked(const CEGUI::EventArgs& evt);
+
+	/**
+	 * \fn bool onItemHover(const CEGUI::EventArgs& evt)
+	 * \brief Behandelt Eintritt der Maus in Bereich ueber einem Item
+	 */
+	bool onItemHover(const CEGUI::EventArgs& evt);
+
+
+	/**
+	 * \fn bool onAbilityHover(const CEGUI::EventArgs& evt)
+	 * \brief Behandelt Eintritt der Maus in Bereich ueber einer Faehigkeit
+	 */
+	bool onAbilityHover(const CEGUI::EventArgs& evt);
+
+	/**
+	 * \fn bool onIncreaseAttributeButtonClicked(const CEGUI::EventArgs& evt)
+	 * \brief Behandelt Klick auf Button Attribut erhoehen
+	 */
+	bool onIncreaseAttributeButtonClicked(const CEGUI::EventArgs& evt);
+
+	/**
+	 * \fn bool consumeEvent(const CEGUI::EventArgs& evt)
+	 * \brief Funktion die Events verbraucht
+	 * \fn gibt immer true zurueck
+	 */
+	bool consumeEvent(const CEGUI::EventArgs& evt)
+	{
+		DEBUG("consumed");
+		m_gui_hit = true;
+		return true;
+	}
+
+
+
+
+	private:
+
+	/**
+	 * \var Ogre::Root *m_ogre_root
+	 * \brief Basisobjekt der Ogre Engine
+	 */
+	Ogre::Root *m_ogre_root;
+
+	/**
+	 * \var CEGUI::System* m_cegui_system
+	 * \brief Basisobjekt von CEGUI
+	 */
+	CEGUI::System* m_cegui_system;
+
+	/**
+	 * \var Ogre::RenderWindow *window
+	 * \brief Fenster der Applikation
+	 */
+	Ogre::RenderWindow *m_window;
+
+	/**
+	 * \var Ogre::SceneManager* m_scene_manager
+	 * \brief aktueller Szenemanager
+	 */
+	Ogre::SceneManager* m_scene_manager;
+
+
+	/**
+	 * \var OIS::InputManager *m_ois
+	 * \brief Basisobjekt von OIS
+	 */
+	OIS::InputManager *m_ois;
+
+	/**
+	 * \var OIS::Mouse *m_mouse
+	 * \brief Repraesentation der Maus
+	 */
+	OIS::Mouse *m_mouse;
+
+	/**
+	 * \var OIS::Keyboard *m_keyboard
+	 * \brief Repraesentation der Tastatur
+	 */
+	OIS::Keyboard *m_keyboard;
+
+
+	/**
+	 * \var Document* m_document
+	 *  \brief Dokument
+	 */
+	Document* m_document;
+
+	/**
+	 * \fn CEGUI::Window* m_main_menu
+	 * \brief Hauptmenue
+	 */
+	CEGUI::Window* m_main_menu;
+
+	/**
+	 * \var CEGUI::Window* m_game_screen
+	 * \brief Fenster, in dem das eigentliche Spiel laeuft
+	 */
+	CEGUI::Window* m_game_screen;
+
+	/**
+	 * \var Scene* m_scene
+	 * \brief Szene die dargestellt wird
+	 */
+	Scene* m_scene;
+
+	/**
+	 * \var bool m_gui_hit
+	 * \brief wird auf true gesetzt, wenn bei einem Mausklick ein GUI Element getroffen wird
+	 */
+	bool m_gui_hit;
+
+};
+
+#endif
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gui/numberedwindow.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,20 @@
+
+#include "numberedwindow.h"
+
+NumberedWindow::NumberedWindow (const CEGUI::String &type, const CEGUI::String &name)
+	: CEGUI::Window(type,name)
+{
+	setNumber(0);
+}
+
+CEGUI::Window *  NumberedWindowFactory::createWindow (const CEGUI::String &name)
+{
+	return new NumberedWindow(getTypeName(),name);
+}
+
+void  NumberedWindowFactory::destroyWindow (CEGUI::Window *window)
+{
+	delete window;
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gui/numberedwindow.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,84 @@
+#ifndef NUMBERED_WINDOW_H
+#define NUMBERED_WINDOW_H
+
+// CEGUI includes
+#include "CEGUI.h"
+
+/**
+ * \class NumberedWindow
+ * \brief Fenster mit einer bestimmten Nummer, die bei einem Mausklick mit ausgegeben wird
+ */
+class NumberedWindow : public CEGUI::Window
+{
+	public:
+	
+	/**
+	 * \fn NumberedWindow (const CEGUI::String &type, const CEGUI::String &name)
+	 * \brief Konstruktor
+	 * \param type Typ des Fensters
+	 * \param Name des Fensters
+	 */
+	NumberedWindow (const CEGUI::String &type, const CEGUI::String &name);
+	
+	/**
+	 * \fn ~NumberedWindow()
+	 * \brief Destruktor
+	 */
+	~NumberedWindow() {}
+	
+	/**
+	 * \fn void setNumber(int i)
+	 * \brief setzt die Nummer des Fensters
+	 */
+	void setNumber(int i)
+	{
+		m_number =i;
+	}
+	
+	/**
+	 * \fn int getNumber()
+	 * \brief Gibt die Nummer des Fenster aus
+	 */
+	int getNumber()
+	{
+		return m_number;
+	}
+	
+
+	private:
+		int m_number;
+};
+
+/**
+ * \class NumberedWindowFactory
+ * \brief Factory, die Objekte von Typ NumberedWindow erzeugt
+ */
+class NumberedWindowFactory : public CEGUI::WindowFactory
+{
+	public:
+	/**
+	 * \fn NumberedWindowFactory()
+	 * \brief Konstruktor
+	 */
+	NumberedWindowFactory()
+	: CEGUI::WindowFactory("NumberedWindow")
+	{
+	}
+	
+	/**
+	 * \fn virtual CEGUI::Window *  createWindow (const CEGUI::String &name)
+	 * \brief erzeugt ein Fenster vom Typ NumberedWindow
+	 * \return Zeiger auf das erzeugte Fenster
+	 */
+	virtual CEGUI::Window *  createWindow (const CEGUI::String &name);
+	
+	/**
+	 * \fn virtual void  destroyWindow (CEGUI::Window *window)
+	 * \brief Zerstoert das uebergebene Objekt
+	 * \param window zu zerstoerendes Objekt
+	 */
+	virtual void  destroyWindow (CEGUI::Window *window);
+};	
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gui/scene.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,1064 @@
+#include "scene.h"
+
+Scene::Scene(Document* doc,Ogre::RenderWindow* window)
+{
+	m_document = doc;
+	m_window = window;
+	m_scene_manager = Ogre::Root::getSingleton().getSceneManager("DefaultSceneManager");
+
+
+	// Kamera anlegen
+	m_camera = m_scene_manager->createCamera("camera");
+	m_camera->setPosition(Ogre::Vector3(0, 1500, 1500));
+	m_camera->lookAt(Ogre::Vector3(0,0,0));
+	m_camera->setNearClipDistance(5);
+
+
+	// Viewport anlegen, Hintergrundfarbe schwarz
+	m_viewport = m_window->addViewport(m_camera);
+	m_viewport->setBackgroundColour(Ogre::ColourValue(0,0,0));
+	m_camera->setAspectRatio(Ogre::Real(m_viewport->getActualWidth()) / Ogre::Real(m_viewport->getActualHeight()));
+
+	m_objects = new map<int,std::string>;
+
+	m_drop_items = new map<int,std::string>;
+
+	m_projectiles = new map<int,std::string>;
+
+	registerMeshes();
+
+}
+
+Scene::~Scene()
+{
+	clearObjects();
+	delete m_objects;
+
+	delete m_drop_items;
+
+	delete m_projectiles;
+}
+
+void Scene::registerMeshes()
+{
+	// Meshes fuer Objekte registrieren
+
+	// Spieler
+	registerObject("warrior","warrior.mesh","");
+	registerAttachedMesh("warrior","itemRightHand","sword.mesh");
+	registerObject("mage","warrior.mesh","");
+	registerObject("priest","warrior.mesh",""); // TODO
+	registerObject("archer","warrior.mesh",""); // TODO
+
+	// Monster
+	registerObject("goblin","goblin.mesh","");
+	registerObject("gob_dog","gobDog.mesh","");
+	registerObject("lich","lich.mesh","");
+
+	// feste Objekte
+	registerObject("tree","tree.mesh","");
+	registerObject("fence","fence.mesh","");
+
+	// Geschosse
+	registerProjectile(Projectile::ARROW,"arrow.mesh","");
+	registerProjectile(Projectile::MAGIC_ARROW,"","Magic_Arrow");
+	registerProjectile(Projectile::FIRE_BOLT,"","Firebolt");
+	registerProjectile(Projectile::FIRE_BALL,"","Fireball");
+	registerProjectile(Projectile::FIRE_WALL,"","Firewall");
+	registerProjectile(Projectile::FIRE_WAVE,"","Firewave");
+	registerProjectile(Projectile::ICE_BOLT,"","Icebolt");
+	registerProjectile(Projectile::BLIZZARD,"","Blizzard");
+	registerProjectile(Projectile::ICE_RING,"","Icering");
+	registerProjectile(Projectile::FREEZE,"","Freeze");
+	registerProjectile(Projectile::LIGHTNING,"","Lightning");
+	registerProjectile(Projectile::THUNDERSTORM,"","Thunderstorm");
+	registerProjectile(Projectile::CHAIN_LIGHTNING,"","Chainlightning");
+	registerProjectile(Projectile::STATIC_SHIELD,"","Static_Shield");
+	registerProjectile(Projectile::FIRE_ARROW,"arrow.mesh","Fire_Arrow");
+	registerProjectile(Projectile::ICE_ARROW ,"arrow.mesh","Ice_Arrow");
+	registerProjectile(Projectile::WIND_ARROW,"arrow.mesh","Wind_Arrow");
+	registerProjectile(Projectile::GUIDED_ARROW,"arrow.mesh","Guided_Arrow");
+	registerProjectile(Projectile::EXPLOSION,"","Explosion");
+	registerProjectile(Projectile::FIRE_EXPLOSION,"","Fire_Explosion");
+	registerProjectile(Projectile::ICE_EXPLOSION,"","Ice_Explosion");
+	registerProjectile(Projectile::WIND_EXPLOSION,"","Wind_Explosion");
+	registerProjectile(Projectile::LIGHT_BEAM,"","Lightbeam");
+	registerProjectile(Projectile::ELEM_EXPLOSION,"","ElemExplosion");
+	registerProjectile(Projectile::ACID,"","Acid");
+	registerProjectile(Projectile::DIVINE_BEAM,"","Divine_Beam");
+	registerProjectile(Projectile::HYPNOSIS,"","Hypnosis");
+
+	// Items
+	registerItem("short_sw","sword.mesh");
+	registerItem("long_sw","sword.mesh");
+	registerItem("wood_bow","sword.mesh");
+	registerItem("long_bow","sword.mesh");
+	registerItem("fire_bow","sword.mesh");
+	registerItem("battle_axe","greatAxe.mesh");
+	registerItem("holy_flail","warhammer.mesh");
+	registerItem("ice_wand","sword.mesh");
+
+	registerItem("leath_arm","armor.mesh");
+	registerItem("tiled_arm","armor.mesh");
+	registerItem("heavy_arm","armor.mesh");
+
+	registerItem("wood_sh","shield.mesh");
+	registerItem("iron_sh","shield.mesh");
+
+	registerItem("steel_hlm","helmet.mesh");
+	registerItem("divine_hlm","helmet.mesh");
+
+	registerItem("heal_1","potion.mesh");
+	registerItem("heal_2","potion.mesh");
+	registerItem("heal_bl","potion.mesh");
+	registerItem("heal_fr","potion.mesh");
+
+
+}
+
+void Scene::registerObject(WorldObject::TypeInfo::ObjectSubtype subtype, std::string mesh, std::string particle_system, float scaling_factor)
+{
+	m_object_render_info.insert(make_pair(subtype,RenderInfo(mesh,particle_system,scaling_factor)));
+}
+
+void Scene::registerAttachedMesh(WorldObject::TypeInfo::ObjectSubtype subtype, std::string bone, std::string mesh)
+{
+    // Renderinformationen suchen
+    map<WorldObject::TypeInfo::ObjectSubtype, RenderInfo>::iterator it = m_object_render_info.find(subtype);
+    if (it != m_object_render_info.end())
+    {
+        // gefunden
+        it->second.m_extra_meshes.push_back(make_pair(bone,mesh));
+    }
+}
+void Scene::registerItem(Item::Subtype subtype, std::string mesh, std::string particle_system, float scaling_factor)
+{
+	m_item_render_info.insert(make_pair(subtype,RenderInfo(mesh,particle_system,scaling_factor)));
+}
+
+void Scene::registerTile(Tile tile, std::string mesh, std::string particle_system, float scaling_factor)
+{
+	m_tile_render_info.insert(make_pair(tile,RenderInfo(mesh,particle_system,scaling_factor)));
+}
+
+
+void Scene::registerProjectile(Projectile::ProjectileType type, std::string mesh, std::string particle_system, float scaling_factor)
+{
+	m_projectile_render_info.insert(make_pair(type,RenderInfo(mesh,particle_system,scaling_factor)));
+}
+
+RenderInfo  Scene::getObjectRenderInfo(WorldObject::TypeInfo::ObjectSubtype subtype)
+{
+	map<WorldObject::TypeInfo::ObjectSubtype, RenderInfo>::iterator i= m_object_render_info.find(subtype);
+	if (i != m_object_render_info.end())
+	{
+		return i->second;
+	}
+	else
+	{
+		// Standardmesh
+		return RenderInfo("goblin.mesh","");
+	}
+}
+
+RenderInfo  Scene::getItemRenderInfo(Item::Subtype subtype)
+{
+	map<Item::Subtype, RenderInfo>::iterator i= m_item_render_info.find(subtype);
+	if (i != m_item_render_info.end())
+	{
+		return i->second;
+	}
+	else
+	{
+		// Standardmesh
+		return RenderInfo("potion.mesh","");
+	}
+}
+
+RenderInfo  Scene::getProjectileRenderInfo(Projectile::ProjectileType type)
+{
+	map<Projectile::ProjectileType, RenderInfo>::iterator i= m_projectile_render_info.find(type);
+	if (i != m_projectile_render_info.end())
+	{
+		return i->second;
+	}
+	else
+	{
+		// Standardmesh
+		return RenderInfo("arrow.mesh","");
+	}
+}
+
+
+void Scene::update(float ms)
+{
+	// Spielerobjekt
+	ClientMPlayer* player = m_document->getMainPlayer();
+	// Koordinaten des Spielers
+	float x=player->getGeometry()->m_shape.m_coordinate_x;
+	float y=player->getGeometry()->m_shape.m_coordinate_y;
+
+	// Kamera auf Spieler ausrichten
+	m_camera->setPosition(Ogre::Vector3(x*50, 1000, y*50+300));
+	m_camera->lookAt(Ogre::Vector3(x*50,0,y*50));
+
+	if (m_document->getModified() & Document::REGION_MODIFIED)
+	{
+		// Spieler hat eine neue Region betreten
+
+		// Szene komplett neu aufbauen
+		createScene();
+
+		m_document->setModified(m_document->getModified() & ~Document::REGION_MODIFIED);
+	}
+
+	// alle Objekte aktualisieren
+	updateObjects();
+
+	// alle Items aktualisieren
+	updateItems();
+
+	updateProjectiles();
+}
+
+void  Scene::updateObjects()
+{
+	// aktuelle Liste der Objekte holen
+	map<int, ClientWObject*>* objs;
+	map<int, ClientWObject*>::iterator it;
+	objs = m_document->getObjects();
+	ClientWObject* obj;
+
+	// Liste der aktuell in der Szene vorhanden Objekte durchmustern
+	map<int, string>::iterator it2;
+	int id;
+	for (it2 = m_objects->begin();it2 != m_objects->end();)
+	{
+		id = it2->first;
+		if (objs->find(id) == objs->end())
+		{
+			// Objekt existiert nicht in der Liste im Dokument
+
+			// Objekt loeschen
+			deleteObject(it2->second);
+
+			// aus der Liste der Objekte entfernen
+			m_objects->erase(it2++);
+		}
+		else
+		{
+			++it2;
+		}
+	}
+
+	// aller Objekte im Dokument durchmustern
+	for (it = objs->begin();it != objs->end(); ++it)
+	{
+		obj = it->second;
+		// Darstellung fuer das Objekt aktualisieren
+		updateObject(obj);
+	}
+}
+
+void Scene::updateItems()
+{
+	// Liste der aktuell in der Szene vorhandenen Items durchmustern
+	map<int,DropItem>* itms;
+	map<int,DropItem>::iterator it;
+	itms = m_document->getDropItems();
+	DropItem* di;
+
+	map<int, string>::iterator it2;
+	int id;
+
+	for (it2= m_drop_items->begin(); it2 != m_drop_items->end(); )
+	{
+
+		id= it2->first;
+		if (itms->find(id) == itms->end())
+		{
+			// Item existiert nicht in der Liste im Dokument
+
+			// Item loeschen
+			deleteItem(it2->second);
+
+			// aus der Liste der Items entfernen
+			m_drop_items->erase(it2++);
+		}
+		else
+		{
+			++it2;
+		}
+
+	}
+
+	// Liste der Objekte im Dokument durchmustern
+	for (it = itms->begin();it != itms->end(); ++it)
+	{
+		di = &(it->second);
+
+		// Name des Items
+		std::string name = di->getNameId();
+		std::string node_name = name + "Node";
+		if (!m_scene_manager->hasSceneNode(node_name))
+		{
+			// Item existiert noch nicht in der Szene
+
+			createItem(di,name);
+
+		}
+	}
+}
+
+void Scene::updateObject(ClientWObject* obj)
+{
+	std::string name = obj->getNameId();
+	DEBUG5("handle obj %s",name.c_str());
+	std::string node_name = name + "Node";
+
+	// Ogre::Entity des Objektes
+	Ogre::Entity* obj_ent;
+
+	// Node des Objektes
+	Ogre::SceneNode* obj_node;
+
+
+	if (!m_scene_manager->hasSceneNode(node_name))
+	{
+		// Objekt existiert noch nicht in der Szene
+
+		// in die Liste der Objekte einfuegen
+		m_objects->insert(make_pair(obj->getId(),name));
+
+		//Objekt anlegen
+		createObject(obj,name);
+	}
+
+
+	// Koordinaten des Objektes
+	float x=obj->getGeometry()->m_shape.m_coordinate_x;
+	float y=obj->getGeometry()->m_shape.m_coordinate_y;
+
+	// Ortsvektor des Objektes
+	Ogre::Vector3 vec(x*50,0,y*50);
+
+
+	// an die richtige Stelle verschieben
+	m_scene_manager->getSceneNode(node_name)->setPosition(vec);
+
+	float angle = obj->getGeometry()->m_angle;
+	// Objekt drehen
+	m_scene_manager->getSceneNode(node_name)->setDirection(cos(angle),0,sin(angle),Ogre::Node::TS_WORLD);
+
+	// Statusmods anpassen
+	std::ostringstream num("");
+	std::string mod_name;
+	int i;
+	Ogre::ParticleSystem *mod_part;
+	// Bitmaske welche Mods gesetzt sind
+	char mask = obj->m_status_mods;
+
+	// Animation anpassen
+	// Status der Animation
+	Ogre::AnimationState* anim;
+    Ogre::AnimationStateSet* anim_set;
+
+	// Aktion des Objeks
+	Action::ActionType act = obj->getAction()->m_type;
+	Action::ActionInfo* aci = Action::getActionInfo(act);
+
+    // Name der Animation
+	std::vector<std::string>& animations = aci->m_animation[obj->getAction()->m_action_equip];
+	std::string anim_name = "";
+	if (!animations.empty())
+	{
+		anim_name = animations[obj->getAction()->m_animation_number % animations.size()];
+	}
+
+	obj_ent = m_scene_manager->getEntity(name);
+	if (obj_ent == 0)
+	{
+            ERRORMSG("object %s not found",name.c_str());
+	}
+	if (anim_name != "")
+	{
+        // status der Animation setzen
+        //Iterator ueber alle aktiven Animationen
+        anim_set = obj_ent->getAllAnimationStates();
+
+        // Testen ob das Objekt animiert ist
+        if (anim_set != 0)
+        {
+
+            Ogre::ConstEnabledAnimationStateIterator anim_it = anim_set->getEnabledAnimationStateIterator();
+
+            //deaktiviert alle animationen, die gerade nicht verwendet werden
+            while(anim_it.hasMoreElements())
+            {
+                anim = anim_it.getNext();
+                //TODO
+                //if(anim->getAnimationName!=anim_name)
+                    anim->setEnabled(false);
+            }
+
+            try
+            {
+                if (anim_set->hasAnimationState(anim_name))
+                {
+                    anim = obj_ent->getAnimationState(anim_name);
+                    anim->setEnabled(true);
+
+                    // prozentsatz zu dem die Animation fortgeschritten ist
+                    float perc = obj->getAction()->m_elapsed_time / obj->getAction()->m_time  ;
+                    DEBUG5("setting animation %s to %f",anim_name.c_str(),perc);
+                    anim->setTimePosition(perc);
+                }
+            }
+            catch (Ogre::Exception e)
+            {
+                ERRORMSG(e.what());
+            }
+        }
+	}
+	else
+	{
+        //keine Animation
+	}
+
+    // angehaengte Meshes an die verwendeten Items anpassen
+    if (obj->getTypeInfo()->m_type == WorldObject::TypeInfo::TYPE_PLAYER)
+    {
+        // Objekt ist ein Spieler
+        ClientMPlayer* cmp = static_cast<ClientMPlayer*>(obj);
+        Equipement* equ =  cmp->m_equipement;
+
+        // Schleife ueber alle angehaengten Entities
+        Ogre::Entity* attch_ent;
+
+        // Knochen an den ein Mesh angehaengt ist
+        std::string bone;
+
+        // Name des neuen Meshes an einem Knochen
+        std::string old_ent_name;
+        std::string new_ent_name;
+
+        Item* itm;
+        Item::Subtype itmsubtype;
+
+        Ogre::Node* node;
+
+        // Schleife ueber die angehaengten Meshes
+        Ogre::Entity::ChildObjectListIterator it = obj_ent->getAttachedObjectIterator();
+        // mappt Namen von Knochen auf die daran anzuhaengenen Meshes
+        map<std::string, std::string> goal_atch;
+        map<std::string, std::string>::iterator jt;
+
+        itm = equ->getItem(Equipement::WEAPON);
+        if (itm !=0)
+        {
+            itmsubtype = itm->m_subtype;
+            new_ent_name = getItemRenderInfo(itmsubtype).m_mesh;
+            goal_atch.insert(make_pair("itemRightHand",new_ent_name));
+        }
+
+        // Schleife ueber die aktuell angehaengten Meshes
+        while (it.hasMoreElements())
+        {
+            bone = it.peekNextKey();
+            bone = bone.substr(name.size());
+            attch_ent = static_cast<Ogre::Entity*>(it.getNext());
+            old_ent_name = attch_ent->getMesh()->getName();
+            DEBUG5("bone name %s",bone.c_str());
+            jt = goal_atch.find(bone);
+
+            if (jt != goal_atch.end())
+            {
+                // es ist bereits ein Objekt an den Knochen gehaengt
+
+                if (old_ent_name != jt->second)
+                {
+                    // Es soll ein anderes Mesh angehaengt werden als aktuell angehaengt ist
+                    DEBUG("replaced mesh %s by %s at bone %s",old_ent_name.c_str(),jt->second.c_str(),bone.c_str());
+
+
+                    // altes Mesh entfernen, neues anhaengen
+                    obj_ent->detachObjectFromBone(attch_ent);
+                    m_scene_manager->destroyEntity(attch_ent);
+
+                    attch_ent = m_scene_manager->createEntity(name+bone,jt->second);
+                    obj_ent->attachObjectToBone(bone,attch_ent);
+
+                    node = attch_ent->getParentNode();
+                    node->setInheritScale(false);
+
+
+                }
+
+                // Zielzustand erreicht
+                goal_atch.erase(jt);
+
+            }
+            else
+            {
+                // Objekt befindet sich im Zielzustand nicht am Knochen
+
+                DEBUG("removed mesh %s from bone %s",old_ent_name.c_str(),bone.c_str());
+                // Mesh entfernen
+                obj_ent->detachObjectFromBone(attch_ent);
+                m_scene_manager->destroyEntity(attch_ent);
+            }
+        }
+
+        // Behandeln der Meshes die an keinem Knochen gefunden wurden
+        for (jt = goal_atch.begin(); jt != goal_atch.end();++jt)
+        {
+            bone = jt->first;
+            DEBUG("attached mesh %s at bone %s",jt->second.c_str(),bone.c_str());
+            attch_ent = m_scene_manager->createEntity(name+bone,jt->second);
+
+            obj_ent->attachObjectToBone(bone,attch_ent);
+            node = attch_ent->getParentNode();
+            node->setInheritScale(false);
+
+
+        }
+    }
+
+	//zeigt an ob ein Partikelsystem sichtbar is
+	bool vis;
+
+	for (i=0;i<NR_STATUS_MODS;i++)
+	{
+		num.str("");
+		num <<"mod"<< i;
+
+		mod_name = name + num.str();
+
+		mod_part = m_scene_manager->getParticleSystem(mod_name);
+		vis = mod_part->isVisible();
+
+		if ( ((mask & (1 << i)) !=0) ^ vis)
+		{
+			mod_part->setVisible(!vis);
+		}
+	}
+
+	// weitere Effekte anpassen
+	mask =  obj->m_effects;
+
+	for (i=0;i<NR_EFFECTS;i++)
+	{
+		num.str("");
+		num <<"effect"<< i;
+
+		mod_name = name + num.str();
+
+		mod_part = m_scene_manager->getParticleSystem(mod_name);
+		vis = mod_part->isVisible();
+
+		if ( ((mask & (1 << i)) !=0) ^ vis)
+		{
+			mod_part->setVisible(!vis);
+		}
+	}
+}
+
+void Scene::deleteObject(std::string name)
+{
+	std::string node_name = name + "Node";
+
+	DEBUG("deleting object %s",name.c_str());
+
+	destroySceneNode(node_name);
+
+}
+
+void Scene::createObject(WorldObject* obj,std::string& name, bool is_static)
+{
+	std::string node_name = name + "Node";
+
+	// Koordinaten des Objektes
+	float x=obj->getGeometry()->m_shape.m_coordinate_x;
+	float y=obj->getGeometry()->m_shape.m_coordinate_y;
+
+	// Ortsvektor des Objektes
+	Ogre::Vector3 vec(x*50,0,y*50);
+
+	// Node anlegen
+	Ogre::SceneNode* obj_node;
+	obj_node =m_scene_manager->getRootSceneNode()->createChildSceneNode(node_name,vec);
+
+	float angle = obj->getGeometry()->m_angle;
+	// Objekt drehen
+	obj_node->setDirection(cos(angle),0,sin(angle),Ogre::Node::TS_WORLD);
+
+	// Informationen zum Rendern anfordern
+	RenderInfo ri = getObjectRenderInfo(obj->getTypeInfo()->m_subtype);
+
+	// Je nach Typ das richtige Mesh benutzen
+	Ogre::Entity* obj_ent;
+	obj_ent = m_scene_manager->createEntity(name, ri.m_mesh);
+
+    obj_node->attachObject(obj_ent);
+
+    // weitere Meshes anfuegen
+    std::list<pair<std::string,std::string> >::iterator it;
+    // Entity fuer ein angefuegtes Mesh
+    Ogre::Entity* extr_m_ent;
+
+    Ogre::Node* node;
+    for (it = ri.m_extra_meshes.begin(); it !=ri.m_extra_meshes.end();++it)
+    {
+            extr_m_ent = m_scene_manager->createEntity(name + it->first,it->second);
+            obj_ent->attachObjectToBone(it->first,extr_m_ent);
+
+            node = extr_m_ent->getParentNode();
+            node->setInheritScale(false);
+
+    }
+
+
+	// eventuelle Partikeleffekte einfuegen
+
+
+
+	if (!is_static)
+	{
+		// Partikelsysteme anhaengen
+		Ogre::ParticleSystem* part=0;
+
+		// TODO: richtige Partikelsystem benutzen
+		// blind
+		part = m_scene_manager->createParticleSystem(name+"mod0", "Blind");
+		obj_node->attachObject(part);
+
+		// vergiftet
+		part = m_scene_manager->createParticleSystem(name+"mod1", "Poison");
+		obj_node->attachObject(part);
+
+		//  Berserker
+		part = m_scene_manager->createParticleSystem(name+"mod2", "Berserk");
+		obj_node->attachObject(part);
+
+		// verwirrt
+		part = m_scene_manager->createParticleSystem(name+"mod3", "Confuse");
+		obj_node->attachObject(part);
+
+		// stumm
+		part = m_scene_manager->createParticleSystem(name+"mod4", "Mute");
+		obj_node->attachObject(part);
+
+		// gelaehmt
+		part = m_scene_manager->createParticleSystem(name+"mod5", "Paralyze");
+		obj_node->attachObject(part);
+
+		// eingefroren
+		part = m_scene_manager->createParticleSystem(name+"mod6", "Frozen");
+		obj_node->attachObject(part);
+
+		// brennend
+		part = m_scene_manager->createParticleSystem(name+"mod7", "Burning");
+		obj_node->attachObject(part);
+
+		// Partikelsysteme fuer weitere Effekte
+		// Bluteffekt
+		part = m_scene_manager->createParticleSystem(name+"effect0", "Hit");
+		obj_node->attachObject(part);
+	}
+
+}
+
+void Scene::createItem(DropItem* di, std::string& name)
+{
+	std::string node_name = name + "Node";
+
+	DEBUG5("created item %s",name.c_str());
+	// Ortsvektor des Items
+	Ogre::Vector3 vec(di->m_x*25,0,di->m_y*25);
+
+	// in die Liste einfuegen
+	m_drop_items->insert(make_pair(di->getId(),name));
+
+	// Node anlegen
+	Ogre::SceneNode* obj_node;
+	obj_node =m_scene_manager->getRootSceneNode()->createChildSceneNode(node_name,vec);
+
+
+	// Informationen zum Rendern anfordern
+	RenderInfo ri = getItemRenderInfo(di->m_item->m_subtype);
+
+	// Je nach Typ das richtige Mesh benutzen
+	Ogre::Entity* ent;
+	ent = m_scene_manager->createEntity(name, ri.m_mesh);
+
+	obj_node->attachObject(ent);
+
+}
+
+void Scene::deleteItem(std::string name)
+{
+	std::string node_name = name + "Node";
+
+	DEBUG("deleting item %s",name.c_str());
+
+	destroySceneNode(node_name);
+
+}
+
+void Scene::updateProjectiles()
+{
+	map<int,Projectile*>* projectiles;
+	map<int,Projectile*>::iterator it;
+	projectiles = m_document->getProjectiles();
+	Projectile* pr;
+
+	map<int, string>::iterator it2;
+	int id;
+
+	// Liste der aktuell in der Szene vorhandenen Projektile durchmustern
+	for (it2= m_projectiles->begin(); it2 != m_projectiles->end(); )
+	{
+
+		id= it2->first;
+		if (projectiles->find(id) == projectiles->end())
+		{
+			// Projektil existiert nicht in der Liste im Dokument
+
+			// loeschen
+			deleteProjectile(it2->second);
+
+			// aus der Liste der Projektile entfernen
+			m_projectiles->erase(it2++);
+		}
+		else
+		{
+			++it2;
+		}
+
+	}
+
+	// Liste der Projektile im Dokument durchmustern
+	for (it = projectiles->begin();it != projectiles->end(); ++it)
+	{
+		pr = (it->second);
+
+		std::ostringstream out_stream("");
+		out_stream << "projectile:"<<pr->getId();
+		std::string name = out_stream.str();
+		std::string node_name = name + "Node";
+		if (!m_scene_manager->hasSceneNode(node_name))
+		{
+			// Projektil existiert noch nicht in der Szene
+			// erzeugen
+			createProjectile(pr,name);
+
+		}
+
+		// Ortsvektor des Projektils
+		Ogre::Vector3 vec(pr->getGeometry()->m_coordinate_x*50,50,pr->getGeometry()->m_coordinate_y*50);
+
+		// an die richtige Stelle verschieben
+		m_scene_manager->getSceneNode(node_name)->setPosition(vec);
+
+		// Objekt drehen
+		float angle = pr->getGeometry()->m_angle;
+		m_scene_manager->getSceneNode(node_name)->setDirection(cos(angle),0,sin(angle),Ogre::Node::TS_WORLD);
+
+
+	}
+}
+
+void Scene::createProjectile(Projectile* pr, std::string& name)
+{
+	DEBUG5("creating projectile %s",name.c_str());
+
+	std::string node_name = name + "Node";
+
+	// Ortsvektor des Projektils
+	Ogre::Vector3 vec(pr->getGeometry()->m_coordinate_x*50,50,pr->getGeometry()->m_coordinate_y*50);
+
+	// in die Liste einfuegen
+	m_projectiles->insert(make_pair(pr->getId(),name));
+
+	// Node anlegen
+	Ogre::SceneNode* obj_node;
+	obj_node =m_scene_manager->getRootSceneNode()->createChildSceneNode(node_name,vec);
+
+	Projectile::ProjectileType type = pr->getType();
+	Ogre::Entity *ent =0;
+	//Partikelsystem Feuer anlegen
+	std::string particle_name = name + "Particle";
+	Ogre::ParticleSystem *part = 0;
+
+	RenderInfo ri = getProjectileRenderInfo(type);
+
+	if (ri.m_mesh != "")
+	{
+		ent = m_scene_manager->createEntity(name,ri.m_mesh);
+		obj_node->attachObject(ent);
+	}
+
+	if (ri.m_particle_system != "")
+	{
+		part = m_scene_manager->createParticleSystem(particle_name, ri.m_particle_system);
+		obj_node->attachObject(part);
+	}
+
+
+	/*
+	switch (type)
+	{
+		case Projectile::ARROW:
+			// Entity erzeugen
+			ent = m_scene_manager->createEntity(name,"arrow.mesh");
+			obj_node->attachObject(ent);
+		break;
+		case Projectile::MAGIC_ARROW:
+			part = m_scene_manager->createParticleSystem(particle_name, "Magic_Arrow");
+			obj_node->attachObject(part);
+		break;
+		case Projectile::FIRE_BOLT:
+			part = m_scene_manager->createParticleSystem(particle_name, "Firebolt");
+			obj_node->attachObject(part);
+			break;
+		case Projectile:: FIRE_BALL:
+			part = m_scene_manager->createParticleSystem(particle_name, "Fireball");
+			obj_node->attachObject(part);
+		break;
+		case Projectile:: FIRE_WALL:
+			part = m_scene_manager->createParticleSystem(particle_name, "Firewall");
+			obj_node->attachObject(part);
+			break;
+		case Projectile::FIRE_WAVE:
+			part = m_scene_manager->createParticleSystem(particle_name, "Firewave");
+			obj_node->attachObject(part);
+			break;
+		case Projectile::ICE_BOLT:
+			part = m_scene_manager->createParticleSystem(particle_name, "Icebolt");
+			obj_node->attachObject(part);
+			break;
+		case Projectile:: BLIZZARD:
+			part = m_scene_manager->createParticleSystem(particle_name, "Blizzard");
+			obj_node->attachObject(part);
+			break;
+		case Projectile::ICE_RING:
+			part = m_scene_manager->createParticleSystem(particle_name, "Icering");
+			obj_node->attachObject(part);
+			break;
+		case Projectile::FREEZE:
+			part = m_scene_manager->createParticleSystem(particle_name, "Freeze");
+			obj_node->attachObject(part);
+			break;
+		case Projectile::LIGHTNING:
+			part = m_scene_manager->createParticleSystem(particle_name, "Lightning");
+			obj_node->attachObject(part);
+			break;
+		case Projectile::THUNDERSTORM:
+			part = m_scene_manager->createParticleSystem(particle_name, "Thunderstorm");
+			obj_node->attachObject(part);
+			break;
+		case Projectile::CHAIN_LIGHTNING:
+			part = m_scene_manager->createParticleSystem(particle_name, "Chainlightning");
+			obj_node->attachObject(part);
+			break;
+		case Projectile::STATIC_SHIELD:
+			part = m_scene_manager->createParticleSystem(particle_name, "Static_Shield");
+			obj_node->attachObject(part);
+			break;
+		case Projectile::FIRE_ARROW:
+			ent = m_scene_manager->createEntity(name,"arrow.mesh");
+			obj_node->attachObject(ent);
+			part = m_scene_manager->createParticleSystem(particle_name, "Fire_Arrow");
+			obj_node->attachObject(part);
+			break;
+		case Projectile::ICE_ARROW:
+			ent = m_scene_manager->createEntity(name,"arrow.mesh");
+			obj_node->attachObject(ent);
+			part = m_scene_manager->createParticleSystem(particle_name, "Ice_Arrow");
+			obj_node->attachObject(part);
+			break;
+		case Projectile::WIND_ARROW:
+			ent = m_scene_manager->createEntity(name,"arrow.mesh");
+			obj_node->attachObject(ent);
+			part = m_scene_manager->createParticleSystem(particle_name, "Wind_Arrow");
+			obj_node->attachObject(part);
+			break;
+		case Projectile::GUIDED_ARROW:
+			ent = m_scene_manager->createEntity(name,"arrow.mesh");
+			obj_node->attachObject(ent);
+			part = m_scene_manager->createParticleSystem(particle_name, "Guided_Arrow");
+			obj_node->attachObject(part);
+			break;
+		case Projectile::EXPLOSION:
+			part = m_scene_manager->createParticleSystem(particle_name, "Explosion");
+			obj_node->attachObject(part);
+			break;
+		case Projectile::FIRE_EXPLOSION:
+			part = m_scene_manager->createParticleSystem(particle_name, "Fire_Explosion");
+			obj_node->attachObject(part);
+			break;
+		case Projectile::ICE_EXPLOSION:
+			part = m_scene_manager->createParticleSystem(particle_name, "Ice_Explosion");
+			obj_node->attachObject(part);
+			break;
+		case Projectile::WIND_EXPLOSION:
+			part = m_scene_manager->createParticleSystem(particle_name, "Wind_Explosion");
+			obj_node->attachObject(part);
+			break;
+		case Projectile::LIGHT_BEAM:
+			part = m_scene_manager->createParticleSystem(particle_name, "Lightbeam");
+			obj_node->attachObject(part);
+			break;
+		case Projectile::ELEM_EXPLOSION:
+			part = m_scene_manager->createParticleSystem(particle_name, "ElemExplosion");
+			obj_node->attachObject(part);
+			break;
+		case Projectile::ACID:
+			part = m_scene_manager->createParticleSystem(particle_name, "Acid");
+			obj_node->attachObject(part);
+			break;
+		case Projectile::DIVINE_BEAM:
+			part = m_scene_manager->createParticleSystem(particle_name, "Divine_Beam");
+			obj_node->attachObject(part);
+			break;
+		case Projectile:: HYPNOSIS:
+			part = m_scene_manager->createParticleSystem(particle_name, "Hypnosis");
+			obj_node->attachObject(part);
+			break;
+		default:
+				// Entity erzeugen
+				ent = m_scene_manager->createEntity(name,"sphere.mesh");
+				obj_node->attachObject(ent);
+	}
+
+*/
+
+
+
+
+}
+
+void Scene::deleteProjectile(std::string name)
+{
+	std::string node_name = name + "Node";
+
+	DEBUG5("deleting projectile %s",name.c_str());
+
+	destroySceneNode(node_name);
+}
+
+void Scene::destroySceneNode(std::string& node_name)
+{
+
+	Ogre::SceneNode* node = m_scene_manager->getSceneNode(node_name);
+
+	if (node==0)
+		return;
+
+
+	// Iterator ueber die angehaengten Objekte
+	Ogre::SceneNode::ObjectIterator it = node->getAttachedObjectIterator();
+
+	std::string name;
+	Ogre::MovableObject* obj;
+	list<Ogre::MovableObject*> objects;
+	list<Ogre::MovableObject*>::iterator i;
+
+	while (it.hasMoreElements())
+	{
+		// Name des aktuellen Objektes
+		name = it.peekNextKey();
+		// Zeiger auf aktuelles Objekt
+		obj = it.peekNextValue();
+
+		DEBUG5("deleting object %s",name.c_str());
+
+		objects.push_back(obj);
+
+		it.moveNext();
+	}
+
+	for (i=objects.begin(); i!=objects.end();i++)
+	{
+		node->detachObject(*i);
+		m_scene_manager->destroyMovableObject((*i));
+	}
+	// Knoten entfernen
+	m_scene_manager->destroySceneNode(node_name);
+}
+
+
+void Scene::clearObjects()
+{
+	m_objects->clear();
+	m_drop_items->clear();
+	m_projectiles->clear();
+}
+
+void Scene::createScene()
+{
+	// alle bisherigen Objekte aus der Szene loeschen
+	m_scene_manager->clearScene();
+	clearObjects();
+
+	// Liste der statischen Objekte
+	map<int,WorldObject*>* stat_objs = (m_document->getRegionData()->m_static_objects);
+	map<int,WorldObject*>::iterator it;
+	std::string name;
+	for (it = stat_objs->begin(); it !=stat_objs->end();++it)
+	{
+		name = it->second->getNameId();
+
+		// Objekt in der Szene erzeugen
+		createObject(it->second,name,true);
+
+	}
+
+	// Tiles einfuegen
+	insertTiles();
+
+}
+
+void  Scene::insertTiles()
+{
+	// Matrix der Tiles
+	Matrix2d<char>* mat = m_document->getRegionData()->m_tiles;
+
+
+	// Matrix durchgehen
+	Tile tile;
+	ostringstream out_stream;
+	for (int i =0;i<m_document->getRegionData()->m_dimx*2-1;i++)
+	{
+
+		for (int j =0;j<m_document->getRegionData()->m_dimy*2-1;j++)
+		{
+			tile = (Tile) *(mat->ind(i,j));
+			if (tile ==TILE_NOTHING)
+			{
+				continue;
+			}
+			// Name des Tiles
+			out_stream.str("");
+			out_stream << "Tile:"<<i<<":"<<j;
+			string tname = out_stream.str();
+
+
+			// Entity des Tiles
+			Ogre::Entity *ent = m_scene_manager->createEntity(tname, "Tile");
+
+			// TODO: richtiges Material auswaehlen
+			ent->setMaterialName("grass1");
+
+			// Node des Tiles
+			Ogre::SceneNode* obj_node;
+			obj_node = m_scene_manager->getRootSceneNode()->createChildSceneNode(tname+"Node",Ogre::Vector3(i*100,0,j*100));
+
+			// Objekt an den Knoten haengen
+			obj_node->attachObject(ent);
+
+		}
+	}
+}
+
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/gui/scene.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,382 @@
+#ifndef SCENE_H
+#define SCENE_H
+
+#include <map>
+#include "Ogre.h"
+#include <string>
+
+#include "document.h"
+// TODO : include anpassen (es wird nur ein Spieler allgemein benoetigt)
+#include "clientmplayer.h"
+
+
+using namespace std;
+
+/**
+ * \struct RenderInfo
+ * \brief Enthaelt die Informationen die zum Rendern eines Objektes notwendig sind
+ */
+struct RenderInfo
+{
+	/**
+	 * \var std::string m_mesh
+	 * \brief Name des Meshes des Objektes. Leerer String, wenn das Objekt kein Mesh hat
+	 */
+	std::string m_mesh;
+
+	/**
+	* \var std::list<pair<std::string,std::string> > m_extra_meshes
+	* \brief Liste der weiteren Meshes die an das Hauptmesh angefuegt werden
+	* erster Teil des Wertepaares: Name des Knochens
+	* zweiter Teil des Wertepaares: Name des Meshes
+	*/
+	std::list<pair<std::string,std::string> > m_extra_meshes;
+
+	/**
+	 * \var std::string m_particle_system
+	 * \brief Partikelsystem des Objektes. Leerer String, wenn das Objekt kein Partikelsystem hat
+	 */
+	std::string m_particle_system;
+
+	/**
+	 * \var float m_scaling_factor
+	 * \brief Faktor um den das Mesh und das Partikelsystem skaliert werden
+	 */
+	float m_scaling_factor;
+
+
+	/**
+	 * \fn RenderInfo(std::string mesh, std::string particle_system, float scaling_factor =1.0)
+	 * \brief Konstruktor
+	 */
+	RenderInfo(std::string mesh, std::string particle_system, float scaling_factor =1.0)
+	{
+		m_mesh = mesh;
+		m_particle_system = particle_system;
+		m_scaling_factor = scaling_factor;
+	}
+
+};
+
+/**
+ * \class Scene
+ * \brief Beschreibt die darzustellende Szene
+ */
+class Scene
+{
+	public:
+
+	/**
+	 * \fn Scene(Document* doc)
+	 * \brief Konstruktor
+	 * \param doc Dokument dessen Daten dargestellt werden sollen
+	 * \param window Fenster in das gerendert wird
+	 */
+	Scene(Document* doc,Ogre::RenderWindow* window);
+
+	/**
+	 * \fn ~Scene()
+	 * \brief Destruktor
+	 */
+	~Scene();
+
+	/**
+	 * \fn void update(float ms)
+	 * \brief aktualisiert die Szene
+	 * \param ms Vergangene Zeit in ms seit dem letzten update
+	 */
+	void update(float ms=0);
+
+	/**
+	 * \fn Ogre::Camera* getCamera()
+	 * \brief Gibt die Kamera aus, mit der die Szene aufgenommen wird
+	 */
+	Ogre::Camera* getCamera()
+	{
+		return m_camera;
+	}
+
+	/**
+	 * \fn Ogre::Viewport* getViewport()
+	 * \brief Gibt Viewport aus
+	 */
+	Ogre::Viewport* getViewport()
+	{
+		return m_viewport;
+	}
+
+
+	/**
+	 * \fn map<int,string>* getObjects()
+	 * \brief Gibt die Liste der in der Szene dargestellten nicht statischen Objekte aus
+	 */
+	map<int,string>* getObjects()
+	{
+		return m_objects;
+	}
+
+	/**
+	 * \fn map<int,string>* getDropItems()
+	 * \brief Gibt die Liste der in der Szene dargestellen Gegenstaende aus
+	 */
+	map<int,string>* getDropItems()
+	{
+		return m_drop_items;
+	}
+
+	private:
+
+	/**
+	 * \fn void updateObjects()
+	 * \brief Aktualisiert die Darstellung aller Objekte
+	 */
+	void updateObjects();
+
+	/**
+	 * \fn void updateObject(ClientWObject* obj);
+	 * \brief Fuegt das Objekt in die Szene ein
+	 */
+	void updateObject(ClientWObject* obj);
+
+
+	/**
+	 * \fn void  createObject(WorldObject* obj,std::string& name, bool is_static)
+	 * \brief Erzeugt auf Basis eines Objektes eine Ogre Objekt
+	 * \param obj Objekt fuer das eine Ogre Entity erzeugt werden soll
+	 */
+	void  createObject(WorldObject* obj,std::string& name, bool is_static = false);
+
+	/**
+	 * \fn void deleteObject(std::string name)
+	 * \brief Entfernt ein Objekt aus der Szene
+	 * \param name Name des Objektes in Ogre
+	 */
+	void deleteObject(std::string name);
+
+	/**
+	 * \fn void updateItems()
+	 * \brief Aktualisiert die Darstellung aller Items
+	 */
+	void updateItems();
+
+	/**
+	 * \fn void createItem(DropItem* di, std::string& name)
+	 * \brief Erzeugt auf Basis eines Items eine Ogre Entity mit dem angegebenen Name
+	 * \param itm Gegenstand fuer den die Entity erzeugt werden soll
+	 * \param name der Entitiy
+	 */
+	 void createItem(DropItem* di, std::string& name);
+
+	/**
+	 * \fn void deleteItem(std::string name)
+	 * \brief Entfernt ein Item aus der Szene
+	 * \param name Name des Objektes in Ogre
+	 */
+	void deleteItem(std::string name);
+
+	/**
+	 * \fn void update Projectiles()
+	 * \brief Aktualisiert die Darstellung Projektile
+	 */
+	void updateProjectiles();
+
+	/**
+	 * \fn void createProjectile(Projectile* pr, std::string& name)
+	 * \brief Erzeugt auf Basis eines Projektiles eine Ogre Entity mit dem angegebenen Name
+	 * \param itm Projektil fuer das die Entity erzeugt werden soll
+	 * \param name der Entitiy
+	 */
+	void createProjectile(Projectile* pr, std::string& name);
+
+	/**
+	 * \fn void deleteProjectile(std::string name)
+	 * \brief Entfernt ein Projektil aus der Szene
+	 * \param name Name des Objektes in Ogre
+	 */
+	void deleteProjectile(std::string name);
+
+	/**
+	 * \fn void destroySceneNode(std::string& node_name)
+	 * \brief Loescht einen Knoten mit allen angehaengten Objekten
+	 * \param node_name Name Knoten der geloescht werden soll
+	 */
+	void destroySceneNode(std::string& node_name);
+
+	/**
+	 * \var clearObjects()
+	 * \brief entfernt alle Objekte aus der Szene
+	 */
+	void clearObjects();
+
+	/**
+	 * \var void createScene()
+	 * \brief Erstellt die Szene neu
+	 */
+	void createScene();
+
+	/**
+	 * \fn void insertTiles()
+	 * \brief Fuegt die Tiles der Region in die Szene ein
+	 */
+	void insertTiles();
+
+	/**
+	 * \fn void registerMeshes()
+	 * \brief Registriert fuer alle Objekte, Projektile, Items und Tiles die zugehoerigen Meshes
+	 */
+	void registerMeshes();
+
+
+	/**
+	 * \fn void registerObject(WorldObject::TypeInfo::ObjectType, std::string mesh, std::string particle_system, float scaling_factor =1.0)
+	 * \brief Registriert fuer ein Objekt das zugehoerige Mesh, Partikelsystem, Skalierungsfaktor
+	 * \param subtype Subtyp des Objektes
+	 * \param mesh Mesh fuer das Objekt. Leerer String, wenn kein Mesh verwendet wird
+	 * \param particle_system Name des Partikelsystems. Leerer string, wenn kein Partikelsystem verwendet wird
+	 */
+	void registerObject(WorldObject::TypeInfo::ObjectSubtype subtype, std::string mesh, std::string particle_system= "", float scaling_factor =1.0);
+
+    /**
+     * \fn void registerAttachedMesh(WorldObject::TypeInfo::ObjectSubtype subtype, std::string bone, std::string mesh)
+     * \brief Registriert fuer ein bestehendes Objekt ein Mesh das an das Objekt angefuegt wird
+     * \param subtype Subtype des Objektes
+     * \param bone Knochen an den Mesh gehaengt wird
+     * \param mesh Mesh des angehaengten Objektes
+     */
+    void registerAttachedMesh(WorldObject::TypeInfo::ObjectSubtype subtype, std::string bone, std::string mesh);
+
+	/**
+	 * \fn void registerItem(Item::Subtype subtype, std::string mesh, std::string particle_system, float scaling_factor =1.0)
+	 * \brief Registriert fuer ein Item das zugehoerige Mesh, Partikelsystem, Skalierungsfaktor
+	 * \param subtype Subtyp des Items
+	 * \param mesh Mesh fuer das Item. Leerer String, wenn kein Mesh verwendet wird
+	 * \param particle_system Name des Partikelsystems. Leerer string, wenn kein Partikelsystem verwendet wird
+	 */
+	void registerItem(Item::Subtype subtype, std::string mesh, std::string particle_system= "", float scaling_factor =1.0);
+
+	/**
+	 * \fn void registerProjectile(, std::string mesh, std::string particle_system, float scaling_factor =1.0)
+	 * \brief Registriert fuer ein Projektil das zugehoerige Mesh, Partikelsystem, Skalierungsfaktor
+	 * \param type Subtyp des Projektil
+	 * \param mesh Mesh fuer das Projektil. Leerer String, wenn kein Mesh verwendet wird
+	 * \param particle_system Name des Partikelsystems. Leerer string, wenn kein Partikelsystem verwendet wird
+	 */
+	void registerProjectile(Projectile::ProjectileType type, std::string mesh, std::string particle_system = "", float scaling_factor =1.0);
+
+	/**
+	 * \fn void registerTile(Tile tile, std::string mesh, std::string particle_system, float scaling_factor =1.0)
+	 * \brief Registriert fuer ein Tile das zugehoerige Mesh, Partikelsystem, Skalierungsfaktor
+	 * \param tile Typ des Tile
+	 * \param mesh Mesh fuer das Tile. Leerer String, wenn kein Mesh verwendet wird
+	 * \param particle_system Name des Partikelsystems. Leerer string, wenn kein Partikelsystem verwendet wird
+	 */
+	void registerTile(Tile tile, std::string mesh, std::string particle_system ="", float scaling_factor =1.0);
+
+	/**
+	 * \fn RenderInfo getObjectRenderInfo(WorldObject::TypeInfo::ObjectSubtype subtype)
+	 * \brief Gibt die Informationen zum rendern eines Objektes aus
+	 * \param subtype Subtyp des Objektes
+	 */
+	RenderInfo getObjectRenderInfo(WorldObject::TypeInfo::ObjectSubtype subtype);
+
+	/**
+	 * \fn RenderInfo getItemRenderInfo(Item::Subtype subtype)
+	 * \brief Gibt die Informationen zum rendern eines Gegenstandes aus
+	 * \param subtype Subtyp des Gegenstandes
+	 */
+	RenderInfo getItemRenderInfo(Item::Subtype subtype);
+
+		/**
+	 * \fn RenderInfo getProjectileRenderInfo( (Projectile::ProjectileType type)
+	 * \brief Gibt die Informationen zum rendern eines Objektes aus
+	 * \param subtype Subtyp des Objektes
+		 */
+	RenderInfo getProjectileRenderInfo(Projectile::ProjectileType subtype);
+
+	/**
+	 * \fn RenderInfo getTileRenderInfo(Tile tile)
+	 * \brief Gibt die Informationen zum rendern eines Tiles aus
+	 * \param Tile Type des Tiles
+	 */
+	RenderInfo getTileRenderInfo(Tile tile);
+
+
+	/**
+	 * \var map<int,string>* m_objects
+	 * \brief IDs der objekte, die aktuell dargestellt werden, sowie deren Namen in Ogre
+	 */
+	map<int,string>* m_objects;
+
+	/**
+	 * \var map<int,string>* m_drop_items
+	 * \brief IDs der Gegenstaende, die aktuell dargestellt werden, sowie deren Namen in Ogre
+	 */
+	map<int,string>* m_drop_items;
+
+	/**
+	 * \var map<int,string>* m_projectiles
+	 * \brief IDs der Projektile, die aktuell dargestellt werden, sowie deren Namen in Ogre
+	 */
+	map<int,string>* m_projectiles;
+
+	/**
+	 * \var map<Projectile::ProjectileType, RenderInfo> m_projectile_render_info
+	 *  \brief Speichert fuer die Projektile die Information zum Rendern
+	 */
+	map<Projectile::ProjectileType, RenderInfo> m_projectile_render_info;
+
+	/**
+	 * \var map<WorldObject::TypeInfo::ObjectSubtype, RenderInfo> m_object_render_info
+	 *  \brief Speichert fuer die Objekte die Information zum Rendern
+	 */
+	map<WorldObject::TypeInfo::ObjectSubtype, RenderInfo> m_object_render_info;
+
+	/**
+	 * \var map<Item::Subtype, RenderInfo> m_item_render_info
+	 *  \brief Speichert fuer die Projektile die Information zum Rendern
+	 */
+	map<Item::Subtype, RenderInfo> m_item_render_info;
+
+	/**
+	 * \var map<Tile, RenderInfo> m_tile_render_info
+	 *  \brief Speichert fuer die Tiles die Information zum Rendern
+	 */
+	map<Tile, RenderInfo> m_tile_render_info;
+
+
+
+	/**
+	 * \var Document* m_document
+	 * \brief Dokument, dessen Daten dargestellt werden sollen
+	 */
+	Document* m_document;
+
+	/**
+	 * \var Ogre::RenderWindow* m_window
+	 * \brief Fenster in dem die Szene gerendert wird
+	 */
+	Ogre::RenderWindow* m_window;
+
+	/**
+	 * \var Ogre::Camera* m_camera
+	 * \brief Kamera mit der die Szene betrachtet wird
+	 */
+	Ogre::Camera* m_camera;
+
+	/**
+	 * \var Ogre::Viewport* m_viewport
+	 * \brief Darstellungsflaeche in die gerendert wird
+	 */
+	Ogre::Viewport* m_viewport;
+
+	/**
+	 * \var Ogre::SceneManager* m_scene_manager
+	 * \brief aktueller Scenemanager
+	 */
+	Ogre::SceneManager* m_scene_manager;
+
+
+};
+
+#endif
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/annotated.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: Class List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li id="current"><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<h1>TinyXml Class List</h1>Here are the classes, structs, unions and interfaces with brief descriptions:<table>
+  <tr><td class="indexkey"><a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a></td><td class="indexvalue">An attribute is a name-value pair </td></tr>
+  <tr><td class="indexkey"><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td class="indexvalue"><a class="el" href="classTiXmlBase.html">TiXmlBase</a> is a base class for every class in TinyXml </td></tr>
+  <tr><td class="indexkey"><a class="el" href="classTiXmlComment.html">TiXmlComment</a></td><td class="indexvalue">An XML comment </td></tr>
+  <tr><td class="indexkey"><a class="el" href="classTiXmlDeclaration.html">TiXmlDeclaration</a></td><td class="indexvalue">In correct XML the declaration is the first entry in the file </td></tr>
+  <tr><td class="indexkey"><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td class="indexvalue">Always the top level node </td></tr>
+  <tr><td class="indexkey"><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td class="indexvalue">The element is a container class </td></tr>
+  <tr><td class="indexkey"><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a></td><td class="indexvalue">A <a class="el" href="classTiXmlHandle.html">TiXmlHandle</a> is a class that wraps a node pointer with null checks; this is an incredibly useful thing </td></tr>
+  <tr><td class="indexkey"><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td class="indexvalue">The parent class for everything in the Document Object Model </td></tr>
+  <tr><td class="indexkey"><a class="el" href="classTiXmlPrinter.html">TiXmlPrinter</a></td><td class="indexvalue">Print to memory functionality </td></tr>
+  <tr><td class="indexkey"><a class="el" href="classTiXmlText.html">TiXmlText</a></td><td class="indexvalue">XML text </td></tr>
+  <tr><td class="indexkey"><a class="el" href="classTiXmlUnknown.html">TiXmlUnknown</a></td><td class="indexvalue">Any tag that tinyXml doesn't recognize is saved as an unknown </td></tr>
+  <tr><td class="indexkey"><a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a></td><td class="indexvalue">If you call the Accept() method, it requires being passed a <a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a> class to handle callbacks </td></tr>
+</table>
+<hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/classTiXmlAttribute-members.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,54 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: Member List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<h1>TiXmlAttribute Member List</h1>This is the complete list of members for <a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#b54bfb9b70fe6dd276e7b279cab7f003">Column</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlAttribute.html#2880ddef53fc7522c99535273954d230">DoubleValue</a>() const </td><td><a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#6bd8c315c1acb09e34107b8736505948">EncodeString</a>(const TIXML_STRING &amp;str, TIXML_STRING *out)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#6559a530ca6763fc301a14d77ed28c17">GetUserData</a>()</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#d0120210e4680ef2088601753ce0ede4">GetUserData</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlAttribute.html#a1a20ad59dc7e89a0ab265396360d50f">IntValue</a>() const </td><td><a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#d4b1472531c647a25b1840a87ae42438">IsWhiteSpaceCondensed</a>()</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlAttribute.html#298a57287d305904ba6bd96ae6f78d3d">Name</a>() const </td><td><a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlAttribute.html#1c78e92e223a40843f644ba48ef69f67">Next</a>() const </td><td><a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlAttribute.html#6ebbfe333fe76cd834bd6cbcca3130cf">Previous</a>() const </td><td><a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlAttribute.html#cc04956c1d5c4c31fe74f7a7528d109a">Print</a>(FILE *cfile, int depth) const </td><td><a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlAttribute.html#c87b2a8489906a5d7aa2875f20be3513">QueryDoubleValue</a>(double *_value) const </td><td><a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlAttribute.html#d6c93088ee21af41a107931223339344">QueryIntValue</a>(int *_value) const </td><td><a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#024bceb070188df92c2a8d8852dd0853">Row</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#0f799ec645bfb8d8a969e83478f379c1">SetCondenseWhiteSpace</a>(bool condense)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlAttribute.html#0316da31373496c4368ad549bf711394">SetDoubleValue</a>(double _value)</td><td><a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlAttribute.html#7e065df640116a62ea4f4b7da5449cc8">SetIntValue</a>(int _value)</td><td><a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlAttribute.html#b7fa3d21ff8d7c5764cf9af15b667a99">SetName</a>(const char *_name)</td><td><a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlAttribute.html#b296ff0c9a8c701055cd257a8a976e57">SetName</a>(const std::string &amp;_name)</td><td><a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#c6b3e0f790930d4970ec30764e937b5d">SetUserData</a>(void *user)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlAttribute.html#2dae44178f668b3cb48101be4f2236a0">SetValue</a>(const char *_value)</td><td><a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlAttribute.html#b43f67a0cc3ec1d80e62606500f0925f">SetValue</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlAttribute.html#9cfa3c8179873fd485d83003b114f8e1">TiXmlAttribute</a>()</td><td><a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlAttribute.html#052213522caac3979960e0714063861d">TiXmlAttribute</a>(const std::string &amp;_name, const std::string &amp;_value)</td><td><a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlAttribute.html#759d0b76fb8fcf765ecab243bc14f05e">TiXmlAttribute</a>(const char *_name, const char *_value)</td><td><a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#b242c01590191f644569fa89a080d97c">userData</a></td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlAttribute.html#0f874490eac8ca00ee0070765d0e97e3">Value</a>() const </td><td><a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlAttribute.html#87705c3ccf9ee9417beb4f7cbacd4d33">ValueStr</a>() const </td><td><a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a></td><td><code> [inline]</code></td></tr>
+</table><hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/classTiXmlAttribute.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,181 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: TiXmlAttribute Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<h1>TiXmlAttribute Class Reference</h1><!-- doxytag: class="TiXmlAttribute" --><!-- doxytag: inherits="TiXmlBase" -->An attribute is a name-value pair.  
+<a href="#_details">More...</a>
+<p>
+<code>#include &lt;<a class="el" href="tinyxml_8h-source.html">tinyxml.h</a>&gt;</code>
+<p>
+<p>Inheritance diagram for TiXmlAttribute:
+<p><center><img src="classTiXmlAttribute.png" usemap="#TiXmlAttribute_map" border="0" alt=""></center>
+<map name="TiXmlAttribute_map">
+<area href="classTiXmlBase.html" alt="TiXmlBase" shape="rect" coords="0,0,90,24">
+</map>
+<a href="classTiXmlAttribute-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9cfa3c8179873fd485d83003b114f8e1"></a><!-- doxytag: member="TiXmlAttribute::TiXmlAttribute" ref="9cfa3c8179873fd485d83003b114f8e1" args="()" -->
+&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#9cfa3c8179873fd485d83003b114f8e1">TiXmlAttribute</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct an empty attribute. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="052213522caac3979960e0714063861d"></a><!-- doxytag: member="TiXmlAttribute::TiXmlAttribute" ref="052213522caac3979960e0714063861d" args="(const std::string &amp;_name, const std::string &amp;_value)" -->
+&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#052213522caac3979960e0714063861d">TiXmlAttribute</a> (const std::string &amp;_name, const std::string &amp;_value)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">std::string constructor. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="759d0b76fb8fcf765ecab243bc14f05e"></a><!-- doxytag: member="TiXmlAttribute::TiXmlAttribute" ref="759d0b76fb8fcf765ecab243bc14f05e" args="(const char *_name, const char *_value)" -->
+&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#759d0b76fb8fcf765ecab243bc14f05e">TiXmlAttribute</a> (const char *_name, const char *_value)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct an attribute with a name and value. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="298a57287d305904ba6bd96ae6f78d3d"></a><!-- doxytag: member="TiXmlAttribute::Name" ref="298a57287d305904ba6bd96ae6f78d3d" args="() const " -->
+const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#298a57287d305904ba6bd96ae6f78d3d">Name</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the name of this attribute. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0f874490eac8ca00ee0070765d0e97e3"></a><!-- doxytag: member="TiXmlAttribute::Value" ref="0f874490eac8ca00ee0070765d0e97e3" args="() const " -->
+const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#0f874490eac8ca00ee0070765d0e97e3">Value</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the value of this attribute. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="87705c3ccf9ee9417beb4f7cbacd4d33"></a><!-- doxytag: member="TiXmlAttribute::ValueStr" ref="87705c3ccf9ee9417beb4f7cbacd4d33" args="() const " -->
+const std::string &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#87705c3ccf9ee9417beb4f7cbacd4d33">ValueStr</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the value of this attribute. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a1a20ad59dc7e89a0ab265396360d50f"></a><!-- doxytag: member="TiXmlAttribute::IntValue" ref="a1a20ad59dc7e89a0ab265396360d50f" args="() const " -->
+int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#a1a20ad59dc7e89a0ab265396360d50f">IntValue</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the value of this attribute, converted to an integer. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2880ddef53fc7522c99535273954d230"></a><!-- doxytag: member="TiXmlAttribute::DoubleValue" ref="2880ddef53fc7522c99535273954d230" args="() const " -->
+double&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#2880ddef53fc7522c99535273954d230">DoubleValue</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the value of this attribute, converted to a double. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#d6c93088ee21af41a107931223339344">QueryIntValue</a> (int *_value) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">QueryIntValue examines the value string.  <a href="#d6c93088ee21af41a107931223339344"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c87b2a8489906a5d7aa2875f20be3513"></a><!-- doxytag: member="TiXmlAttribute::QueryDoubleValue" ref="c87b2a8489906a5d7aa2875f20be3513" args="(double *_value) const " -->
+int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#c87b2a8489906a5d7aa2875f20be3513">QueryDoubleValue</a> (double *_value) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">QueryDoubleValue examines the value string. See <a class="el" href="classTiXmlAttribute.html#d6c93088ee21af41a107931223339344">QueryIntValue()</a>. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b7fa3d21ff8d7c5764cf9af15b667a99"></a><!-- doxytag: member="TiXmlAttribute::SetName" ref="b7fa3d21ff8d7c5764cf9af15b667a99" args="(const char *_name)" -->
+void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#b7fa3d21ff8d7c5764cf9af15b667a99">SetName</a> (const char *_name)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the name of this attribute. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2dae44178f668b3cb48101be4f2236a0"></a><!-- doxytag: member="TiXmlAttribute::SetValue" ref="2dae44178f668b3cb48101be4f2236a0" args="(const char *_value)" -->
+void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#2dae44178f668b3cb48101be4f2236a0">SetValue</a> (const char *_value)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the value. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7e065df640116a62ea4f4b7da5449cc8"></a><!-- doxytag: member="TiXmlAttribute::SetIntValue" ref="7e065df640116a62ea4f4b7da5449cc8" args="(int _value)" -->
+void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#7e065df640116a62ea4f4b7da5449cc8">SetIntValue</a> (int _value)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the value from an integer. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0316da31373496c4368ad549bf711394"></a><!-- doxytag: member="TiXmlAttribute::SetDoubleValue" ref="0316da31373496c4368ad549bf711394" args="(double _value)" -->
+void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#0316da31373496c4368ad549bf711394">SetDoubleValue</a> (double _value)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the value from a double. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b296ff0c9a8c701055cd257a8a976e57"></a><!-- doxytag: member="TiXmlAttribute::SetName" ref="b296ff0c9a8c701055cd257a8a976e57" args="(const std::string &amp;_name)" -->
+void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#b296ff0c9a8c701055cd257a8a976e57">SetName</a> (const std::string &amp;_name)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">STL std::string form. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b43f67a0cc3ec1d80e62606500f0925f"></a><!-- doxytag: member="TiXmlAttribute::SetValue" ref="b43f67a0cc3ec1d80e62606500f0925f" args="(const std::string &amp;_value)" -->
+void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#b43f67a0cc3ec1d80e62606500f0925f">SetValue</a> (const std::string &amp;_value)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">STL std::string form. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1c78e92e223a40843f644ba48ef69f67"></a><!-- doxytag: member="TiXmlAttribute::Next" ref="1c78e92e223a40843f644ba48ef69f67" args="() const " -->
+const <a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#1c78e92e223a40843f644ba48ef69f67">Next</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the next sibling attribute in the DOM. Returns null at end. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6ebbfe333fe76cd834bd6cbcca3130cf"></a><!-- doxytag: member="TiXmlAttribute::Previous" ref="6ebbfe333fe76cd834bd6cbcca3130cf" args="() const " -->
+const <a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#6ebbfe333fe76cd834bd6cbcca3130cf">Previous</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the previous sibling attribute in the DOM. Returns null at beginning. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlAttribute.html#cc04956c1d5c4c31fe74f7a7528d109a">Print</a> (FILE *cfile, int depth) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode.  <a href="#cc04956c1d5c4c31fe74f7a7528d109a"></a><br></td></tr>
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+An attribute is a name-value pair. 
+<p>
+Elements have an arbitrary number of attributes, each with a unique name.<p>
+<dl compact><dt><b>Note:</b></dt><dd>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. </dd></dl>
+
+<p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="cc04956c1d5c4c31fe74f7a7528d109a"></a><!-- doxytag: member="TiXmlAttribute::Print" ref="cc04956c1d5c4c31fe74f7a7528d109a" args="(FILE *cfile, int depth) const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">virtual void TiXmlAttribute::Print           </td>
+          <td>(</td>
+          <td class="paramtype">FILE *&nbsp;</td>
+          <td class="paramname"> <em>cfile</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&nbsp;</td>
+          <td class="paramname"> <em>depth</em></td><td>&nbsp;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"> const<code> [inline, virtual]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode. 
+<p>
+) Either or both cfile and str can be null.<p>
+This is a formatted print, and will insert tabs and newlines.<p>
+(For an unformatted stream, use the &lt;&lt; operator.) 
+<p>
+Implements <a class="el" href="classTiXmlBase.html#0de56b3f2ef14c65091a3b916437b512">TiXmlBase</a>.
+</div>
+</div><p>
+<a class="anchor" name="d6c93088ee21af41a107931223339344"></a><!-- doxytag: member="TiXmlAttribute::QueryIntValue" ref="d6c93088ee21af41a107931223339344" args="(int *_value) const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int TiXmlAttribute::QueryIntValue           </td>
+          <td>(</td>
+          <td class="paramtype">int *&nbsp;</td>
+          <td class="paramname"> <em>_value</em>          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const</td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+QueryIntValue examines the value string. 
+<p>
+It is an alternative to the <a class="el" href="classTiXmlAttribute.html#a1a20ad59dc7e89a0ab265396360d50f">IntValue()</a> 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.<p>
+A specialized but useful call. Note that for success it returns 0, which is the opposite of almost all other TinyXml calls. 
+</div>
+</div><p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="tinyxml_8h-source.html">tinyxml.h</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
Binary file src/tinyxml/docs/classTiXmlAttribute.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/classTiXmlBase-members.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,36 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: Member List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<h1>TiXmlBase Member List</h1>This is the complete list of members for <a class="el" href="classTiXmlBase.html">TiXmlBase</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#b54bfb9b70fe6dd276e7b279cab7f003">Column</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#6bd8c315c1acb09e34107b8736505948">EncodeString</a>(const TIXML_STRING &amp;str, TIXML_STRING *out)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#6559a530ca6763fc301a14d77ed28c17">GetUserData</a>()</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#d0120210e4680ef2088601753ce0ede4">GetUserData</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#d4b1472531c647a25b1840a87ae42438">IsWhiteSpaceCondensed</a>()</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#0de56b3f2ef14c65091a3b916437b512">Print</a>(FILE *cfile, int depth) const =0</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [pure virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#024bceb070188df92c2a8d8852dd0853">Row</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#0f799ec645bfb8d8a969e83478f379c1">SetCondenseWhiteSpace</a>(bool condense)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#c6b3e0f790930d4970ec30764e937b5d">SetUserData</a>(void *user)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#b242c01590191f644569fa89a080d97c">userData</a></td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [protected]</code></td></tr>
+</table><hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/classTiXmlBase.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,230 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: TiXmlBase Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<h1>TiXmlBase Class Reference</h1><!-- doxytag: class="TiXmlBase" --><a class="el" href="classTiXmlBase.html">TiXmlBase</a> is a base class for every class in TinyXml.  
+<a href="#_details">More...</a>
+<p>
+<code>#include &lt;<a class="el" href="tinyxml_8h-source.html">tinyxml.h</a>&gt;</code>
+<p>
+<p>Inheritance diagram for TiXmlBase:
+<p><center><img src="classTiXmlBase.png" usemap="#TiXmlBase_map" border="0" alt=""></center>
+<map name="TiXmlBase_map">
+<area href="classTiXmlAttribute.html" alt="TiXmlAttribute" shape="rect" coords="0,56,108,80">
+<area href="classTiXmlNode.html" alt="TiXmlNode" shape="rect" coords="295,56,403,80">
+<area href="classTiXmlComment.html" alt="TiXmlComment" shape="rect" coords="0,112,108,136">
+<area href="classTiXmlDeclaration.html" alt="TiXmlDeclaration" shape="rect" coords="118,112,226,136">
+<area href="classTiXmlDocument.html" alt="TiXmlDocument" shape="rect" coords="236,112,344,136">
+<area href="classTiXmlElement.html" alt="TiXmlElement" shape="rect" coords="354,112,462,136">
+<area href="classTiXmlText.html" alt="TiXmlText" shape="rect" coords="472,112,580,136">
+<area href="classTiXmlUnknown.html" alt="TiXmlUnknown" shape="rect" coords="590,112,698,136">
+</map>
+<a href="classTiXmlBase-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#0de56b3f2ef14c65091a3b916437b512">Print</a> (FILE *cfile, int depth) const =0</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode.  <a href="#0de56b3f2ef14c65091a3b916437b512"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#024bceb070188df92c2a8d8852dd0853">Row</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the position, in the original source file, of this node or attribute.  <a href="#024bceb070188df92c2a8d8852dd0853"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b54bfb9b70fe6dd276e7b279cab7f003"></a><!-- doxytag: member="TiXmlBase::Column" ref="b54bfb9b70fe6dd276e7b279cab7f003" args="() const " -->
+int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#b54bfb9b70fe6dd276e7b279cab7f003">Column</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">See <a class="el" href="classTiXmlBase.html#024bceb070188df92c2a8d8852dd0853">Row()</a>. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c6b3e0f790930d4970ec30764e937b5d"></a><!-- doxytag: member="TiXmlBase::SetUserData" ref="c6b3e0f790930d4970ec30764e937b5d" args="(void *user)" -->
+void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#c6b3e0f790930d4970ec30764e937b5d">SetUserData</a> (void *user)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set a pointer to arbitrary user data. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6559a530ca6763fc301a14d77ed28c17"></a><!-- doxytag: member="TiXmlBase::GetUserData" ref="6559a530ca6763fc301a14d77ed28c17" args="()" -->
+void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#6559a530ca6763fc301a14d77ed28c17">GetUserData</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a pointer to arbitrary user data. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d0120210e4680ef2088601753ce0ede4"></a><!-- doxytag: member="TiXmlBase::GetUserData" ref="d0120210e4680ef2088601753ce0ede4" args="() const " -->
+const void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#d0120210e4680ef2088601753ce0ede4">GetUserData</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get a pointer to arbitrary user data. <br></td></tr>
+<tr><td colspan="2"><br><h2>Static Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#0f799ec645bfb8d8a969e83478f379c1">SetCondenseWhiteSpace</a> (bool condense)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The world does not agree on whether white space should be kept or not.  <a href="#0f799ec645bfb8d8a969e83478f379c1"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d4b1472531c647a25b1840a87ae42438"></a><!-- doxytag: member="TiXmlBase::IsWhiteSpaceCondensed" ref="d4b1472531c647a25b1840a87ae42438" args="()" -->
+static bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#d4b1472531c647a25b1840a87ae42438">IsWhiteSpaceCondensed</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the current white space setting. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">static void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#6bd8c315c1acb09e34107b8736505948">EncodeString</a> (const TIXML_STRING &amp;str, TIXML_STRING *out)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Expands entities in a string.  <a href="#6bd8c315c1acb09e34107b8736505948"></a><br></td></tr>
+<tr><td colspan="2"><br><h2>Protected Attributes</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b242c01590191f644569fa89a080d97c"></a><!-- doxytag: member="TiXmlBase::userData" ref="b242c01590191f644569fa89a080d97c" args="" -->
+void *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#b242c01590191f644569fa89a080d97c">userData</a></td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Field containing a generic user pointer. <br></td></tr>
+<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="218872a0d985ae30e78c55adc4bdb196"></a><!-- doxytag: member="TiXmlBase::TiXmlNode" ref="218872a0d985ae30e78c55adc4bdb196" args="" -->
+class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#218872a0d985ae30e78c55adc4bdb196">TiXmlNode</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b6592e32cb9132be517cc12a70564c4b"></a><!-- doxytag: member="TiXmlBase::TiXmlElement" ref="b6592e32cb9132be517cc12a70564c4b" args="" -->
+class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#b6592e32cb9132be517cc12a70564c4b">TiXmlElement</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="173617f6dfe902cf484ce5552b950475"></a><!-- doxytag: member="TiXmlBase::TiXmlDocument" ref="173617f6dfe902cf484ce5552b950475" args="" -->
+class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlBase.html#173617f6dfe902cf484ce5552b950475">TiXmlDocument</a></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+<a class="el" href="classTiXmlBase.html">TiXmlBase</a> is a base class for every class in TinyXml. 
+<p>
+It does little except to establish that TinyXml classes can be printed and provide some utility functions.<p>
+In XML, the document and elements can contain other elements and other types of nodes.<p>
+<div class="fragment"><pre class="fragment">	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)
+	</pre></div> 
+<p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="6bd8c315c1acb09e34107b8736505948"></a><!-- doxytag: member="TiXmlBase::EncodeString" ref="6bd8c315c1acb09e34107b8736505948" args="(const TIXML_STRING &amp;str, TIXML_STRING *out)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">static void TiXmlBase::EncodeString           </td>
+          <td>(</td>
+          <td class="paramtype">const TIXML_STRING &amp;&nbsp;</td>
+          <td class="paramname"> <em>str</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">TIXML_STRING *&nbsp;</td>
+          <td class="paramname"> <em>out</em></td><td>&nbsp;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"><code> [static]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Expands entities in a string. 
+<p>
+Note this should not contian the tag's '&lt;', '&gt;', etc, or they will be transformed into entities! 
+</div>
+</div><p>
+<a class="anchor" name="0de56b3f2ef14c65091a3b916437b512"></a><!-- doxytag: member="TiXmlBase::Print" ref="0de56b3f2ef14c65091a3b916437b512" args="(FILE *cfile, int depth) const =0" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">virtual void TiXmlBase::Print           </td>
+          <td>(</td>
+          <td class="paramtype">FILE *&nbsp;</td>
+          <td class="paramname"> <em>cfile</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&nbsp;</td>
+          <td class="paramname"> <em>depth</em></td><td>&nbsp;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"> const<code> [pure virtual]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode. 
+<p>
+) Either or both cfile and str can be null.<p>
+This is a formatted print, and will insert tabs and newlines.<p>
+(For an unformatted stream, use the &lt;&lt; operator.) 
+<p>
+Implemented in <a class="el" href="classTiXmlAttribute.html#cc04956c1d5c4c31fe74f7a7528d109a">TiXmlAttribute</a>, <a class="el" href="classTiXmlElement.html#fbf52736e70fc91ec9d760721d6f4fd2">TiXmlElement</a>, <a class="el" href="classTiXmlComment.html#6b316527aaa8da0370cd68c22a5a0f5f">TiXmlComment</a>, <a class="el" href="classTiXmlText.html#0cafbf6f236c7f02d12b2bffc2b7976b">TiXmlText</a>, <a class="el" href="classTiXmlDeclaration.html#bf6303db4bd05b5be554036817ff1cb4">TiXmlDeclaration</a>, <a class="el" href="classTiXmlUnknown.html#31ba089a40fb5a1869750fce09b0bacb">TiXmlUnknown</a>, and <a class="el" href="classTiXmlDocument.html#8701fda1fa31b25abbc9c0df42da10e8">TiXmlDocument</a>.
+</div>
+</div><p>
+<a class="anchor" name="024bceb070188df92c2a8d8852dd0853"></a><!-- doxytag: member="TiXmlBase::Row" ref="024bceb070188df92c2a8d8852dd0853" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int TiXmlBase::Row           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const<code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Return the position, in the original source file, of this node or attribute. 
+<p>
+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.<p>
+Generally, the row and column value will be set when the TiXmlDocument::Load(), <a class="el" href="classTiXmlDocument.html#4c852a889c02cf251117fd1d9fe1845f">TiXmlDocument::LoadFile()</a>, or any TiXmlNode::Parse() is called. It will NOT be set when the DOM was created from operator&gt;&gt;.<p>
+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.<p>
+There is a minor performance cost to computing the row and column. Computation can be disabled if <a class="el" href="classTiXmlDocument.html#51dac56316f89b35bdb7d0d433ba988e">TiXmlDocument::SetTabSize()</a> is called with 0 as the value.<p>
+<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="classTiXmlDocument.html#51dac56316f89b35bdb7d0d433ba988e">TiXmlDocument::SetTabSize()</a> </dd></dl>
+
+</div>
+</div><p>
+<a class="anchor" name="0f799ec645bfb8d8a969e83478f379c1"></a><!-- doxytag: member="TiXmlBase::SetCondenseWhiteSpace" ref="0f799ec645bfb8d8a969e83478f379c1" args="(bool condense)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">static void TiXmlBase::SetCondenseWhiteSpace           </td>
+          <td>(</td>
+          <td class="paramtype">bool&nbsp;</td>
+          <td class="paramname"> <em>condense</em>          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"><code> [inline, static]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+The world does not agree on whether white space should be kept or not. 
+<p>
+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. 
+</div>
+</div><p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="tinyxml_8h-source.html">tinyxml.h</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
Binary file src/tinyxml/docs/classTiXmlBase.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/classTiXmlComment-members.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,100 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: Member List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<h1>TiXmlComment Member List</h1>This is the complete list of members for <a class="el" href="classTiXmlComment.html">TiXmlComment</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="classTiXmlComment.html#f3ac1b99fbbe9ea4fb6e14146156e43e">Accept</a>(TiXmlVisitor *visitor) const </td><td><a class="el" href="classTiXmlComment.html">TiXmlComment</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#708e7f953df61d4d2d12f73171550a4b">Clear</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlComment.html#0d6662bdc52488b9e12b3c7a0453d028">Clone</a>() const </td><td><a class="el" href="classTiXmlComment.html">TiXmlComment</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#b54bfb9b70fe6dd276e7b279cab7f003">Column</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#6bd8c315c1acb09e34107b8736505948">EncodeString</a>(const TIXML_STRING &amp;str, TIXML_STRING *out)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#44c8eee26bbe2d1b2762038df9dde2f0">FirstChild</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1f05828d023150706eeb16d6fb3f6355">FirstChild</a>(const char *value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#bc8bf32be6419ec453a731868de19554">FirstChild</a>(const char *_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#07f6200a5956c723c5b52d70f29c46f6">FirstChild</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#10d2669ccb5e29e02fcb0e4408685ef6">FirstChild</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#f4fb652f6bd79ae0d5ce7d0f7d3c0fba">FirstChildElement</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#ccda2c6b45c25bb5a6f9c3407a644e61">FirstChildElement</a>(const char *_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#327ad4bbd90073c5dfc931b07314f5f7">FirstChildElement</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#7f1d7291880534c1e5cdeb392d8c1f45">FirstChildElement</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#80e397fa973cf5323e33b07154b024f3">GetDocument</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#6559a530ca6763fc301a14d77ed28c17">GetUserData</a>()</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#d0120210e4680ef2088601753ce0ede4">GetUserData</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#d9b75e54ec19301c8b4d5ff583d0b3d5">InsertAfterChild</a>(TiXmlNode *afterThis, const TiXmlNode &amp;addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#0c146fa2fff0157b681594102f48cbc7">InsertBeforeChild</a>(TiXmlNode *beforeThis, const TiXmlNode &amp;addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#d7d4630e1a2a916edda16be22448a8ba">InsertEndChild</a>(const TiXmlNode &amp;addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#d4b1472531c647a25b1840a87ae42438">IsWhiteSpaceCondensed</a>()</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#8621196ba3705fa226bef4a761cc51b6">IterateChildren</a>(const TiXmlNode *previous) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#dfaef35a076b9343adc1420757376c39">IterateChildren</a>(const char *value, const TiXmlNode *previous) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1cbaaf8e82c09ad763d52616d75724df">IterateChildren</a>(const std::string &amp;_value, const TiXmlNode *previous) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#16e9ad53e2f5445b14bf325c90aa862c">IterateChildren</a>(const std::string &amp;_value, const TiXmlNode *previous)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#6432d2b2495f6caf9cb4278df706a031">LastChild</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#bad5bf1059c48127b958711ef89e8e5d">LastChild</a>(const char *_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#256d0cdbfcfeccae83f3a1c9747a8b63">LastChild</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#69772c9202f70553f940b15c06b07be3">LastChild</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#5d29442ae46de6d0168429156197bfc6">LinkEndChild</a>(TiXmlNode *addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1b94d2f7fa7ab25a5a8e8d4340c449c9">NextSibling</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1757c1f4d01e8c9596ffdbd561c76aea">NextSibling</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#f854baeba384f5fe9859f5aee03b548e">NextSibling</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#2e61c0b89a77e36a0e8c60490003cb46">NextSibling</a>(const char *) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#73acf929d49d10bd0e5fb3d31b0372d1">NextSiblingElement</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#071ba77fd7ab79402fa84b7e9b8607b3">NextSiblingElement</a>(const char *) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#7572d0af9d1e696ee3f05d8bb5ebb463">NextSiblingElement</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#506958e34406729a4e4c5326ea39d081">NextSiblingElement</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#eed21ad30630ef6e7faf096127edc9f3">NoChildren</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#836eded4920ab9e9ef28496f48cd95a2">NodeType</a> enum name</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#86cd49cfb17a844c0010b3136ac966c7">operator&lt;&lt;</a>(std::ostream &amp;out, const TiXmlNode &amp;base)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#52ef17e7080df2490cf87bde380685ab">operator&lt;&lt;</a>(std::string &amp;out, const TiXmlNode &amp;base)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#b57bd426563c926844f65a78412e18b9">operator&gt;&gt;</a>(std::istream &amp;in, TiXmlNode &amp;base)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#b643043132ffd794f8602685d34a982e">Parent</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#c2cd892768726270e511b2ab32de4d10">PreviousSibling</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#5bdd49327eec1e609b7d22af706b8316">PreviousSibling</a>(const char *) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#658276f57d35d5d4256d1dc1a2c398ab">PreviousSibling</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#cc8a0434c7f401d4a3b6dee77c1a5912">PreviousSibling</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlComment.html#6b316527aaa8da0370cd68c22a5a0f5f">Print</a>(FILE *cfile, int depth) const </td><td><a class="el" href="classTiXmlComment.html">TiXmlComment</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#e19d8510efc90596552f4feeac9a8fbf">RemoveChild</a>(TiXmlNode *removeThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#0c49e739a17b9938050c22cd89617fbd">ReplaceChild</a>(TiXmlNode *replaceThis, const TiXmlNode &amp;withThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#024bceb070188df92c2a8d8852dd0853">Row</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#0f799ec645bfb8d8a969e83478f379c1">SetCondenseWhiteSpace</a>(bool condense)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#c6b3e0f790930d4970ec30764e937b5d">SetUserData</a>(void *user)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#2a38329ca5d3f28f98ce932b8299ae90">SetValue</a>(const char *_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#2598d5f448042c1abbeae4503dd45ff2">SetValue</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlComment.html#aa3252031d3e8bd3a2bf51a1c61201b7">TiXmlComment</a>()</td><td><a class="el" href="classTiXmlComment.html">TiXmlComment</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlComment.html#37e7802ef17bc03ebe5ae79bf0713d47">TiXmlComment</a>(const char *_value)</td><td><a class="el" href="classTiXmlComment.html">TiXmlComment</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlComment.html#00fb4215c20a2399ea05ac9b9e7e68a0">ToComment</a>() const </td><td><a class="el" href="classTiXmlComment.html">TiXmlComment</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlComment.html#cc7c7e07e13c23f17797d642981511df">ToComment</a>()</td><td><a class="el" href="classTiXmlComment.html">TiXmlComment</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#9f43e6984fc7d4afd6eb32714c6b7b72">ToDeclaration</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#4027136ca820ff4a636b607231b6a6df">ToDeclaration</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#8a4cda4b15c29f64cff419309aebed08">ToDocument</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#6a4c8ac28ee7a745d059db6691e03bae">ToDocument</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#72abed96dc9667ab9e0a2a275301bb1c">ToElement</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#a65d000223187d22a4dcebd7479e9ebc">ToElement</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#95a46a52c525992d6b4ee08beb14cd69">ToText</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#3ddfbcac78fbea041fad57e5c6d60a03">ToText</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#fd7205cf31d7a376929f8a36930627a2">ToUnknown</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#06de5af852668c7e4af0d09c205f0b0d">ToUnknown</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#57b99d5c97d67a42b9752f5210a1ba5e">Type</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#b242c01590191f644569fa89a080d97c">userData</a></td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#77943eb90d12c2892b1337a9f5918b41">Value</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#6d9e505619d39bf50bfd9609c9169ea5">ValueStr</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+</table><hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/classTiXmlComment.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,108 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: TiXmlComment Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<h1>TiXmlComment Class Reference</h1><!-- doxytag: class="TiXmlComment" --><!-- doxytag: inherits="TiXmlNode" -->An XML comment.  
+<a href="#_details">More...</a>
+<p>
+<code>#include &lt;<a class="el" href="tinyxml_8h-source.html">tinyxml.h</a>&gt;</code>
+<p>
+<p>Inheritance diagram for TiXmlComment:
+<p><center><img src="classTiXmlComment.png" usemap="#TiXmlComment_map" border="0" alt=""></center>
+<map name="TiXmlComment_map">
+<area href="classTiXmlNode.html" alt="TiXmlNode" shape="rect" coords="0,56,94,80">
+<area href="classTiXmlBase.html" alt="TiXmlBase" shape="rect" coords="0,0,94,24">
+</map>
+<a href="classTiXmlComment-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="aa3252031d3e8bd3a2bf51a1c61201b7"></a><!-- doxytag: member="TiXmlComment::TiXmlComment" ref="aa3252031d3e8bd3a2bf51a1c61201b7" args="()" -->
+&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlComment.html#aa3252031d3e8bd3a2bf51a1c61201b7">TiXmlComment</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructs an empty comment. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="37e7802ef17bc03ebe5ae79bf0713d47"></a><!-- doxytag: member="TiXmlComment::TiXmlComment" ref="37e7802ef17bc03ebe5ae79bf0713d47" args="(const char *_value)" -->
+&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlComment.html#37e7802ef17bc03ebe5ae79bf0713d47">TiXmlComment</a> (const char *_value)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct a comment from text. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0d6662bdc52488b9e12b3c7a0453d028"></a><!-- doxytag: member="TiXmlComment::Clone" ref="0d6662bdc52488b9e12b3c7a0453d028" args="() const " -->
+virtual <a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlComment.html#0d6662bdc52488b9e12b3c7a0453d028">Clone</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns a copy of this Comment. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlComment.html#6b316527aaa8da0370cd68c22a5a0f5f">Print</a> (FILE *cfile, int depth) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode.  <a href="#6b316527aaa8da0370cd68c22a5a0f5f"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="00fb4215c20a2399ea05ac9b9e7e68a0"></a><!-- doxytag: member="TiXmlComment::ToComment" ref="00fb4215c20a2399ea05ac9b9e7e68a0" args="() const " -->
+virtual const <a class="el" href="classTiXmlComment.html">TiXmlComment</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlComment.html#00fb4215c20a2399ea05ac9b9e7e68a0">ToComment</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cast to a more defined type. Will return null not of the requested type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cc7c7e07e13c23f17797d642981511df"></a><!-- doxytag: member="TiXmlComment::ToComment" ref="cc7c7e07e13c23f17797d642981511df" args="()" -->
+virtual <a class="el" href="classTiXmlComment.html">TiXmlComment</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlComment.html#cc7c7e07e13c23f17797d642981511df">ToComment</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cast to a more defined type. Will return null not of the requested type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f3ac1b99fbbe9ea4fb6e14146156e43e"></a><!-- doxytag: member="TiXmlComment::Accept" ref="f3ac1b99fbbe9ea4fb6e14146156e43e" args="(TiXmlVisitor *visitor) const " -->
+virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlComment.html#f3ac1b99fbbe9ea4fb6e14146156e43e">Accept</a> (<a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a> *visitor) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Walk the XML tree visiting this node and all of its children. <br></td></tr>
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+An XML comment. 
+<p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="6b316527aaa8da0370cd68c22a5a0f5f"></a><!-- doxytag: member="TiXmlComment::Print" ref="6b316527aaa8da0370cd68c22a5a0f5f" args="(FILE *cfile, int depth) const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">virtual void TiXmlComment::Print           </td>
+          <td>(</td>
+          <td class="paramtype">FILE *&nbsp;</td>
+          <td class="paramname"> <em>cfile</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&nbsp;</td>
+          <td class="paramname"> <em>depth</em></td><td>&nbsp;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"> const<code> [virtual]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode. 
+<p>
+) Either or both cfile and str can be null.<p>
+This is a formatted print, and will insert tabs and newlines.<p>
+(For an unformatted stream, use the &lt;&lt; operator.) 
+<p>
+Implements <a class="el" href="classTiXmlBase.html#0de56b3f2ef14c65091a3b916437b512">TiXmlBase</a>.
+</div>
+</div><p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="tinyxml_8h-source.html">tinyxml.h</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
Binary file src/tinyxml/docs/classTiXmlComment.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/classTiXmlDeclaration-members.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,104 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: Member List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<h1>TiXmlDeclaration Member List</h1>This is the complete list of members for <a class="el" href="classTiXmlDeclaration.html">TiXmlDeclaration</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDeclaration.html#22315a535983b86535cdba3458669e3e">Accept</a>(TiXmlVisitor *visitor) const </td><td><a class="el" href="classTiXmlDeclaration.html">TiXmlDeclaration</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#708e7f953df61d4d2d12f73171550a4b">Clear</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDeclaration.html#7cf459186040141cda7a180a6585ce2e">Clone</a>() const </td><td><a class="el" href="classTiXmlDeclaration.html">TiXmlDeclaration</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#b54bfb9b70fe6dd276e7b279cab7f003">Column</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#6bd8c315c1acb09e34107b8736505948">EncodeString</a>(const TIXML_STRING &amp;str, TIXML_STRING *out)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDeclaration.html#5d974231f9e9a2f0542f15f3a46cdb76">Encoding</a>() const </td><td><a class="el" href="classTiXmlDeclaration.html">TiXmlDeclaration</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#44c8eee26bbe2d1b2762038df9dde2f0">FirstChild</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1f05828d023150706eeb16d6fb3f6355">FirstChild</a>(const char *value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#bc8bf32be6419ec453a731868de19554">FirstChild</a>(const char *_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#07f6200a5956c723c5b52d70f29c46f6">FirstChild</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#10d2669ccb5e29e02fcb0e4408685ef6">FirstChild</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#f4fb652f6bd79ae0d5ce7d0f7d3c0fba">FirstChildElement</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#ccda2c6b45c25bb5a6f9c3407a644e61">FirstChildElement</a>(const char *_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#327ad4bbd90073c5dfc931b07314f5f7">FirstChildElement</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#7f1d7291880534c1e5cdeb392d8c1f45">FirstChildElement</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#80e397fa973cf5323e33b07154b024f3">GetDocument</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#6559a530ca6763fc301a14d77ed28c17">GetUserData</a>()</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#d0120210e4680ef2088601753ce0ede4">GetUserData</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#d9b75e54ec19301c8b4d5ff583d0b3d5">InsertAfterChild</a>(TiXmlNode *afterThis, const TiXmlNode &amp;addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#0c146fa2fff0157b681594102f48cbc7">InsertBeforeChild</a>(TiXmlNode *beforeThis, const TiXmlNode &amp;addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#d7d4630e1a2a916edda16be22448a8ba">InsertEndChild</a>(const TiXmlNode &amp;addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#d4b1472531c647a25b1840a87ae42438">IsWhiteSpaceCondensed</a>()</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#8621196ba3705fa226bef4a761cc51b6">IterateChildren</a>(const TiXmlNode *previous) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#dfaef35a076b9343adc1420757376c39">IterateChildren</a>(const char *value, const TiXmlNode *previous) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1cbaaf8e82c09ad763d52616d75724df">IterateChildren</a>(const std::string &amp;_value, const TiXmlNode *previous) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#16e9ad53e2f5445b14bf325c90aa862c">IterateChildren</a>(const std::string &amp;_value, const TiXmlNode *previous)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#6432d2b2495f6caf9cb4278df706a031">LastChild</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#bad5bf1059c48127b958711ef89e8e5d">LastChild</a>(const char *_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#256d0cdbfcfeccae83f3a1c9747a8b63">LastChild</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#69772c9202f70553f940b15c06b07be3">LastChild</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#5d29442ae46de6d0168429156197bfc6">LinkEndChild</a>(TiXmlNode *addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1b94d2f7fa7ab25a5a8e8d4340c449c9">NextSibling</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1757c1f4d01e8c9596ffdbd561c76aea">NextSibling</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#f854baeba384f5fe9859f5aee03b548e">NextSibling</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#2e61c0b89a77e36a0e8c60490003cb46">NextSibling</a>(const char *) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#73acf929d49d10bd0e5fb3d31b0372d1">NextSiblingElement</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#071ba77fd7ab79402fa84b7e9b8607b3">NextSiblingElement</a>(const char *) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#7572d0af9d1e696ee3f05d8bb5ebb463">NextSiblingElement</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#506958e34406729a4e4c5326ea39d081">NextSiblingElement</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#eed21ad30630ef6e7faf096127edc9f3">NoChildren</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#836eded4920ab9e9ef28496f48cd95a2">NodeType</a> enum name</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#86cd49cfb17a844c0010b3136ac966c7">operator&lt;&lt;</a>(std::ostream &amp;out, const TiXmlNode &amp;base)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#52ef17e7080df2490cf87bde380685ab">operator&lt;&lt;</a>(std::string &amp;out, const TiXmlNode &amp;base)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#b57bd426563c926844f65a78412e18b9">operator&gt;&gt;</a>(std::istream &amp;in, TiXmlNode &amp;base)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#b643043132ffd794f8602685d34a982e">Parent</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#c2cd892768726270e511b2ab32de4d10">PreviousSibling</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#5bdd49327eec1e609b7d22af706b8316">PreviousSibling</a>(const char *) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#658276f57d35d5d4256d1dc1a2c398ab">PreviousSibling</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#cc8a0434c7f401d4a3b6dee77c1a5912">PreviousSibling</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDeclaration.html#bf6303db4bd05b5be554036817ff1cb4">Print</a>(FILE *cfile, int depth) const </td><td><a class="el" href="classTiXmlDeclaration.html">TiXmlDeclaration</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#e19d8510efc90596552f4feeac9a8fbf">RemoveChild</a>(TiXmlNode *removeThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#0c49e739a17b9938050c22cd89617fbd">ReplaceChild</a>(TiXmlNode *replaceThis, const TiXmlNode &amp;withThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#024bceb070188df92c2a8d8852dd0853">Row</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#0f799ec645bfb8d8a969e83478f379c1">SetCondenseWhiteSpace</a>(bool condense)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#c6b3e0f790930d4970ec30764e937b5d">SetUserData</a>(void *user)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#2a38329ca5d3f28f98ce932b8299ae90">SetValue</a>(const char *_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#2598d5f448042c1abbeae4503dd45ff2">SetValue</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDeclaration.html#9ff06afc033d7ef730ec7c6825b97ad9">Standalone</a>() const </td><td><a class="el" href="classTiXmlDeclaration.html">TiXmlDeclaration</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDeclaration.html#a0484d059bea0ea1acb47c9094382d79">TiXmlDeclaration</a>()</td><td><a class="el" href="classTiXmlDeclaration.html">TiXmlDeclaration</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDeclaration.html#cd5556007c3c72209465081de39d9836">TiXmlDeclaration</a>(const std::string &amp;_version, const std::string &amp;_encoding, const std::string &amp;_standalone)</td><td><a class="el" href="classTiXmlDeclaration.html">TiXmlDeclaration</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDeclaration.html#3b618d1c30c25e4b7a71f31a595ee298">TiXmlDeclaration</a>(const char *_version, const char *_encoding, const char *_standalone)</td><td><a class="el" href="classTiXmlDeclaration.html">TiXmlDeclaration</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#a0a5086f9eaee910bbfdc7f975e26574">ToComment</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#383e06a0787f7063953934867990f849">ToComment</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDeclaration.html#1e085d3fefd1dbf5ccdbff729931a967">ToDeclaration</a>() const </td><td><a class="el" href="classTiXmlDeclaration.html">TiXmlDeclaration</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDeclaration.html#6bd3d1daddcaeb9543c24bfd090969ce">ToDeclaration</a>()</td><td><a class="el" href="classTiXmlDeclaration.html">TiXmlDeclaration</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#8a4cda4b15c29f64cff419309aebed08">ToDocument</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#6a4c8ac28ee7a745d059db6691e03bae">ToDocument</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#72abed96dc9667ab9e0a2a275301bb1c">ToElement</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#a65d000223187d22a4dcebd7479e9ebc">ToElement</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#95a46a52c525992d6b4ee08beb14cd69">ToText</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#3ddfbcac78fbea041fad57e5c6d60a03">ToText</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#fd7205cf31d7a376929f8a36930627a2">ToUnknown</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#06de5af852668c7e4af0d09c205f0b0d">ToUnknown</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#57b99d5c97d67a42b9752f5210a1ba5e">Type</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#b242c01590191f644569fa89a080d97c">userData</a></td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#77943eb90d12c2892b1337a9f5918b41">Value</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#6d9e505619d39bf50bfd9609c9169ea5">ValueStr</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDeclaration.html#02ee557b1a4545c3219ed377c103ec76">Version</a>() const </td><td><a class="el" href="classTiXmlDeclaration.html">TiXmlDeclaration</a></td><td><code> [inline]</code></td></tr>
+</table><hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/classTiXmlDeclaration.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,129 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: TiXmlDeclaration Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<h1>TiXmlDeclaration Class Reference</h1><!-- doxytag: class="TiXmlDeclaration" --><!-- doxytag: inherits="TiXmlNode" -->In correct XML the declaration is the first entry in the file.  
+<a href="#_details">More...</a>
+<p>
+<code>#include &lt;<a class="el" href="tinyxml_8h-source.html">tinyxml.h</a>&gt;</code>
+<p>
+<p>Inheritance diagram for TiXmlDeclaration:
+<p><center><img src="classTiXmlDeclaration.png" usemap="#TiXmlDeclaration_map" border="0" alt=""></center>
+<map name="TiXmlDeclaration_map">
+<area href="classTiXmlNode.html" alt="TiXmlNode" shape="rect" coords="0,56,108,80">
+<area href="classTiXmlBase.html" alt="TiXmlBase" shape="rect" coords="0,0,108,24">
+</map>
+<a href="classTiXmlDeclaration-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a0484d059bea0ea1acb47c9094382d79"></a><!-- doxytag: member="TiXmlDeclaration::TiXmlDeclaration" ref="a0484d059bea0ea1acb47c9094382d79" args="()" -->
+&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDeclaration.html#a0484d059bea0ea1acb47c9094382d79">TiXmlDeclaration</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct an empty declaration. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cd5556007c3c72209465081de39d9836"></a><!-- doxytag: member="TiXmlDeclaration::TiXmlDeclaration" ref="cd5556007c3c72209465081de39d9836" args="(const std::string &amp;_version, const std::string &amp;_encoding, const std::string &amp;_standalone)" -->
+&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDeclaration.html#cd5556007c3c72209465081de39d9836">TiXmlDeclaration</a> (const std::string &amp;_version, const std::string &amp;_encoding, const std::string &amp;_standalone)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3b618d1c30c25e4b7a71f31a595ee298"></a><!-- doxytag: member="TiXmlDeclaration::TiXmlDeclaration" ref="3b618d1c30c25e4b7a71f31a595ee298" args="(const char *_version, const char *_encoding, const char *_standalone)" -->
+&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDeclaration.html#3b618d1c30c25e4b7a71f31a595ee298">TiXmlDeclaration</a> (const char *_version, const char *_encoding, const char *_standalone)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="02ee557b1a4545c3219ed377c103ec76"></a><!-- doxytag: member="TiXmlDeclaration::Version" ref="02ee557b1a4545c3219ed377c103ec76" args="() const " -->
+const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDeclaration.html#02ee557b1a4545c3219ed377c103ec76">Version</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Version. Will return an empty string if none was found. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5d974231f9e9a2f0542f15f3a46cdb76"></a><!-- doxytag: member="TiXmlDeclaration::Encoding" ref="5d974231f9e9a2f0542f15f3a46cdb76" args="() const " -->
+const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDeclaration.html#5d974231f9e9a2f0542f15f3a46cdb76">Encoding</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Encoding. Will return an empty string if none was found. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9ff06afc033d7ef730ec7c6825b97ad9"></a><!-- doxytag: member="TiXmlDeclaration::Standalone" ref="9ff06afc033d7ef730ec7c6825b97ad9" args="() const " -->
+const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDeclaration.html#9ff06afc033d7ef730ec7c6825b97ad9">Standalone</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Is this a standalone document? <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7cf459186040141cda7a180a6585ce2e"></a><!-- doxytag: member="TiXmlDeclaration::Clone" ref="7cf459186040141cda7a180a6585ce2e" args="() const " -->
+virtual <a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDeclaration.html#7cf459186040141cda7a180a6585ce2e">Clone</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a copy of this Declaration and returns it. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDeclaration.html#bf6303db4bd05b5be554036817ff1cb4">Print</a> (FILE *cfile, int depth) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode.  <a href="#bf6303db4bd05b5be554036817ff1cb4"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1e085d3fefd1dbf5ccdbff729931a967"></a><!-- doxytag: member="TiXmlDeclaration::ToDeclaration" ref="1e085d3fefd1dbf5ccdbff729931a967" args="() const " -->
+virtual const <a class="el" href="classTiXmlDeclaration.html">TiXmlDeclaration</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDeclaration.html#1e085d3fefd1dbf5ccdbff729931a967">ToDeclaration</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cast to a more defined type. Will return null not of the requested type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6bd3d1daddcaeb9543c24bfd090969ce"></a><!-- doxytag: member="TiXmlDeclaration::ToDeclaration" ref="6bd3d1daddcaeb9543c24bfd090969ce" args="()" -->
+virtual <a class="el" href="classTiXmlDeclaration.html">TiXmlDeclaration</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDeclaration.html#6bd3d1daddcaeb9543c24bfd090969ce">ToDeclaration</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cast to a more defined type. Will return null not of the requested type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="22315a535983b86535cdba3458669e3e"></a><!-- doxytag: member="TiXmlDeclaration::Accept" ref="22315a535983b86535cdba3458669e3e" args="(TiXmlVisitor *visitor) const " -->
+virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDeclaration.html#22315a535983b86535cdba3458669e3e">Accept</a> (<a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a> *visitor) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Walk the XML tree visiting this node and all of its children. <br></td></tr>
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+In correct XML the declaration is the first entry in the file. 
+<p>
+<div class="fragment"><pre class="fragment">		&lt;?xml version="1.0" standalone="yes"?&gt;
+	</pre></div><p>
+TinyXml will happily read or write files without a declaration, however. There are 3 possible attributes to the declaration: version, encoding, and standalone.<p>
+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. 
+<p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="bf6303db4bd05b5be554036817ff1cb4"></a><!-- doxytag: member="TiXmlDeclaration::Print" ref="bf6303db4bd05b5be554036817ff1cb4" args="(FILE *cfile, int depth) const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">virtual void TiXmlDeclaration::Print           </td>
+          <td>(</td>
+          <td class="paramtype">FILE *&nbsp;</td>
+          <td class="paramname"> <em>cfile</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&nbsp;</td>
+          <td class="paramname"> <em>depth</em></td><td>&nbsp;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"> const<code> [inline, virtual]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode. 
+<p>
+) Either or both cfile and str can be null.<p>
+This is a formatted print, and will insert tabs and newlines.<p>
+(For an unformatted stream, use the &lt;&lt; operator.) 
+<p>
+Implements <a class="el" href="classTiXmlBase.html#0de56b3f2ef14c65091a3b916437b512">TiXmlBase</a>.
+</div>
+</div><p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="tinyxml_8h-source.html">tinyxml.h</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
Binary file src/tinyxml/docs/classTiXmlDeclaration.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/classTiXmlDocument-members.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,119 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: Member List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<h1>TiXmlDocument Member List</h1>This is the complete list of members for <a class="el" href="classTiXmlDocument.html">TiXmlDocument</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDocument.html#a545aae325d9752ad64120bc4ecf939a">Accept</a>(TiXmlVisitor *content) const </td><td><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#708e7f953df61d4d2d12f73171550a4b">Clear</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDocument.html#c66b8c28db86363315712a3574e87c35">ClearError</a>()</td><td><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDocument.html#4968661cab4a1f44a23329c6f8db1907">Clone</a>() const </td><td><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td><code> [protected, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#b54bfb9b70fe6dd276e7b279cab7f003">Column</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#6bd8c315c1acb09e34107b8736505948">EncodeString</a>(const TIXML_STRING &amp;str, TIXML_STRING *out)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDocument.html#6dfc01a6e5d58e56acd537dfd3bdeb29">Error</a>() const </td><td><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDocument.html#a90bc630ee5203c6109ca5fad3323649">ErrorCol</a>() const </td><td><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDocument.html#9d0f689f6e09ea494ea547be8d79c25e">ErrorDesc</a>() const </td><td><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDocument.html#f96fc2f3f9ec6422782bfe916c9e778f">ErrorId</a>() const </td><td><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDocument.html#f30efc75e804aa2e92fb8be3a8cb676e">ErrorRow</a>() const </td><td><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#44c8eee26bbe2d1b2762038df9dde2f0">FirstChild</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1f05828d023150706eeb16d6fb3f6355">FirstChild</a>(const char *value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#bc8bf32be6419ec453a731868de19554">FirstChild</a>(const char *_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#07f6200a5956c723c5b52d70f29c46f6">FirstChild</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#10d2669ccb5e29e02fcb0e4408685ef6">FirstChild</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#f4fb652f6bd79ae0d5ce7d0f7d3c0fba">FirstChildElement</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#ccda2c6b45c25bb5a6f9c3407a644e61">FirstChildElement</a>(const char *_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#327ad4bbd90073c5dfc931b07314f5f7">FirstChildElement</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#7f1d7291880534c1e5cdeb392d8c1f45">FirstChildElement</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#80e397fa973cf5323e33b07154b024f3">GetDocument</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#6559a530ca6763fc301a14d77ed28c17">GetUserData</a>()</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#d0120210e4680ef2088601753ce0ede4">GetUserData</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#d9b75e54ec19301c8b4d5ff583d0b3d5">InsertAfterChild</a>(TiXmlNode *afterThis, const TiXmlNode &amp;addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#0c146fa2fff0157b681594102f48cbc7">InsertBeforeChild</a>(TiXmlNode *beforeThis, const TiXmlNode &amp;addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#d7d4630e1a2a916edda16be22448a8ba">InsertEndChild</a>(const TiXmlNode &amp;addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#d4b1472531c647a25b1840a87ae42438">IsWhiteSpaceCondensed</a>()</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#8621196ba3705fa226bef4a761cc51b6">IterateChildren</a>(const TiXmlNode *previous) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#dfaef35a076b9343adc1420757376c39">IterateChildren</a>(const char *value, const TiXmlNode *previous) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1cbaaf8e82c09ad763d52616d75724df">IterateChildren</a>(const std::string &amp;_value, const TiXmlNode *previous) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#16e9ad53e2f5445b14bf325c90aa862c">IterateChildren</a>(const std::string &amp;_value, const TiXmlNode *previous)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#6432d2b2495f6caf9cb4278df706a031">LastChild</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#bad5bf1059c48127b958711ef89e8e5d">LastChild</a>(const char *_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#256d0cdbfcfeccae83f3a1c9747a8b63">LastChild</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#69772c9202f70553f940b15c06b07be3">LastChild</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#5d29442ae46de6d0168429156197bfc6">LinkEndChild</a>(TiXmlNode *addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDocument.html#4c852a889c02cf251117fd1d9fe1845f">LoadFile</a>(TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)</td><td><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDocument.html#879cdf5e981b8b2d2ef82f2546dd28fb">LoadFile</a>(const char *filename, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)</td><td><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDocument.html#41f6fe7200864d1dca663d230caf8db6">LoadFile</a>(FILE *, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)</td><td><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDocument.html#18ae6ed34fed7991ebc220862dfac884">LoadFile</a>(const std::string &amp;filename, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)</td><td><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1b94d2f7fa7ab25a5a8e8d4340c449c9">NextSibling</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1757c1f4d01e8c9596ffdbd561c76aea">NextSibling</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#f854baeba384f5fe9859f5aee03b548e">NextSibling</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#2e61c0b89a77e36a0e8c60490003cb46">NextSibling</a>(const char *) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#73acf929d49d10bd0e5fb3d31b0372d1">NextSiblingElement</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#071ba77fd7ab79402fa84b7e9b8607b3">NextSiblingElement</a>(const char *) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#7572d0af9d1e696ee3f05d8bb5ebb463">NextSiblingElement</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#506958e34406729a4e4c5326ea39d081">NextSiblingElement</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#eed21ad30630ef6e7faf096127edc9f3">NoChildren</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#836eded4920ab9e9ef28496f48cd95a2">NodeType</a> enum name</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#86cd49cfb17a844c0010b3136ac966c7">operator&lt;&lt;</a>(std::ostream &amp;out, const TiXmlNode &amp;base)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#52ef17e7080df2490cf87bde380685ab">operator&lt;&lt;</a>(std::string &amp;out, const TiXmlNode &amp;base)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#b57bd426563c926844f65a78412e18b9">operator&gt;&gt;</a>(std::istream &amp;in, TiXmlNode &amp;base)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#b643043132ffd794f8602685d34a982e">Parent</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDocument.html#17ebabe36926ef398e78dec0d0ad0378">Parse</a>(const char *p, TiXmlParsingData *data=0, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)</td><td><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#c2cd892768726270e511b2ab32de4d10">PreviousSibling</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#5bdd49327eec1e609b7d22af706b8316">PreviousSibling</a>(const char *) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#658276f57d35d5d4256d1dc1a2c398ab">PreviousSibling</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#cc8a0434c7f401d4a3b6dee77c1a5912">PreviousSibling</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDocument.html#f08389ec70ee9b2de7f800e206a18510">Print</a>() const </td><td><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDocument.html#8701fda1fa31b25abbc9c0df42da10e8">Print</a>(FILE *cfile, int depth=0) const </td><td><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#e19d8510efc90596552f4feeac9a8fbf">RemoveChild</a>(TiXmlNode *removeThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#0c49e739a17b9938050c22cd89617fbd">ReplaceChild</a>(TiXmlNode *replaceThis, const TiXmlNode &amp;withThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDocument.html#d09d17927f908f40efb406af2fb873be">RootElement</a>() const </td><td><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#024bceb070188df92c2a8d8852dd0853">Row</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDocument.html#21c0aeb0d0a720169ad4ac89523ebe93">SaveFile</a>() const </td><td><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDocument.html#e869f5ebf7fc54c4a1d737fb4689fd44">SaveFile</a>(const char *filename) const </td><td><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDocument.html#cf1672b4538c6d1d441f9f108aea2bf4">SaveFile</a>(FILE *) const </td><td><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDocument.html#3d4fae0463f3f03679ba0b7cf6f2df52">SaveFile</a>(const std::string &amp;filename) const </td><td><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#0f799ec645bfb8d8a969e83478f379c1">SetCondenseWhiteSpace</a>(bool condense)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDocument.html#51dac56316f89b35bdb7d0d433ba988e">SetTabSize</a>(int _tabsize)</td><td><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#c6b3e0f790930d4970ec30764e937b5d">SetUserData</a>(void *user)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#2a38329ca5d3f28f98ce932b8299ae90">SetValue</a>(const char *_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#2598d5f448042c1abbeae4503dd45ff2">SetValue</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDocument.html#9f5e84335708fde98400230f9f12659c">TiXmlDocument</a>()</td><td><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDocument.html#e4508b452d0c3061db085f3db27b8396">TiXmlDocument</a>(const char *documentName)</td><td><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDocument.html#2c6e58fb99bfa76cc613f16840022225">TiXmlDocument</a>(const std::string &amp;documentName)</td><td><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#a0a5086f9eaee910bbfdc7f975e26574">ToComment</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#383e06a0787f7063953934867990f849">ToComment</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#9f43e6984fc7d4afd6eb32714c6b7b72">ToDeclaration</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#4027136ca820ff4a636b607231b6a6df">ToDeclaration</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDocument.html#1dc977bde3e4fe85a8eb9d88a35ef5a4">ToDocument</a>() const </td><td><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlDocument.html#1025d942a1f328fd742d545e37efdd42">ToDocument</a>()</td><td><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#72abed96dc9667ab9e0a2a275301bb1c">ToElement</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#a65d000223187d22a4dcebd7479e9ebc">ToElement</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#95a46a52c525992d6b4ee08beb14cd69">ToText</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#3ddfbcac78fbea041fad57e5c6d60a03">ToText</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#fd7205cf31d7a376929f8a36930627a2">ToUnknown</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#06de5af852668c7e4af0d09c205f0b0d">ToUnknown</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#57b99d5c97d67a42b9752f5210a1ba5e">Type</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#b242c01590191f644569fa89a080d97c">userData</a></td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#77943eb90d12c2892b1337a9f5918b41">Value</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#6d9e505619d39bf50bfd9609c9169ea5">ValueStr</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+</table><hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/classTiXmlDocument.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,430 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: TiXmlDocument Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<h1>TiXmlDocument Class Reference</h1><!-- doxytag: class="TiXmlDocument" --><!-- doxytag: inherits="TiXmlNode" -->Always the top level node.  
+<a href="#_details">More...</a>
+<p>
+<code>#include &lt;<a class="el" href="tinyxml_8h-source.html">tinyxml.h</a>&gt;</code>
+<p>
+<p>Inheritance diagram for TiXmlDocument:
+<p><center><img src="classTiXmlDocument.png" usemap="#TiXmlDocument_map" border="0" alt=""></center>
+<map name="TiXmlDocument_map">
+<area href="classTiXmlNode.html" alt="TiXmlNode" shape="rect" coords="0,56,99,80">
+<area href="classTiXmlBase.html" alt="TiXmlBase" shape="rect" coords="0,0,99,24">
+</map>
+<a href="classTiXmlDocument-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9f5e84335708fde98400230f9f12659c"></a><!-- doxytag: member="TiXmlDocument::TiXmlDocument" ref="9f5e84335708fde98400230f9f12659c" args="()" -->
+&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#9f5e84335708fde98400230f9f12659c">TiXmlDocument</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create an empty document, that has no name. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e4508b452d0c3061db085f3db27b8396"></a><!-- doxytag: member="TiXmlDocument::TiXmlDocument" ref="e4508b452d0c3061db085f3db27b8396" args="(const char *documentName)" -->
+&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#e4508b452d0c3061db085f3db27b8396">TiXmlDocument</a> (const char *documentName)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a document with a name. The name of the document is also the filename of the xml. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2c6e58fb99bfa76cc613f16840022225"></a><!-- doxytag: member="TiXmlDocument::TiXmlDocument" ref="2c6e58fb99bfa76cc613f16840022225" args="(const std::string &amp;documentName)" -->
+&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#2c6e58fb99bfa76cc613f16840022225">TiXmlDocument</a> (const std::string &amp;documentName)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#4c852a889c02cf251117fd1d9fe1845f">LoadFile</a> (TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Load a file using the current document value.  <a href="#4c852a889c02cf251117fd1d9fe1845f"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="21c0aeb0d0a720169ad4ac89523ebe93"></a><!-- doxytag: member="TiXmlDocument::SaveFile" ref="21c0aeb0d0a720169ad4ac89523ebe93" args="() const " -->
+bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#21c0aeb0d0a720169ad4ac89523ebe93">SaveFile</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Save a file using the current document value. Returns true if successful. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="879cdf5e981b8b2d2ef82f2546dd28fb"></a><!-- doxytag: member="TiXmlDocument::LoadFile" ref="879cdf5e981b8b2d2ef82f2546dd28fb" args="(const char *filename, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)" -->
+bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#879cdf5e981b8b2d2ef82f2546dd28fb">LoadFile</a> (const char *filename, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Load a file using the given filename. Returns true if successful. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e869f5ebf7fc54c4a1d737fb4689fd44"></a><!-- doxytag: member="TiXmlDocument::SaveFile" ref="e869f5ebf7fc54c4a1d737fb4689fd44" args="(const char *filename) const " -->
+bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#e869f5ebf7fc54c4a1d737fb4689fd44">SaveFile</a> (const char *filename) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Save a file using the given filename. Returns true if successful. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#41f6fe7200864d1dca663d230caf8db6">LoadFile</a> (FILE *, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Load a file using the given FILE*.  <a href="#41f6fe7200864d1dca663d230caf8db6"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cf1672b4538c6d1d441f9f108aea2bf4"></a><!-- doxytag: member="TiXmlDocument::SaveFile" ref="cf1672b4538c6d1d441f9f108aea2bf4" args="(FILE *) const " -->
+bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#cf1672b4538c6d1d441f9f108aea2bf4">SaveFile</a> (FILE *) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Save a file using the given FILE*. Returns true if successful. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#18ae6ed34fed7991ebc220862dfac884">LoadFile</a> (const std::string &amp;filename, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)</td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3d4fae0463f3f03679ba0b7cf6f2df52"></a><!-- doxytag: member="TiXmlDocument::SaveFile" ref="3d4fae0463f3f03679ba0b7cf6f2df52" args="(const std::string &amp;filename) const " -->
+bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#3d4fae0463f3f03679ba0b7cf6f2df52">SaveFile</a> (const std::string &amp;filename) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">&lt; STL std::string version. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#17ebabe36926ef398e78dec0d0ad0378">Parse</a> (const char *p, TiXmlParsingData *data=0, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Parse the given null terminated block of xml data.  <a href="#17ebabe36926ef398e78dec0d0ad0378"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classTiXmlElement.html">TiXmlElement</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#d09d17927f908f40efb406af2fb873be">RootElement</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Get the root element -- the only top level element -- of the document.  <a href="#d09d17927f908f40efb406af2fb873be"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#6dfc01a6e5d58e56acd537dfd3bdeb29">Error</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">If an error occurs, Error will be set to true.  <a href="#6dfc01a6e5d58e56acd537dfd3bdeb29"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9d0f689f6e09ea494ea547be8d79c25e"></a><!-- doxytag: member="TiXmlDocument::ErrorDesc" ref="9d0f689f6e09ea494ea547be8d79c25e" args="() const " -->
+const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#9d0f689f6e09ea494ea547be8d79c25e">ErrorDesc</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Contains a textual (english) description of the error if one occurs. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#f96fc2f3f9ec6422782bfe916c9e778f">ErrorId</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Generally, you probably want the error string ( <a class="el" href="classTiXmlDocument.html#9d0f689f6e09ea494ea547be8d79c25e">ErrorDesc()</a> ).  <a href="#f96fc2f3f9ec6422782bfe916c9e778f"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#f30efc75e804aa2e92fb8be3a8cb676e">ErrorRow</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns the location (if known) of the error.  <a href="#f30efc75e804aa2e92fb8be3a8cb676e"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a90bc630ee5203c6109ca5fad3323649"></a><!-- doxytag: member="TiXmlDocument::ErrorCol" ref="a90bc630ee5203c6109ca5fad3323649" args="() const " -->
+int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a90bc630ee5203c6109ca5fad3323649">ErrorCol</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The column where the error occured. See <a class="el" href="classTiXmlDocument.html#f30efc75e804aa2e92fb8be3a8cb676e">ErrorRow()</a>. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#51dac56316f89b35bdb7d0d433ba988e">SetTabSize</a> (int _tabsize)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight"><a class="el" href="classTiXmlDocument.html#51dac56316f89b35bdb7d0d433ba988e">SetTabSize()</a> allows the error reporting functions (<a class="el" href="classTiXmlDocument.html#f30efc75e804aa2e92fb8be3a8cb676e">ErrorRow()</a> and <a class="el" href="classTiXmlDocument.html#a90bc630ee5203c6109ca5fad3323649">ErrorCol()</a>) to report the correct values for row and column.  <a href="#51dac56316f89b35bdb7d0d433ba988e"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#c66b8c28db86363315712a3574e87c35">ClearError</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">If you have handled the error, it can be reset with this call.  <a href="#c66b8c28db86363315712a3574e87c35"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f08389ec70ee9b2de7f800e206a18510"></a><!-- doxytag: member="TiXmlDocument::Print" ref="f08389ec70ee9b2de7f800e206a18510" args="() const " -->
+void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#f08389ec70ee9b2de7f800e206a18510">Print</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Write the document to standard out using formatted printing ("pretty print"). <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8701fda1fa31b25abbc9c0df42da10e8"></a><!-- doxytag: member="TiXmlDocument::Print" ref="8701fda1fa31b25abbc9c0df42da10e8" args="(FILE *cfile, int depth=0) const " -->
+virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#8701fda1fa31b25abbc9c0df42da10e8">Print</a> (FILE *cfile, int depth=0) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Print this Document to a FILE stream. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1dc977bde3e4fe85a8eb9d88a35ef5a4"></a><!-- doxytag: member="TiXmlDocument::ToDocument" ref="1dc977bde3e4fe85a8eb9d88a35ef5a4" args="() const " -->
+virtual const <a class="el" href="classTiXmlDocument.html">TiXmlDocument</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#1dc977bde3e4fe85a8eb9d88a35ef5a4">ToDocument</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cast to a more defined type. Will return null not of the requested type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1025d942a1f328fd742d545e37efdd42"></a><!-- doxytag: member="TiXmlDocument::ToDocument" ref="1025d942a1f328fd742d545e37efdd42" args="()" -->
+virtual <a class="el" href="classTiXmlDocument.html">TiXmlDocument</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#1025d942a1f328fd742d545e37efdd42">ToDocument</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cast to a more defined type. Will return null not of the requested type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a545aae325d9752ad64120bc4ecf939a"></a><!-- doxytag: member="TiXmlDocument::Accept" ref="a545aae325d9752ad64120bc4ecf939a" args="(TiXmlVisitor *content) const " -->
+virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#a545aae325d9752ad64120bc4ecf939a">Accept</a> (<a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a> *content) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Walk the XML tree visiting this node and all of its children. <br></td></tr>
+<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlDocument.html#4968661cab4a1f44a23329c6f8db1907">Clone</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create an exact duplicate of this node and return it.  <a href="#4968661cab4a1f44a23329c6f8db1907"></a><br></td></tr>
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+Always the top level node. 
+<p>
+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. 
+<p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="c66b8c28db86363315712a3574e87c35"></a><!-- doxytag: member="TiXmlDocument::ClearError" ref="c66b8c28db86363315712a3574e87c35" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void TiXmlDocument::ClearError           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+If you have handled the error, it can be reset with this call. 
+<p>
+The error state is automatically cleared if you Parse a new XML block. 
+</div>
+</div><p>
+<a class="anchor" name="4968661cab4a1f44a23329c6f8db1907"></a><!-- doxytag: member="TiXmlDocument::Clone" ref="4968661cab4a1f44a23329c6f8db1907" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">virtual <a class="el" href="classTiXmlNode.html">TiXmlNode</a>* TiXmlDocument::Clone           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const<code> [protected, virtual]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Create an exact duplicate of this node and return it. 
+<p>
+The memory must be deleted by the caller. 
+<p>
+Implements <a class="el" href="classTiXmlNode.html#4508cc3a2d7a98e96a54cc09c37a78a4">TiXmlNode</a>.
+</div>
+</div><p>
+<a class="anchor" name="6dfc01a6e5d58e56acd537dfd3bdeb29"></a><!-- doxytag: member="TiXmlDocument::Error" ref="6dfc01a6e5d58e56acd537dfd3bdeb29" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool TiXmlDocument::Error           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const<code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+If an error occurs, Error will be set to true. 
+<p>
+Also,<ul>
+<li>The <a class="el" href="classTiXmlDocument.html#f96fc2f3f9ec6422782bfe916c9e778f">ErrorId()</a> will contain the integer identifier of the error (not generally useful)</li><li>The <a class="el" href="classTiXmlDocument.html#9d0f689f6e09ea494ea547be8d79c25e">ErrorDesc()</a> method will return the name of the error. (very useful)</li><li>The <a class="el" href="classTiXmlDocument.html#f30efc75e804aa2e92fb8be3a8cb676e">ErrorRow()</a> and <a class="el" href="classTiXmlDocument.html#a90bc630ee5203c6109ca5fad3323649">ErrorCol()</a> will return the location of the error (if known) </li></ul>
+
+</div>
+</div><p>
+<a class="anchor" name="f96fc2f3f9ec6422782bfe916c9e778f"></a><!-- doxytag: member="TiXmlDocument::ErrorId" ref="f96fc2f3f9ec6422782bfe916c9e778f" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int TiXmlDocument::ErrorId           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const<code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Generally, you probably want the error string ( <a class="el" href="classTiXmlDocument.html#9d0f689f6e09ea494ea547be8d79c25e">ErrorDesc()</a> ). 
+<p>
+But if you prefer the ErrorId, this function will fetch it. 
+</div>
+</div><p>
+<a class="anchor" name="f30efc75e804aa2e92fb8be3a8cb676e"></a><!-- doxytag: member="TiXmlDocument::ErrorRow" ref="f30efc75e804aa2e92fb8be3a8cb676e" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int TiXmlDocument::ErrorRow           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const<code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Returns the location (if known) of the error. 
+<p>
+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.)<p>
+<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="classTiXmlDocument.html#51dac56316f89b35bdb7d0d433ba988e">SetTabSize</a>, <a class="el" href="classTiXmlBase.html#024bceb070188df92c2a8d8852dd0853">Row</a>, <a class="el" href="classTiXmlBase.html#b54bfb9b70fe6dd276e7b279cab7f003">Column</a> </dd></dl>
+
+</div>
+</div><p>
+<a class="anchor" name="18ae6ed34fed7991ebc220862dfac884"></a><!-- doxytag: member="TiXmlDocument::LoadFile" ref="18ae6ed34fed7991ebc220862dfac884" args="(const std::string &amp;filename, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool TiXmlDocument::LoadFile           </td>
+          <td>(</td>
+          <td class="paramtype">const std::string &amp;&nbsp;</td>
+          <td class="paramname"> <em>filename</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">TiXmlEncoding&nbsp;</td>
+          <td class="paramname"> <em>encoding</em> = <code>TIXML_DEFAULT_ENCODING</code></td><td>&nbsp;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+<dl compact><dt><b>Parameters: </b></dt><dd>
+<table border="0" cellspacing="2" cellpadding="0">
+<tr><td valign="top"><em>encoding</em>&nbsp;</td><td>
+STL std::string version. </td></tr>
+</table>
+</dl>
+</div>
+</div><p>
+<a class="anchor" name="41f6fe7200864d1dca663d230caf8db6"></a><!-- doxytag: member="TiXmlDocument::LoadFile" ref="41f6fe7200864d1dca663d230caf8db6" args="(FILE *, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool TiXmlDocument::LoadFile           </td>
+          <td>(</td>
+          <td class="paramtype">FILE *&nbsp;</td>
+          <td class="paramname">, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">TiXmlEncoding&nbsp;</td>
+          <td class="paramname"> <em>encoding</em> = <code>TIXML_DEFAULT_ENCODING</code></td><td>&nbsp;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Load a file using the given FILE*. 
+<p>
+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. 
+</div>
+</div><p>
+<a class="anchor" name="4c852a889c02cf251117fd1d9fe1845f"></a><!-- doxytag: member="TiXmlDocument::LoadFile" ref="4c852a889c02cf251117fd1d9fe1845f" args="(TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">bool TiXmlDocument::LoadFile           </td>
+          <td>(</td>
+          <td class="paramtype">TiXmlEncoding&nbsp;</td>
+          <td class="paramname"> <em>encoding</em> = <code>TIXML_DEFAULT_ENCODING</code>          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Load a file using the current document value. 
+<p>
+Returns true if successful. Will delete any existing document data before loading. 
+</div>
+</div><p>
+<a class="anchor" name="17ebabe36926ef398e78dec0d0ad0378"></a><!-- doxytag: member="TiXmlDocument::Parse" ref="17ebabe36926ef398e78dec0d0ad0378" args="(const char *p, TiXmlParsingData *data=0, TiXmlEncoding encoding=TIXML_DEFAULT_ENCODING)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">virtual const char* TiXmlDocument::Parse           </td>
+          <td>(</td>
+          <td class="paramtype">const char *&nbsp;</td>
+          <td class="paramname"> <em>p</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">TiXmlParsingData *&nbsp;</td>
+          <td class="paramname"> <em>data</em> = <code>0</code>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">TiXmlEncoding&nbsp;</td>
+          <td class="paramname"> <em>encoding</em> = <code>TIXML_DEFAULT_ENCODING</code></td><td>&nbsp;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"><code> [virtual]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Parse the given null terminated block of xml data. 
+<p>
+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. 
+<p>
+Implements <a class="el" href="classTiXmlBase.html">TiXmlBase</a>.
+</div>
+</div><p>
+<a class="anchor" name="d09d17927f908f40efb406af2fb873be"></a><!-- doxytag: member="TiXmlDocument::RootElement" ref="d09d17927f908f40efb406af2fb873be" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const <a class="el" href="classTiXmlElement.html">TiXmlElement</a>* TiXmlDocument::RootElement           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const<code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Get the root element -- the only top level element -- of the document. 
+<p>
+In well formed XML, there should only be one. TinyXml is tolerant of multiple elements at the document level. 
+</div>
+</div><p>
+<a class="anchor" name="51dac56316f89b35bdb7d0d433ba988e"></a><!-- doxytag: member="TiXmlDocument::SetTabSize" ref="51dac56316f89b35bdb7d0d433ba988e" args="(int _tabsize)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void TiXmlDocument::SetTabSize           </td>
+          <td>(</td>
+          <td class="paramtype">int&nbsp;</td>
+          <td class="paramname"> <em>_tabsize</em>          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+<a class="el" href="classTiXmlDocument.html#51dac56316f89b35bdb7d0d433ba988e">SetTabSize()</a> allows the error reporting functions (<a class="el" href="classTiXmlDocument.html#f30efc75e804aa2e92fb8be3a8cb676e">ErrorRow()</a> and <a class="el" href="classTiXmlDocument.html#a90bc630ee5203c6109ca5fad3323649">ErrorCol()</a>) to report the correct values for row and column. 
+<p>
+It does not change the output or input in any way.<p>
+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.<p>
+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.<p>
+Note that row and column tracking is not supported when using operator&gt;&gt;.<p>
+The tab size needs to be enabled before the parse or load. Correct usage: <div class="fragment"><pre class="fragment">		TiXmlDocument doc;
+		doc.SetTabSize( 8 );
+		doc.Load( "myfile.xml" );
+		</pre></div><p>
+<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="classTiXmlBase.html#024bceb070188df92c2a8d8852dd0853">Row</a>, <a class="el" href="classTiXmlBase.html#b54bfb9b70fe6dd276e7b279cab7f003">Column</a> </dd></dl>
+
+</div>
+</div><p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="tinyxml_8h-source.html">tinyxml.h</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
Binary file src/tinyxml/docs/classTiXmlDocument.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/classTiXmlElement-members.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,116 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: Member List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<h1>TiXmlElement Member List</h1>This is the complete list of members for <a class="el" href="classTiXmlElement.html">TiXmlElement</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#71a81b2afb0d42be1543d1c404dee6f5">Accept</a>(TiXmlVisitor *visitor) const </td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#e419a442a9701a62b0c3d8fd1cbdd12d">Attribute</a>(const char *name) const </td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#0ed8348fdc56b72a6b4900ce5bac1849">Attribute</a>(const char *name, int *i) const </td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#eaff99d4f0ea5b34f7aee202aad457ba">Attribute</a>(const char *name, double *d) const </td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#708e7f953df61d4d2d12f73171550a4b">Clear</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#a464535ea1994db337cb6a8ce4b588b5">Clone</a>() const </td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#b54bfb9b70fe6dd276e7b279cab7f003">Column</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#6bd8c315c1acb09e34107b8736505948">EncodeString</a>(const TIXML_STRING &amp;str, TIXML_STRING *out)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#516054c9073647d6cb29b6abe9fa0592">FirstAttribute</a>() const </td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#44c8eee26bbe2d1b2762038df9dde2f0">FirstChild</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1f05828d023150706eeb16d6fb3f6355">FirstChild</a>(const char *value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#bc8bf32be6419ec453a731868de19554">FirstChild</a>(const char *_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#07f6200a5956c723c5b52d70f29c46f6">FirstChild</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#10d2669ccb5e29e02fcb0e4408685ef6">FirstChild</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#f4fb652f6bd79ae0d5ce7d0f7d3c0fba">FirstChildElement</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#ccda2c6b45c25bb5a6f9c3407a644e61">FirstChildElement</a>(const char *_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#327ad4bbd90073c5dfc931b07314f5f7">FirstChildElement</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#7f1d7291880534c1e5cdeb392d8c1f45">FirstChildElement</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#80e397fa973cf5323e33b07154b024f3">GetDocument</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#f3282294986cdb216646ea1f67af2c87">GetText</a>() const </td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#6559a530ca6763fc301a14d77ed28c17">GetUserData</a>()</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#d0120210e4680ef2088601753ce0ede4">GetUserData</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#d9b75e54ec19301c8b4d5ff583d0b3d5">InsertAfterChild</a>(TiXmlNode *afterThis, const TiXmlNode &amp;addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#0c146fa2fff0157b681594102f48cbc7">InsertBeforeChild</a>(TiXmlNode *beforeThis, const TiXmlNode &amp;addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#d7d4630e1a2a916edda16be22448a8ba">InsertEndChild</a>(const TiXmlNode &amp;addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#d4b1472531c647a25b1840a87ae42438">IsWhiteSpaceCondensed</a>()</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#8621196ba3705fa226bef4a761cc51b6">IterateChildren</a>(const TiXmlNode *previous) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#dfaef35a076b9343adc1420757376c39">IterateChildren</a>(const char *value, const TiXmlNode *previous) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1cbaaf8e82c09ad763d52616d75724df">IterateChildren</a>(const std::string &amp;_value, const TiXmlNode *previous) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#16e9ad53e2f5445b14bf325c90aa862c">IterateChildren</a>(const std::string &amp;_value, const TiXmlNode *previous)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#86191b49f9177be132b85b14655f1381">LastAttribute</a>() const </td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#6432d2b2495f6caf9cb4278df706a031">LastChild</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#bad5bf1059c48127b958711ef89e8e5d">LastChild</a>(const char *_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#256d0cdbfcfeccae83f3a1c9747a8b63">LastChild</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#69772c9202f70553f940b15c06b07be3">LastChild</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#5d29442ae46de6d0168429156197bfc6">LinkEndChild</a>(TiXmlNode *addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1b94d2f7fa7ab25a5a8e8d4340c449c9">NextSibling</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1757c1f4d01e8c9596ffdbd561c76aea">NextSibling</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#f854baeba384f5fe9859f5aee03b548e">NextSibling</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#2e61c0b89a77e36a0e8c60490003cb46">NextSibling</a>(const char *) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#73acf929d49d10bd0e5fb3d31b0372d1">NextSiblingElement</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#071ba77fd7ab79402fa84b7e9b8607b3">NextSiblingElement</a>(const char *) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#7572d0af9d1e696ee3f05d8bb5ebb463">NextSiblingElement</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#506958e34406729a4e4c5326ea39d081">NextSiblingElement</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#eed21ad30630ef6e7faf096127edc9f3">NoChildren</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#836eded4920ab9e9ef28496f48cd95a2">NodeType</a> enum name</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#86cd49cfb17a844c0010b3136ac966c7">operator&lt;&lt;</a>(std::ostream &amp;out, const TiXmlNode &amp;base)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#52ef17e7080df2490cf87bde380685ab">operator&lt;&lt;</a>(std::string &amp;out, const TiXmlNode &amp;base)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#b57bd426563c926844f65a78412e18b9">operator&gt;&gt;</a>(std::istream &amp;in, TiXmlNode &amp;base)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#b643043132ffd794f8602685d34a982e">Parent</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#c2cd892768726270e511b2ab32de4d10">PreviousSibling</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#5bdd49327eec1e609b7d22af706b8316">PreviousSibling</a>(const char *) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#658276f57d35d5d4256d1dc1a2c398ab">PreviousSibling</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#cc8a0434c7f401d4a3b6dee77c1a5912">PreviousSibling</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#fbf52736e70fc91ec9d760721d6f4fd2">Print</a>(FILE *cfile, int depth) const </td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#898d7730ecc341f0bffc7a9dadbf1ce7">QueryDoubleAttribute</a>(const char *name, double *_value) const </td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#a04d3af11601ef5a5f88295203a843be">QueryFloatAttribute</a>(const char *name, float *_value) const </td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#ea0bfe471380f281c5945770ddbf52b9">QueryIntAttribute</a>(const char *name, int *_value) const </td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#e3b9a03b0a56663a40801c7256683576">QueryValueAttribute</a>(const std::string &amp;name, T *outValue) const </td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#56979767deca794376b1dfa69a525b2a">RemoveAttribute</a>(const char *name)</td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#1afa6aea716511326a608e4c05df4f3a">RemoveAttribute</a>(const std::string &amp;name)</td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#e19d8510efc90596552f4feeac9a8fbf">RemoveChild</a>(TiXmlNode *removeThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#0c49e739a17b9938050c22cd89617fbd">ReplaceChild</a>(TiXmlNode *replaceThis, const TiXmlNode &amp;withThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#024bceb070188df92c2a8d8852dd0853">Row</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#bf0b3bd7f0e4c746a89ec6e7f101fc32">SetAttribute</a>(const char *name, const char *_value)</td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#80ed65b1d194c71c6c9986ae42337d7d">SetAttribute</a>(const std::string &amp;name, const std::string &amp;_value)</td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#ce6f4be75e373726d4774073d666d1a7">SetAttribute</a>(const char *name, int value)</td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#0f799ec645bfb8d8a969e83478f379c1">SetCondenseWhiteSpace</a>(bool condense)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#0d1dd975d75496778177e35abfe0ec0b">SetDoubleAttribute</a>(const char *name, double value)</td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#c6b3e0f790930d4970ec30764e937b5d">SetUserData</a>(void *user)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#2a38329ca5d3f28f98ce932b8299ae90">SetValue</a>(const char *_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#2598d5f448042c1abbeae4503dd45ff2">SetValue</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#01bc3ab372d35da08efcbbe65ad90c60">TiXmlElement</a>(const char *in_value)</td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#40fc2e3c1a955e2f78e1a32350d180e7">TiXmlElement</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#a0a5086f9eaee910bbfdc7f975e26574">ToComment</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#383e06a0787f7063953934867990f849">ToComment</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#9f43e6984fc7d4afd6eb32714c6b7b72">ToDeclaration</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#4027136ca820ff4a636b607231b6a6df">ToDeclaration</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#8a4cda4b15c29f64cff419309aebed08">ToDocument</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#6a4c8ac28ee7a745d059db6691e03bae">ToDocument</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#c5b8d0e25fa23fd9acbb6d146082901c">ToElement</a>() const </td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlElement.html#9def86337ea7a755eb41cac980f60c7a">ToElement</a>()</td><td><a class="el" href="classTiXmlElement.html">TiXmlElement</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#95a46a52c525992d6b4ee08beb14cd69">ToText</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#3ddfbcac78fbea041fad57e5c6d60a03">ToText</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#fd7205cf31d7a376929f8a36930627a2">ToUnknown</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#06de5af852668c7e4af0d09c205f0b0d">ToUnknown</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#57b99d5c97d67a42b9752f5210a1ba5e">Type</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#b242c01590191f644569fa89a080d97c">userData</a></td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#77943eb90d12c2892b1337a9f5918b41">Value</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#6d9e505619d39bf50bfd9609c9169ea5">ValueStr</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+</table><hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/classTiXmlElement.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,420 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: TiXmlElement Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<h1>TiXmlElement Class Reference</h1><!-- doxytag: class="TiXmlElement" --><!-- doxytag: inherits="TiXmlNode" -->The element is a container class.  
+<a href="#_details">More...</a>
+<p>
+<code>#include &lt;<a class="el" href="tinyxml_8h-source.html">tinyxml.h</a>&gt;</code>
+<p>
+<p>Inheritance diagram for TiXmlElement:
+<p><center><img src="classTiXmlElement.png" usemap="#TiXmlElement_map" border="0" alt=""></center>
+<map name="TiXmlElement_map">
+<area href="classTiXmlNode.html" alt="TiXmlNode" shape="rect" coords="0,56,87,80">
+<area href="classTiXmlBase.html" alt="TiXmlBase" shape="rect" coords="0,0,87,24">
+</map>
+<a href="classTiXmlElement-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="01bc3ab372d35da08efcbbe65ad90c60"></a><!-- doxytag: member="TiXmlElement::TiXmlElement" ref="01bc3ab372d35da08efcbbe65ad90c60" args="(const char *in_value)" -->
+&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#01bc3ab372d35da08efcbbe65ad90c60">TiXmlElement</a> (const char *in_value)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Construct an element. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="40fc2e3c1a955e2f78e1a32350d180e7"></a><!-- doxytag: member="TiXmlElement::TiXmlElement" ref="40fc2e3c1a955e2f78e1a32350d180e7" args="(const std::string &amp;_value)" -->
+&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#40fc2e3c1a955e2f78e1a32350d180e7">TiXmlElement</a> (const std::string &amp;_value)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">std::string constructor. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e419a442a9701a62b0c3d8fd1cbdd12d"></a><!-- doxytag: member="TiXmlElement::Attribute" ref="e419a442a9701a62b0c3d8fd1cbdd12d" args="(const char *name) const " -->
+const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#e419a442a9701a62b0c3d8fd1cbdd12d">Attribute</a> (const char *name) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Given an attribute name, <a class="el" href="classTiXmlElement.html#e419a442a9701a62b0c3d8fd1cbdd12d">Attribute()</a> returns the value for the attribute of that name, or null if none exists. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#0ed8348fdc56b72a6b4900ce5bac1849">Attribute</a> (const char *name, int *i) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Given an attribute name, <a class="el" href="classTiXmlElement.html#e419a442a9701a62b0c3d8fd1cbdd12d">Attribute()</a> returns the value for the attribute of that name, or null if none exists.  <a href="#0ed8348fdc56b72a6b4900ce5bac1849"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#eaff99d4f0ea5b34f7aee202aad457ba">Attribute</a> (const char *name, double *d) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Given an attribute name, <a class="el" href="classTiXmlElement.html#e419a442a9701a62b0c3d8fd1cbdd12d">Attribute()</a> returns the value for the attribute of that name, or null if none exists.  <a href="#eaff99d4f0ea5b34f7aee202aad457ba"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#ea0bfe471380f281c5945770ddbf52b9">QueryIntAttribute</a> (const char *name, int *_value) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">QueryIntAttribute examines the attribute - it is an alternative to the <a class="el" href="classTiXmlElement.html#e419a442a9701a62b0c3d8fd1cbdd12d">Attribute()</a> method with richer error checking.  <a href="#ea0bfe471380f281c5945770ddbf52b9"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="898d7730ecc341f0bffc7a9dadbf1ce7"></a><!-- doxytag: member="TiXmlElement::QueryDoubleAttribute" ref="898d7730ecc341f0bffc7a9dadbf1ce7" args="(const char *name, double *_value) const " -->
+int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#898d7730ecc341f0bffc7a9dadbf1ce7">QueryDoubleAttribute</a> (const char *name, double *_value) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">QueryDoubleAttribute examines the attribute - see <a class="el" href="classTiXmlElement.html#ea0bfe471380f281c5945770ddbf52b9">QueryIntAttribute()</a>. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a04d3af11601ef5a5f88295203a843be"></a><!-- doxytag: member="TiXmlElement::QueryFloatAttribute" ref="a04d3af11601ef5a5f88295203a843be" args="(const char *name, float *_value) const " -->
+int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#a04d3af11601ef5a5f88295203a843be">QueryFloatAttribute</a> (const char *name, float *_value) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">QueryFloatAttribute examines the attribute - see <a class="el" href="classTiXmlElement.html#ea0bfe471380f281c5945770ddbf52b9">QueryIntAttribute()</a>. <br></td></tr>
+<tr><td class="memTemplParams" nowrap colspan="2">template&lt;typename T&gt; </td></tr>
+<tr><td class="memTemplItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memTemplItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#e3b9a03b0a56663a40801c7256683576">QueryValueAttribute</a> (const std::string &amp;name, T *outValue) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Template form of the attribute query which will try to read the attribute into the specified type.  <a href="#e3b9a03b0a56663a40801c7256683576"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#bf0b3bd7f0e4c746a89ec6e7f101fc32">SetAttribute</a> (const char *name, const char *_value)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets an attribute of name to a given value.  <a href="#bf0b3bd7f0e4c746a89ec6e7f101fc32"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="80ed65b1d194c71c6c9986ae42337d7d"></a><!-- doxytag: member="TiXmlElement::SetAttribute" ref="80ed65b1d194c71c6c9986ae42337d7d" args="(const std::string &amp;name, const std::string &amp;_value)" -->
+void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#80ed65b1d194c71c6c9986ae42337d7d">SetAttribute</a> (const std::string &amp;name, const std::string &amp;_value)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">STL std::string form. STL std::string form. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#ce6f4be75e373726d4774073d666d1a7">SetAttribute</a> (const char *name, int value)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets an attribute of name to a given value.  <a href="#ce6f4be75e373726d4774073d666d1a7"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#0d1dd975d75496778177e35abfe0ec0b">SetDoubleAttribute</a> (const char *name, double value)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Sets an attribute of name to a given value.  <a href="#0d1dd975d75496778177e35abfe0ec0b"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="56979767deca794376b1dfa69a525b2a"></a><!-- doxytag: member="TiXmlElement::RemoveAttribute" ref="56979767deca794376b1dfa69a525b2a" args="(const char *name)" -->
+void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#56979767deca794376b1dfa69a525b2a">RemoveAttribute</a> (const char *name)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Deletes an attribute with the given name. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1afa6aea716511326a608e4c05df4f3a"></a><!-- doxytag: member="TiXmlElement::RemoveAttribute" ref="1afa6aea716511326a608e4c05df4f3a" args="(const std::string &amp;name)" -->
+void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#1afa6aea716511326a608e4c05df4f3a">RemoveAttribute</a> (const std::string &amp;name)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">STL std::string form. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="516054c9073647d6cb29b6abe9fa0592"></a><!-- doxytag: member="TiXmlElement::FirstAttribute" ref="516054c9073647d6cb29b6abe9fa0592" args="() const " -->
+const <a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#516054c9073647d6cb29b6abe9fa0592">FirstAttribute</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Access the first attribute in this element. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="86191b49f9177be132b85b14655f1381"></a><!-- doxytag: member="TiXmlElement::LastAttribute" ref="86191b49f9177be132b85b14655f1381" args="() const " -->
+const <a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#86191b49f9177be132b85b14655f1381">LastAttribute</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Access the last attribute in this element. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#f3282294986cdb216646ea1f67af2c87">GetText</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function for easy access to the text inside an element.  <a href="#f3282294986cdb216646ea1f67af2c87"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a464535ea1994db337cb6a8ce4b588b5"></a><!-- doxytag: member="TiXmlElement::Clone" ref="a464535ea1994db337cb6a8ce4b588b5" args="() const " -->
+virtual <a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#a464535ea1994db337cb6a8ce4b588b5">Clone</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a new Element and returns it - the returned element is a copy. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#fbf52736e70fc91ec9d760721d6f4fd2">Print</a> (FILE *cfile, int depth) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode.  <a href="#fbf52736e70fc91ec9d760721d6f4fd2"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c5b8d0e25fa23fd9acbb6d146082901c"></a><!-- doxytag: member="TiXmlElement::ToElement" ref="c5b8d0e25fa23fd9acbb6d146082901c" args="() const " -->
+virtual const <a class="el" href="classTiXmlElement.html">TiXmlElement</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#c5b8d0e25fa23fd9acbb6d146082901c">ToElement</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cast to a more defined type. Will return null not of the requested type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9def86337ea7a755eb41cac980f60c7a"></a><!-- doxytag: member="TiXmlElement::ToElement" ref="9def86337ea7a755eb41cac980f60c7a" args="()" -->
+virtual <a class="el" href="classTiXmlElement.html">TiXmlElement</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#9def86337ea7a755eb41cac980f60c7a">ToElement</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cast to a more defined type. Will return null not of the requested type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="71a81b2afb0d42be1543d1c404dee6f5"></a><!-- doxytag: member="TiXmlElement::Accept" ref="71a81b2afb0d42be1543d1c404dee6f5" args="(TiXmlVisitor *visitor) const " -->
+virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlElement.html#71a81b2afb0d42be1543d1c404dee6f5">Accept</a> (<a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a> *visitor) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Walk the XML tree visiting this node and all of its children. <br></td></tr>
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+The element is a container class. 
+<p>
+It has a value, the element name, and can contain other elements, text, comments, and unknowns. Elements also contain an arbitrary number of attributes. 
+<p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="eaff99d4f0ea5b34f7aee202aad457ba"></a><!-- doxytag: member="TiXmlElement::Attribute" ref="eaff99d4f0ea5b34f7aee202aad457ba" args="(const char *name, double *d) const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* TiXmlElement::Attribute           </td>
+          <td>(</td>
+          <td class="paramtype">const char *&nbsp;</td>
+          <td class="paramname"> <em>name</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">double *&nbsp;</td>
+          <td class="paramname"> <em>d</em></td><td>&nbsp;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"> const</td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Given an attribute name, <a class="el" href="classTiXmlElement.html#e419a442a9701a62b0c3d8fd1cbdd12d">Attribute()</a> returns the value for the attribute of that name, or null if none exists. 
+<p>
+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. 
+</div>
+</div><p>
+<a class="anchor" name="0ed8348fdc56b72a6b4900ce5bac1849"></a><!-- doxytag: member="TiXmlElement::Attribute" ref="0ed8348fdc56b72a6b4900ce5bac1849" args="(const char *name, int *i) const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* TiXmlElement::Attribute           </td>
+          <td>(</td>
+          <td class="paramtype">const char *&nbsp;</td>
+          <td class="paramname"> <em>name</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int *&nbsp;</td>
+          <td class="paramname"> <em>i</em></td><td>&nbsp;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"> const</td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Given an attribute name, <a class="el" href="classTiXmlElement.html#e419a442a9701a62b0c3d8fd1cbdd12d">Attribute()</a> returns the value for the attribute of that name, or null if none exists. 
+<p>
+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. 
+</div>
+</div><p>
+<a class="anchor" name="f3282294986cdb216646ea1f67af2c87"></a><!-- doxytag: member="TiXmlElement::GetText" ref="f3282294986cdb216646ea1f67af2c87" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* TiXmlElement::GetText           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const</td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Convenience function for easy access to the text inside an element. 
+<p>
+Although easy and concise, <a class="el" href="classTiXmlElement.html#f3282294986cdb216646ea1f67af2c87">GetText()</a> is limited compared to getting the <a class="el" href="classTiXmlText.html">TiXmlText</a> child and accessing it directly.<p>
+If the first child of 'this' is a <a class="el" href="classTiXmlText.html">TiXmlText</a>, the <a class="el" href="classTiXmlElement.html#f3282294986cdb216646ea1f67af2c87">GetText()</a> returns the character string of the Text node, else null is returned.<p>
+This is a convenient method for getting the text of simple contained text: <div class="fragment"><pre class="fragment">		&lt;foo&gt;This is text&lt;/foo&gt;
+		const char* str = fooElement-&gt;GetText();
+		</pre></div><p>
+'str' will be a pointer to "This is text".<p>
+Note that this function can be misleading. If the element foo was created from this XML: <div class="fragment"><pre class="fragment">		&lt;foo&gt;&lt;b&gt;This is text&lt;/b&gt;&lt;/foo&gt; 
+		</pre></div><p>
+then the value of str would be null. The first child node isn't a text node, it is another element. From this XML: <div class="fragment"><pre class="fragment">		&lt;foo&gt;This is &lt;b&gt;text&lt;/b&gt;&lt;/foo&gt; 
+		</pre></div> <a class="el" href="classTiXmlElement.html#f3282294986cdb216646ea1f67af2c87">GetText()</a> will return "This is ".<p>
+WARNING: <a class="el" href="classTiXmlElement.html#f3282294986cdb216646ea1f67af2c87">GetText()</a> accesses a child node - don't become confused with the similarly named <a class="el" href="classTiXmlHandle.html#9fc739c8a18d160006f82572fc143d13">TiXmlHandle::Text()</a> and <a class="el" href="classTiXmlNode.html#3ddfbcac78fbea041fad57e5c6d60a03">TiXmlNode::ToText()</a> which are safe type casts on the referenced node. 
+</div>
+</div><p>
+<a class="anchor" name="fbf52736e70fc91ec9d760721d6f4fd2"></a><!-- doxytag: member="TiXmlElement::Print" ref="fbf52736e70fc91ec9d760721d6f4fd2" args="(FILE *cfile, int depth) const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">virtual void TiXmlElement::Print           </td>
+          <td>(</td>
+          <td class="paramtype">FILE *&nbsp;</td>
+          <td class="paramname"> <em>cfile</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&nbsp;</td>
+          <td class="paramname"> <em>depth</em></td><td>&nbsp;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"> const<code> [virtual]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode. 
+<p>
+) Either or both cfile and str can be null.<p>
+This is a formatted print, and will insert tabs and newlines.<p>
+(For an unformatted stream, use the &lt;&lt; operator.) 
+<p>
+Implements <a class="el" href="classTiXmlBase.html#0de56b3f2ef14c65091a3b916437b512">TiXmlBase</a>.
+</div>
+</div><p>
+<a class="anchor" name="ea0bfe471380f281c5945770ddbf52b9"></a><!-- doxytag: member="TiXmlElement::QueryIntAttribute" ref="ea0bfe471380f281c5945770ddbf52b9" args="(const char *name, int *_value) const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int TiXmlElement::QueryIntAttribute           </td>
+          <td>(</td>
+          <td class="paramtype">const char *&nbsp;</td>
+          <td class="paramname"> <em>name</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int *&nbsp;</td>
+          <td class="paramname"> <em>_value</em></td><td>&nbsp;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"> const</td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+QueryIntAttribute examines the attribute - it is an alternative to the <a class="el" href="classTiXmlElement.html#e419a442a9701a62b0c3d8fd1cbdd12d">Attribute()</a> method with richer error checking. 
+<p>
+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. 
+</div>
+</div><p>
+<a class="anchor" name="e3b9a03b0a56663a40801c7256683576"></a><!-- doxytag: member="TiXmlElement::QueryValueAttribute" ref="e3b9a03b0a56663a40801c7256683576" args="(const std::string &amp;name, T *outValue) const " -->
+<div class="memitem">
+<div class="memproto">
+<div class="memtemplate">
+template&lt;typename T&gt; </div>
+      <table class="memname">
+        <tr>
+          <td class="memname">int TiXmlElement::QueryValueAttribute           </td>
+          <td>(</td>
+          <td class="paramtype">const std::string &amp;&nbsp;</td>
+          <td class="paramname"> <em>name</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">T *&nbsp;</td>
+          <td class="paramname"> <em>outValue</em></td><td>&nbsp;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"> const<code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Template form of the attribute query which will try to read the attribute into the specified type. 
+<p>
+Very easy, very powerful, but be careful to make sure to call this with the correct type.<p>
+NOTE: This method doesn't work correctly for 'string' types.<p>
+<dl compact><dt><b>Returns:</b></dt><dd>TIXML_SUCCESS, TIXML_WRONG_TYPE, or TIXML_NO_ATTRIBUTE </dd></dl>
+
+</div>
+</div><p>
+<a class="anchor" name="ce6f4be75e373726d4774073d666d1a7"></a><!-- doxytag: member="TiXmlElement::SetAttribute" ref="ce6f4be75e373726d4774073d666d1a7" args="(const char *name, int value)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void TiXmlElement::SetAttribute           </td>
+          <td>(</td>
+          <td class="paramtype">const char *&nbsp;</td>
+          <td class="paramname"> <em>name</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&nbsp;</td>
+          <td class="paramname"> <em>value</em></td><td>&nbsp;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Sets an attribute of name to a given value. 
+<p>
+The attribute will be created if it does not exist, or changed if it does. 
+</div>
+</div><p>
+<a class="anchor" name="bf0b3bd7f0e4c746a89ec6e7f101fc32"></a><!-- doxytag: member="TiXmlElement::SetAttribute" ref="bf0b3bd7f0e4c746a89ec6e7f101fc32" args="(const char *name, const char *_value)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void TiXmlElement::SetAttribute           </td>
+          <td>(</td>
+          <td class="paramtype">const char *&nbsp;</td>
+          <td class="paramname"> <em>name</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const char *&nbsp;</td>
+          <td class="paramname"> <em>_value</em></td><td>&nbsp;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Sets an attribute of name to a given value. 
+<p>
+The attribute will be created if it does not exist, or changed if it does. 
+</div>
+</div><p>
+<a class="anchor" name="0d1dd975d75496778177e35abfe0ec0b"></a><!-- doxytag: member="TiXmlElement::SetDoubleAttribute" ref="0d1dd975d75496778177e35abfe0ec0b" args="(const char *name, double value)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void TiXmlElement::SetDoubleAttribute           </td>
+          <td>(</td>
+          <td class="paramtype">const char *&nbsp;</td>
+          <td class="paramname"> <em>name</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">double&nbsp;</td>
+          <td class="paramname"> <em>value</em></td><td>&nbsp;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Sets an attribute of name to a given value. 
+<p>
+The attribute will be created if it does not exist, or changed if it does. 
+</div>
+</div><p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="tinyxml_8h-source.html">tinyxml.h</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
Binary file src/tinyxml/docs/classTiXmlElement.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/classTiXmlHandle-members.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,44 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: Member List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<h1>TiXmlHandle Member List</h1>This is the complete list of members for <a class="el" href="classTiXmlHandle.html">TiXmlHandle</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="classTiXmlHandle.html#072492b4be1acdb0db2d03cd8f71ccc4">Child</a>(const char *value, int index) const </td><td><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlHandle.html#f9cf6a7d08a5da94a8924425ad0cd5ac">Child</a>(int index) const </td><td><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlHandle.html#979a3f850984a176ee884e394c7eed2d">ChildElement</a>(const char *value, int index) const </td><td><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlHandle.html#8786475b9d1f1518492e3a46704c7ef0">ChildElement</a>(int index) const </td><td><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlHandle.html#cb5fe8388a526289ea65e817a51e05e7">Element</a>() const </td><td><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlHandle.html#cdb1faaf88a700b40ca2c8d9aee21139">FirstChild</a>() const </td><td><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlHandle.html#8c61f64ae9365d89c264f289085541f8">FirstChild</a>(const char *value) const </td><td><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlHandle.html#24d1112e995e937e4dddb202d4113d4a">FirstChildElement</a>() const </td><td><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlHandle.html#f0aea751320f5e430fac6f8fff3b8dd4">FirstChildElement</a>(const char *value) const </td><td><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlHandle.html#b44b723a8dc9af72838a303c079d0376">Node</a>() const </td><td><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlHandle.html#9fc739c8a18d160006f82572fc143d13">Text</a>() const </td><td><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlHandle.html#ba18fd7bdefb942ecdea4bf4b8e29ec8">TiXmlHandle</a>(TiXmlNode *_node)</td><td><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlHandle.html#236d7855e1e56ccc7b980630c48c7fd7">TiXmlHandle</a>(const TiXmlHandle &amp;ref)</td><td><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlHandle.html#bc6e7ed383a5fe1e52b0c0004b457b9e">ToElement</a>() const </td><td><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlHandle.html#f678e5088e83be67baf76f699756f2c3">ToNode</a>() const </td><td><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlHandle.html#4ac53a652296203a5b5e13854d923586">ToText</a>() const </td><td><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlHandle.html#1381c17507a130767b1e23afc93b3674">ToUnknown</a>() const </td><td><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlHandle.html#49675b74357ba2aae124657a9a1ef465">Unknown</a>() const </td><td><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a></td><td><code> [inline]</code></td></tr>
+</table><hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/classTiXmlHandle.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,419 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: TiXmlHandle Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<h1>TiXmlHandle Class Reference</h1><!-- doxytag: class="TiXmlHandle" -->A <a class="el" href="classTiXmlHandle.html">TiXmlHandle</a> is a class that wraps a node pointer with null checks; this is an incredibly useful thing.  
+<a href="#_details">More...</a>
+<p>
+<code>#include &lt;<a class="el" href="tinyxml_8h-source.html">tinyxml.h</a>&gt;</code>
+<p>
+<a href="classTiXmlHandle-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ba18fd7bdefb942ecdea4bf4b8e29ec8"></a><!-- doxytag: member="TiXmlHandle::TiXmlHandle" ref="ba18fd7bdefb942ecdea4bf4b8e29ec8" args="(TiXmlNode *_node)" -->
+&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlHandle.html#ba18fd7bdefb942ecdea4bf4b8e29ec8">TiXmlHandle</a> (<a class="el" href="classTiXmlNode.html">TiXmlNode</a> *_node)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create a handle from any node (at any depth of the tree.) This can be a null pointer. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="236d7855e1e56ccc7b980630c48c7fd7"></a><!-- doxytag: member="TiXmlHandle::TiXmlHandle" ref="236d7855e1e56ccc7b980630c48c7fd7" args="(const TiXmlHandle &amp;ref)" -->
+&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlHandle.html#236d7855e1e56ccc7b980630c48c7fd7">TiXmlHandle</a> (const <a class="el" href="classTiXmlHandle.html">TiXmlHandle</a> &amp;ref)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Copy constructor. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cdb1faaf88a700b40ca2c8d9aee21139"></a><!-- doxytag: member="TiXmlHandle::FirstChild" ref="cdb1faaf88a700b40ca2c8d9aee21139" args="() const " -->
+<a class="el" href="classTiXmlHandle.html">TiXmlHandle</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlHandle.html#cdb1faaf88a700b40ca2c8d9aee21139">FirstChild</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a handle to the first child node. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8c61f64ae9365d89c264f289085541f8"></a><!-- doxytag: member="TiXmlHandle::FirstChild" ref="8c61f64ae9365d89c264f289085541f8" args="(const char *value) const " -->
+<a class="el" href="classTiXmlHandle.html">TiXmlHandle</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlHandle.html#8c61f64ae9365d89c264f289085541f8">FirstChild</a> (const char *value) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a handle to the first child node with the given name. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="24d1112e995e937e4dddb202d4113d4a"></a><!-- doxytag: member="TiXmlHandle::FirstChildElement" ref="24d1112e995e937e4dddb202d4113d4a" args="() const " -->
+<a class="el" href="classTiXmlHandle.html">TiXmlHandle</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlHandle.html#24d1112e995e937e4dddb202d4113d4a">FirstChildElement</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a handle to the first child element. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f0aea751320f5e430fac6f8fff3b8dd4"></a><!-- doxytag: member="TiXmlHandle::FirstChildElement" ref="f0aea751320f5e430fac6f8fff3b8dd4" args="(const char *value) const " -->
+<a class="el" href="classTiXmlHandle.html">TiXmlHandle</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlHandle.html#f0aea751320f5e430fac6f8fff3b8dd4">FirstChildElement</a> (const char *value) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a handle to the first child element with the given name. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlHandle.html#072492b4be1acdb0db2d03cd8f71ccc4">Child</a> (const char *value, int index) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a handle to the "index" child with the given name.  <a href="#072492b4be1acdb0db2d03cd8f71ccc4"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlHandle.html#f9cf6a7d08a5da94a8924425ad0cd5ac">Child</a> (int index) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a handle to the "index" child.  <a href="#f9cf6a7d08a5da94a8924425ad0cd5ac"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlHandle.html#979a3f850984a176ee884e394c7eed2d">ChildElement</a> (const char *value, int index) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a handle to the "index" child element with the given name.  <a href="#979a3f850984a176ee884e394c7eed2d"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a>&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlHandle.html#8786475b9d1f1518492e3a46704c7ef0">ChildElement</a> (int index) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a handle to the "index" child element.  <a href="#8786475b9d1f1518492e3a46704c7ef0"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlHandle.html#f678e5088e83be67baf76f699756f2c3">ToNode</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the handle as a <a class="el" href="classTiXmlNode.html">TiXmlNode</a>.  <a href="#f678e5088e83be67baf76f699756f2c3"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTiXmlElement.html">TiXmlElement</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlHandle.html#bc6e7ed383a5fe1e52b0c0004b457b9e">ToElement</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the handle as a <a class="el" href="classTiXmlElement.html">TiXmlElement</a>.  <a href="#bc6e7ed383a5fe1e52b0c0004b457b9e"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTiXmlText.html">TiXmlText</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlHandle.html#4ac53a652296203a5b5e13854d923586">ToText</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the handle as a <a class="el" href="classTiXmlText.html">TiXmlText</a>.  <a href="#4ac53a652296203a5b5e13854d923586"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTiXmlUnknown.html">TiXmlUnknown</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlHandle.html#1381c17507a130767b1e23afc93b3674">ToUnknown</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the handle as a <a class="el" href="classTiXmlUnknown.html">TiXmlUnknown</a>.  <a href="#1381c17507a130767b1e23afc93b3674"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlHandle.html#b44b723a8dc9af72838a303c079d0376">Node</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTiXmlElement.html">TiXmlElement</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlHandle.html#cb5fe8388a526289ea65e817a51e05e7">Element</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTiXmlText.html">TiXmlText</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlHandle.html#9fc739c8a18d160006f82572fc143d13">Text</a> () const </td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTiXmlUnknown.html">TiXmlUnknown</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlHandle.html#49675b74357ba2aae124657a9a1ef465">Unknown</a> () const </td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+A <a class="el" href="classTiXmlHandle.html">TiXmlHandle</a> is a class that wraps a node pointer with null checks; this is an incredibly useful thing. 
+<p>
+Note that <a class="el" href="classTiXmlHandle.html">TiXmlHandle</a> is not part of the TinyXml DOM structure. It is a separate utility class.<p>
+Take an example: <div class="fragment"><pre class="fragment">	&lt;Document&gt;
+		&lt;Element attributeA = "valueA"&gt;
+			&lt;Child attributeB = "value1" /&gt;
+			&lt;Child attributeB = "value2" /&gt;
+		&lt;/Element&gt;
+	&lt;Document&gt;
+	</pre></div><p>
+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:<p>
+<div class="fragment"><pre class="fragment">	TiXmlElement* root = document.FirstChildElement( "Document" );
+	if ( root )
+	{
+		TiXmlElement* element = root-&gt;FirstChildElement( "Element" );
+		if ( element )
+		{
+			TiXmlElement* child = element-&gt;FirstChildElement( "Child" );
+			if ( child )
+			{
+				TiXmlElement* child2 = child-&gt;NextSiblingElement( "Child" );
+				if ( child2 )
+				{
+					// Finally do something useful.
+	</pre></div><p>
+And that doesn't even cover "else" cases. <a class="el" href="classTiXmlHandle.html">TiXmlHandle</a> addresses the verbosity of such code. A <a class="el" href="classTiXmlHandle.html">TiXmlHandle</a> checks for null pointers so it is perfectly safe and correct to use:<p>
+<div class="fragment"><pre class="fragment">	TiXmlHandle docHandle( &amp;document );
+	TiXmlElement* child2 = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).Child( "Child", 1 ).ToElement();
+	if ( child2 )
+	{
+		// do something useful
+	</pre></div><p>
+Which is MUCH more concise and useful.<p>
+It is also safe to copy handles - internally they are nothing more than node pointers. <div class="fragment"><pre class="fragment">	TiXmlHandle handleCopy = handle;
+	</pre></div><p>
+What they should not be used for is iteration:<p>
+<div class="fragment"><pre class="fragment">	int i=0; 
+	while ( true )
+	{
+		TiXmlElement* child = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).Child( "Child", i ).ToElement();
+		if ( !child )
+			break;
+		// do something
+		++i;
+	}
+	</pre></div><p>
+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:<p>
+<div class="fragment"><pre class="fragment">	TiXmlElement* child = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).FirstChild( "Child" ).ToElement();
+
+	for( child; child; child=child-&gt;NextSiblingElement() )
+	{
+		// do something
+	}
+	</pre></div> 
+<p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="f9cf6a7d08a5da94a8924425ad0cd5ac"></a><!-- doxytag: member="TiXmlHandle::Child" ref="f9cf6a7d08a5da94a8924425ad0cd5ac" args="(int index) const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a> TiXmlHandle::Child           </td>
+          <td>(</td>
+          <td class="paramtype">int&nbsp;</td>
+          <td class="paramname"> <em>index</em>          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const</td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Return a handle to the "index" child. 
+<p>
+The first child is 0, the second 1, etc. 
+</div>
+</div><p>
+<a class="anchor" name="072492b4be1acdb0db2d03cd8f71ccc4"></a><!-- doxytag: member="TiXmlHandle::Child" ref="072492b4be1acdb0db2d03cd8f71ccc4" args="(const char *value, int index) const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a> TiXmlHandle::Child           </td>
+          <td>(</td>
+          <td class="paramtype">const char *&nbsp;</td>
+          <td class="paramname"> <em>value</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&nbsp;</td>
+          <td class="paramname"> <em>index</em></td><td>&nbsp;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"> const</td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Return a handle to the "index" child with the given name. 
+<p>
+The first child is 0, the second 1, etc. 
+</div>
+</div><p>
+<a class="anchor" name="8786475b9d1f1518492e3a46704c7ef0"></a><!-- doxytag: member="TiXmlHandle::ChildElement" ref="8786475b9d1f1518492e3a46704c7ef0" args="(int index) const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a> TiXmlHandle::ChildElement           </td>
+          <td>(</td>
+          <td class="paramtype">int&nbsp;</td>
+          <td class="paramname"> <em>index</em>          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const</td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Return a handle to the "index" child element. 
+<p>
+The first child element is 0, the second 1, etc. Note that only TiXmlElements are indexed: other types are not counted. 
+</div>
+</div><p>
+<a class="anchor" name="979a3f850984a176ee884e394c7eed2d"></a><!-- doxytag: member="TiXmlHandle::ChildElement" ref="979a3f850984a176ee884e394c7eed2d" args="(const char *value, int index) const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a> TiXmlHandle::ChildElement           </td>
+          <td>(</td>
+          <td class="paramtype">const char *&nbsp;</td>
+          <td class="paramname"> <em>value</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&nbsp;</td>
+          <td class="paramname"> <em>index</em></td><td>&nbsp;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"> const</td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Return a handle to the "index" child element with the given name. 
+<p>
+The first child element is 0, the second 1, etc. Note that only TiXmlElements are indexed: other types are not counted. 
+</div>
+</div><p>
+<a class="anchor" name="cb5fe8388a526289ea65e817a51e05e7"></a><!-- doxytag: member="TiXmlHandle::Element" ref="cb5fe8388a526289ea65e817a51e05e7" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="classTiXmlElement.html">TiXmlElement</a>* TiXmlHandle::Element           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const<code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000002">Deprecated:</a></b></dt><dd>use ToElement. Return the handle as a <a class="el" href="classTiXmlElement.html">TiXmlElement</a>. This may return null. </dd></dl>
+
+</div>
+</div><p>
+<a class="anchor" name="b44b723a8dc9af72838a303c079d0376"></a><!-- doxytag: member="TiXmlHandle::Node" ref="b44b723a8dc9af72838a303c079d0376" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="classTiXmlNode.html">TiXmlNode</a>* TiXmlHandle::Node           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const<code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000001">Deprecated:</a></b></dt><dd>use ToNode. Return the handle as a <a class="el" href="classTiXmlNode.html">TiXmlNode</a>. This may return null. </dd></dl>
+
+</div>
+</div><p>
+<a class="anchor" name="9fc739c8a18d160006f82572fc143d13"></a><!-- doxytag: member="TiXmlHandle::Text" ref="9fc739c8a18d160006f82572fc143d13" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="classTiXmlText.html">TiXmlText</a>* TiXmlHandle::Text           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const<code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000003">Deprecated:</a></b></dt><dd>use <a class="el" href="classTiXmlHandle.html#4ac53a652296203a5b5e13854d923586">ToText()</a> Return the handle as a <a class="el" href="classTiXmlText.html">TiXmlText</a>. This may return null. </dd></dl>
+
+</div>
+</div><p>
+<a class="anchor" name="bc6e7ed383a5fe1e52b0c0004b457b9e"></a><!-- doxytag: member="TiXmlHandle::ToElement" ref="bc6e7ed383a5fe1e52b0c0004b457b9e" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="classTiXmlElement.html">TiXmlElement</a>* TiXmlHandle::ToElement           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const<code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Return the handle as a <a class="el" href="classTiXmlElement.html">TiXmlElement</a>. 
+<p>
+This may return null. 
+</div>
+</div><p>
+<a class="anchor" name="f678e5088e83be67baf76f699756f2c3"></a><!-- doxytag: member="TiXmlHandle::ToNode" ref="f678e5088e83be67baf76f699756f2c3" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="classTiXmlNode.html">TiXmlNode</a>* TiXmlHandle::ToNode           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const<code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Return the handle as a <a class="el" href="classTiXmlNode.html">TiXmlNode</a>. 
+<p>
+This may return null. 
+</div>
+</div><p>
+<a class="anchor" name="4ac53a652296203a5b5e13854d923586"></a><!-- doxytag: member="TiXmlHandle::ToText" ref="4ac53a652296203a5b5e13854d923586" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="classTiXmlText.html">TiXmlText</a>* TiXmlHandle::ToText           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const<code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Return the handle as a <a class="el" href="classTiXmlText.html">TiXmlText</a>. 
+<p>
+This may return null. 
+</div>
+</div><p>
+<a class="anchor" name="1381c17507a130767b1e23afc93b3674"></a><!-- doxytag: member="TiXmlHandle::ToUnknown" ref="1381c17507a130767b1e23afc93b3674" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="classTiXmlUnknown.html">TiXmlUnknown</a>* TiXmlHandle::ToUnknown           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const<code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Return the handle as a <a class="el" href="classTiXmlUnknown.html">TiXmlUnknown</a>. 
+<p>
+This may return null. 
+</div>
+</div><p>
+<a class="anchor" name="49675b74357ba2aae124657a9a1ef465"></a><!-- doxytag: member="TiXmlHandle::Unknown" ref="49675b74357ba2aae124657a9a1ef465" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="classTiXmlUnknown.html">TiXmlUnknown</a>* TiXmlHandle::Unknown           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const<code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+<dl compact><dt><b><a class="el" href="deprecated.html#_deprecated000004">Deprecated:</a></b></dt><dd>use <a class="el" href="classTiXmlHandle.html#1381c17507a130767b1e23afc93b3674">ToUnknown()</a> Return the handle as a <a class="el" href="classTiXmlUnknown.html">TiXmlUnknown</a>. This may return null. </dd></dl>
+
+</div>
+</div><p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="tinyxml_8h-source.html">tinyxml.h</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/classTiXmlNode-members.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,98 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: Member List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<h1>TiXmlNode Member List</h1>This is the complete list of members for <a class="el" href="classTiXmlNode.html">TiXmlNode</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#cc0f88b7462c6cb73809d410a4f5bb86">Accept</a>(TiXmlVisitor *visitor) const =0</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [pure virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#708e7f953df61d4d2d12f73171550a4b">Clear</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#4508cc3a2d7a98e96a54cc09c37a78a4">Clone</a>() const =0</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [pure virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#b54bfb9b70fe6dd276e7b279cab7f003">Column</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#6bd8c315c1acb09e34107b8736505948">EncodeString</a>(const TIXML_STRING &amp;str, TIXML_STRING *out)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#44c8eee26bbe2d1b2762038df9dde2f0">FirstChild</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1f05828d023150706eeb16d6fb3f6355">FirstChild</a>(const char *value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#bc8bf32be6419ec453a731868de19554">FirstChild</a>(const char *_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#07f6200a5956c723c5b52d70f29c46f6">FirstChild</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#10d2669ccb5e29e02fcb0e4408685ef6">FirstChild</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#f4fb652f6bd79ae0d5ce7d0f7d3c0fba">FirstChildElement</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#ccda2c6b45c25bb5a6f9c3407a644e61">FirstChildElement</a>(const char *_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#327ad4bbd90073c5dfc931b07314f5f7">FirstChildElement</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#7f1d7291880534c1e5cdeb392d8c1f45">FirstChildElement</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#80e397fa973cf5323e33b07154b024f3">GetDocument</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#6559a530ca6763fc301a14d77ed28c17">GetUserData</a>()</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#d0120210e4680ef2088601753ce0ede4">GetUserData</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#d9b75e54ec19301c8b4d5ff583d0b3d5">InsertAfterChild</a>(TiXmlNode *afterThis, const TiXmlNode &amp;addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#0c146fa2fff0157b681594102f48cbc7">InsertBeforeChild</a>(TiXmlNode *beforeThis, const TiXmlNode &amp;addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#d7d4630e1a2a916edda16be22448a8ba">InsertEndChild</a>(const TiXmlNode &amp;addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#d4b1472531c647a25b1840a87ae42438">IsWhiteSpaceCondensed</a>()</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#8621196ba3705fa226bef4a761cc51b6">IterateChildren</a>(const TiXmlNode *previous) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#dfaef35a076b9343adc1420757376c39">IterateChildren</a>(const char *value, const TiXmlNode *previous) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1cbaaf8e82c09ad763d52616d75724df">IterateChildren</a>(const std::string &amp;_value, const TiXmlNode *previous) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#16e9ad53e2f5445b14bf325c90aa862c">IterateChildren</a>(const std::string &amp;_value, const TiXmlNode *previous)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#6432d2b2495f6caf9cb4278df706a031">LastChild</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#bad5bf1059c48127b958711ef89e8e5d">LastChild</a>(const char *_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#256d0cdbfcfeccae83f3a1c9747a8b63">LastChild</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#69772c9202f70553f940b15c06b07be3">LastChild</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#5d29442ae46de6d0168429156197bfc6">LinkEndChild</a>(TiXmlNode *addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1b94d2f7fa7ab25a5a8e8d4340c449c9">NextSibling</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1757c1f4d01e8c9596ffdbd561c76aea">NextSibling</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#f854baeba384f5fe9859f5aee03b548e">NextSibling</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#2e61c0b89a77e36a0e8c60490003cb46">NextSibling</a>(const char *) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#73acf929d49d10bd0e5fb3d31b0372d1">NextSiblingElement</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#071ba77fd7ab79402fa84b7e9b8607b3">NextSiblingElement</a>(const char *) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#7572d0af9d1e696ee3f05d8bb5ebb463">NextSiblingElement</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#506958e34406729a4e4c5326ea39d081">NextSiblingElement</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#eed21ad30630ef6e7faf096127edc9f3">NoChildren</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#836eded4920ab9e9ef28496f48cd95a2">NodeType</a> enum name</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#86cd49cfb17a844c0010b3136ac966c7">operator&lt;&lt;</a>(std::ostream &amp;out, const TiXmlNode &amp;base)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#52ef17e7080df2490cf87bde380685ab">operator&lt;&lt;</a>(std::string &amp;out, const TiXmlNode &amp;base)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#b57bd426563c926844f65a78412e18b9">operator&gt;&gt;</a>(std::istream &amp;in, TiXmlNode &amp;base)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#b643043132ffd794f8602685d34a982e">Parent</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#c2cd892768726270e511b2ab32de4d10">PreviousSibling</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#5bdd49327eec1e609b7d22af706b8316">PreviousSibling</a>(const char *) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#658276f57d35d5d4256d1dc1a2c398ab">PreviousSibling</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#cc8a0434c7f401d4a3b6dee77c1a5912">PreviousSibling</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#0de56b3f2ef14c65091a3b916437b512">Print</a>(FILE *cfile, int depth) const =0</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [pure virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#e19d8510efc90596552f4feeac9a8fbf">RemoveChild</a>(TiXmlNode *removeThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#0c49e739a17b9938050c22cd89617fbd">ReplaceChild</a>(TiXmlNode *replaceThis, const TiXmlNode &amp;withThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#024bceb070188df92c2a8d8852dd0853">Row</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#0f799ec645bfb8d8a969e83478f379c1">SetCondenseWhiteSpace</a>(bool condense)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#c6b3e0f790930d4970ec30764e937b5d">SetUserData</a>(void *user)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#2a38329ca5d3f28f98ce932b8299ae90">SetValue</a>(const char *_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#2598d5f448042c1abbeae4503dd45ff2">SetValue</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#a0a5086f9eaee910bbfdc7f975e26574">ToComment</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#383e06a0787f7063953934867990f849">ToComment</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#9f43e6984fc7d4afd6eb32714c6b7b72">ToDeclaration</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#4027136ca820ff4a636b607231b6a6df">ToDeclaration</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#8a4cda4b15c29f64cff419309aebed08">ToDocument</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#6a4c8ac28ee7a745d059db6691e03bae">ToDocument</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#72abed96dc9667ab9e0a2a275301bb1c">ToElement</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#a65d000223187d22a4dcebd7479e9ebc">ToElement</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#95a46a52c525992d6b4ee08beb14cd69">ToText</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#3ddfbcac78fbea041fad57e5c6d60a03">ToText</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#fd7205cf31d7a376929f8a36930627a2">ToUnknown</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#06de5af852668c7e4af0d09c205f0b0d">ToUnknown</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#57b99d5c97d67a42b9752f5210a1ba5e">Type</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#b242c01590191f644569fa89a080d97c">userData</a></td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#77943eb90d12c2892b1337a9f5918b41">Value</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#6d9e505619d39bf50bfd9609c9169ea5">ValueStr</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+</table><hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/classTiXmlNode.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,780 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: TiXmlNode Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<h1>TiXmlNode Class Reference</h1><!-- doxytag: class="TiXmlNode" --><!-- doxytag: inherits="TiXmlBase" -->The parent class for everything in the Document Object Model.  
+<a href="#_details">More...</a>
+<p>
+<code>#include &lt;<a class="el" href="tinyxml_8h-source.html">tinyxml.h</a>&gt;</code>
+<p>
+<p>Inheritance diagram for TiXmlNode:
+<p><center><img src="classTiXmlNode.png" usemap="#TiXmlNode_map" border="0" alt=""></center>
+<map name="TiXmlNode_map">
+<area href="classTiXmlBase.html" alt="TiXmlBase" shape="rect" coords="295,0,403,24">
+<area href="classTiXmlComment.html" alt="TiXmlComment" shape="rect" coords="0,112,108,136">
+<area href="classTiXmlDeclaration.html" alt="TiXmlDeclaration" shape="rect" coords="118,112,226,136">
+<area href="classTiXmlDocument.html" alt="TiXmlDocument" shape="rect" coords="236,112,344,136">
+<area href="classTiXmlElement.html" alt="TiXmlElement" shape="rect" coords="354,112,462,136">
+<area href="classTiXmlText.html" alt="TiXmlText" shape="rect" coords="472,112,580,136">
+<area href="classTiXmlUnknown.html" alt="TiXmlUnknown" shape="rect" coords="590,112,698,136">
+</map>
+<a href="classTiXmlNode-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Public Types</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">enum &nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#836eded4920ab9e9ef28496f48cd95a2">NodeType</a> </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The types of XML nodes supported by TinyXml.  <a href="classTiXmlNode.html#836eded4920ab9e9ef28496f48cd95a2">More...</a><br></td></tr>
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#77943eb90d12c2892b1337a9f5918b41">Value</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The meaning of 'value' changes for the specific type of <a class="el" href="classTiXmlNode.html">TiXmlNode</a>.  <a href="#77943eb90d12c2892b1337a9f5918b41"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">const std::string &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#6d9e505619d39bf50bfd9609c9169ea5">ValueStr</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return <a class="el" href="classTiXmlNode.html#77943eb90d12c2892b1337a9f5918b41">Value()</a> as a std::string.  <a href="#6d9e505619d39bf50bfd9609c9169ea5"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#2a38329ca5d3f28f98ce932b8299ae90">SetValue</a> (const char *_value)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Changes the value of the node.  <a href="#2a38329ca5d3f28f98ce932b8299ae90"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2598d5f448042c1abbeae4503dd45ff2"></a><!-- doxytag: member="TiXmlNode::SetValue" ref="2598d5f448042c1abbeae4503dd45ff2" args="(const std::string &amp;_value)" -->
+void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#2598d5f448042c1abbeae4503dd45ff2">SetValue</a> (const std::string &amp;_value)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">STL std::string form. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="708e7f953df61d4d2d12f73171550a4b"></a><!-- doxytag: member="TiXmlNode::Clear" ref="708e7f953df61d4d2d12f73171550a4b" args="()" -->
+void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#708e7f953df61d4d2d12f73171550a4b">Clear</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete all the children of this node. Does not affect 'this'. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b643043132ffd794f8602685d34a982e"></a><!-- doxytag: member="TiXmlNode::Parent" ref="b643043132ffd794f8602685d34a982e" args="()" -->
+<a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#b643043132ffd794f8602685d34a982e">Parent</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">One step up the DOM. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="44c8eee26bbe2d1b2762038df9dde2f0"></a><!-- doxytag: member="TiXmlNode::FirstChild" ref="44c8eee26bbe2d1b2762038df9dde2f0" args="() const " -->
+const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#44c8eee26bbe2d1b2762038df9dde2f0">FirstChild</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The first child of this node. Will be null if there are no children. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#1f05828d023150706eeb16d6fb3f6355">FirstChild</a> (const char *value) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The first child of this node with the matching 'value'.  <a href="#1f05828d023150706eeb16d6fb3f6355"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bc8bf32be6419ec453a731868de19554"></a><!-- doxytag: member="TiXmlNode::FirstChild" ref="bc8bf32be6419ec453a731868de19554" args="(const char *_value)" -->
+<a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#bc8bf32be6419ec453a731868de19554">FirstChild</a> (const char *_value)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The first child of this node with the matching 'value'. Will be null if none found. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6432d2b2495f6caf9cb4278df706a031"></a><!-- doxytag: member="TiXmlNode::LastChild" ref="6432d2b2495f6caf9cb4278df706a031" args="()" -->
+<a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#6432d2b2495f6caf9cb4278df706a031">LastChild</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The last child of this node. Will be null if there are no children. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bad5bf1059c48127b958711ef89e8e5d"></a><!-- doxytag: member="TiXmlNode::LastChild" ref="bad5bf1059c48127b958711ef89e8e5d" args="(const char *_value)" -->
+<a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#bad5bf1059c48127b958711ef89e8e5d">LastChild</a> (const char *_value)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">The last child of this node matching 'value'. Will be null if there are no children. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="07f6200a5956c723c5b52d70f29c46f6"></a><!-- doxytag: member="TiXmlNode::FirstChild" ref="07f6200a5956c723c5b52d70f29c46f6" args="(const std::string &amp;_value) const " -->
+const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#07f6200a5956c723c5b52d70f29c46f6">FirstChild</a> (const std::string &amp;_value) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">STL std::string form. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="10d2669ccb5e29e02fcb0e4408685ef6"></a><!-- doxytag: member="TiXmlNode::FirstChild" ref="10d2669ccb5e29e02fcb0e4408685ef6" args="(const std::string &amp;_value)" -->
+<a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#10d2669ccb5e29e02fcb0e4408685ef6">FirstChild</a> (const std::string &amp;_value)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">STL std::string form. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="256d0cdbfcfeccae83f3a1c9747a8b63"></a><!-- doxytag: member="TiXmlNode::LastChild" ref="256d0cdbfcfeccae83f3a1c9747a8b63" args="(const std::string &amp;_value) const " -->
+const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#256d0cdbfcfeccae83f3a1c9747a8b63">LastChild</a> (const std::string &amp;_value) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">STL std::string form. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="69772c9202f70553f940b15c06b07be3"></a><!-- doxytag: member="TiXmlNode::LastChild" ref="69772c9202f70553f940b15c06b07be3" args="(const std::string &amp;_value)" -->
+<a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#69772c9202f70553f940b15c06b07be3">LastChild</a> (const std::string &amp;_value)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">STL std::string form. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#8621196ba3705fa226bef4a761cc51b6">IterateChildren</a> (const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> *previous) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An alternate way to walk the children of a node.  <a href="#8621196ba3705fa226bef4a761cc51b6"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="dfaef35a076b9343adc1420757376c39"></a><!-- doxytag: member="TiXmlNode::IterateChildren" ref="dfaef35a076b9343adc1420757376c39" args="(const char *value, const TiXmlNode *previous) const " -->
+const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#dfaef35a076b9343adc1420757376c39">IterateChildren</a> (const char *value, const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> *previous) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">This flavor of IterateChildren searches for children with a particular 'value'. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1cbaaf8e82c09ad763d52616d75724df"></a><!-- doxytag: member="TiXmlNode::IterateChildren" ref="1cbaaf8e82c09ad763d52616d75724df" args="(const std::string &amp;_value, const TiXmlNode *previous) const " -->
+const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#1cbaaf8e82c09ad763d52616d75724df">IterateChildren</a> (const std::string &amp;_value, const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> *previous) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">STL std::string form. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="16e9ad53e2f5445b14bf325c90aa862c"></a><!-- doxytag: member="TiXmlNode::IterateChildren" ref="16e9ad53e2f5445b14bf325c90aa862c" args="(const std::string &amp;_value, const TiXmlNode *previous)" -->
+<a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#16e9ad53e2f5445b14bf325c90aa862c">IterateChildren</a> (const std::string &amp;_value, const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> *previous)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">STL std::string form. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#d7d4630e1a2a916edda16be22448a8ba">InsertEndChild</a> (const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> &amp;addThis)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a new node related to this.  <a href="#d7d4630e1a2a916edda16be22448a8ba"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#5d29442ae46de6d0168429156197bfc6">LinkEndChild</a> (<a class="el" href="classTiXmlNode.html">TiXmlNode</a> *addThis)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a new node related to this.  <a href="#5d29442ae46de6d0168429156197bfc6"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#0c146fa2fff0157b681594102f48cbc7">InsertBeforeChild</a> (<a class="el" href="classTiXmlNode.html">TiXmlNode</a> *beforeThis, const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> &amp;addThis)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a new node related to this.  <a href="#0c146fa2fff0157b681594102f48cbc7"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#d9b75e54ec19301c8b4d5ff583d0b3d5">InsertAfterChild</a> (<a class="el" href="classTiXmlNode.html">TiXmlNode</a> *afterThis, const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> &amp;addThis)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Add a new node related to this.  <a href="#d9b75e54ec19301c8b4d5ff583d0b3d5"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#0c49e739a17b9938050c22cd89617fbd">ReplaceChild</a> (<a class="el" href="classTiXmlNode.html">TiXmlNode</a> *replaceThis, const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> &amp;withThis)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Replace a child of this node.  <a href="#0c49e739a17b9938050c22cd89617fbd"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e19d8510efc90596552f4feeac9a8fbf"></a><!-- doxytag: member="TiXmlNode::RemoveChild" ref="e19d8510efc90596552f4feeac9a8fbf" args="(TiXmlNode *removeThis)" -->
+bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#e19d8510efc90596552f4feeac9a8fbf">RemoveChild</a> (<a class="el" href="classTiXmlNode.html">TiXmlNode</a> *removeThis)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Delete a child of this node. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="c2cd892768726270e511b2ab32de4d10"></a><!-- doxytag: member="TiXmlNode::PreviousSibling" ref="c2cd892768726270e511b2ab32de4d10" args="() const " -->
+const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#c2cd892768726270e511b2ab32de4d10">PreviousSibling</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Navigate to a sibling node. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="5bdd49327eec1e609b7d22af706b8316"></a><!-- doxytag: member="TiXmlNode::PreviousSibling" ref="5bdd49327eec1e609b7d22af706b8316" args="(const char *) const " -->
+const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#5bdd49327eec1e609b7d22af706b8316">PreviousSibling</a> (const char *) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Navigate to a sibling node. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="658276f57d35d5d4256d1dc1a2c398ab"></a><!-- doxytag: member="TiXmlNode::PreviousSibling" ref="658276f57d35d5d4256d1dc1a2c398ab" args="(const std::string &amp;_value) const " -->
+const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#658276f57d35d5d4256d1dc1a2c398ab">PreviousSibling</a> (const std::string &amp;_value) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">STL std::string form. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cc8a0434c7f401d4a3b6dee77c1a5912"></a><!-- doxytag: member="TiXmlNode::PreviousSibling" ref="cc8a0434c7f401d4a3b6dee77c1a5912" args="(const std::string &amp;_value)" -->
+<a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#cc8a0434c7f401d4a3b6dee77c1a5912">PreviousSibling</a> (const std::string &amp;_value)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">STL std::string form. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1b94d2f7fa7ab25a5a8e8d4340c449c9"></a><!-- doxytag: member="TiXmlNode::NextSibling" ref="1b94d2f7fa7ab25a5a8e8d4340c449c9" args="(const std::string &amp;_value) const " -->
+const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#1b94d2f7fa7ab25a5a8e8d4340c449c9">NextSibling</a> (const std::string &amp;_value) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">STL std::string form. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1757c1f4d01e8c9596ffdbd561c76aea"></a><!-- doxytag: member="TiXmlNode::NextSibling" ref="1757c1f4d01e8c9596ffdbd561c76aea" args="(const std::string &amp;_value)" -->
+<a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#1757c1f4d01e8c9596ffdbd561c76aea">NextSibling</a> (const std::string &amp;_value)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">STL std::string form. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f854baeba384f5fe9859f5aee03b548e"></a><!-- doxytag: member="TiXmlNode::NextSibling" ref="f854baeba384f5fe9859f5aee03b548e" args="() const " -->
+const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#f854baeba384f5fe9859f5aee03b548e">NextSibling</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Navigate to a sibling node. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="2e61c0b89a77e36a0e8c60490003cb46"></a><!-- doxytag: member="TiXmlNode::NextSibling" ref="2e61c0b89a77e36a0e8c60490003cb46" args="(const char *) const " -->
+const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#2e61c0b89a77e36a0e8c60490003cb46">NextSibling</a> (const char *) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Navigate to a sibling node with the given 'value'. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classTiXmlElement.html">TiXmlElement</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#73acf929d49d10bd0e5fb3d31b0372d1">NextSiblingElement</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to get through elements.  <a href="#73acf929d49d10bd0e5fb3d31b0372d1"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classTiXmlElement.html">TiXmlElement</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#071ba77fd7ab79402fa84b7e9b8607b3">NextSiblingElement</a> (const char *) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to get through elements.  <a href="#071ba77fd7ab79402fa84b7e9b8607b3"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7572d0af9d1e696ee3f05d8bb5ebb463"></a><!-- doxytag: member="TiXmlNode::NextSiblingElement" ref="7572d0af9d1e696ee3f05d8bb5ebb463" args="(const std::string &amp;_value) const " -->
+const <a class="el" href="classTiXmlElement.html">TiXmlElement</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#7572d0af9d1e696ee3f05d8bb5ebb463">NextSiblingElement</a> (const std::string &amp;_value) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">STL std::string form. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="506958e34406729a4e4c5326ea39d081"></a><!-- doxytag: member="TiXmlNode::NextSiblingElement" ref="506958e34406729a4e4c5326ea39d081" args="(const std::string &amp;_value)" -->
+<a class="el" href="classTiXmlElement.html">TiXmlElement</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#506958e34406729a4e4c5326ea39d081">NextSiblingElement</a> (const std::string &amp;_value)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">STL std::string form. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f4fb652f6bd79ae0d5ce7d0f7d3c0fba"></a><!-- doxytag: member="TiXmlNode::FirstChildElement" ref="f4fb652f6bd79ae0d5ce7d0f7d3c0fba" args="() const " -->
+const <a class="el" href="classTiXmlElement.html">TiXmlElement</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#f4fb652f6bd79ae0d5ce7d0f7d3c0fba">FirstChildElement</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to get through elements. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ccda2c6b45c25bb5a6f9c3407a644e61"></a><!-- doxytag: member="TiXmlNode::FirstChildElement" ref="ccda2c6b45c25bb5a6f9c3407a644e61" args="(const char *_value) const " -->
+const <a class="el" href="classTiXmlElement.html">TiXmlElement</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#ccda2c6b45c25bb5a6f9c3407a644e61">FirstChildElement</a> (const char *_value) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Convenience function to get through elements. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="327ad4bbd90073c5dfc931b07314f5f7"></a><!-- doxytag: member="TiXmlNode::FirstChildElement" ref="327ad4bbd90073c5dfc931b07314f5f7" args="(const std::string &amp;_value) const " -->
+const <a class="el" href="classTiXmlElement.html">TiXmlElement</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#327ad4bbd90073c5dfc931b07314f5f7">FirstChildElement</a> (const std::string &amp;_value) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">STL std::string form. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7f1d7291880534c1e5cdeb392d8c1f45"></a><!-- doxytag: member="TiXmlNode::FirstChildElement" ref="7f1d7291880534c1e5cdeb392d8c1f45" args="(const std::string &amp;_value)" -->
+<a class="el" href="classTiXmlElement.html">TiXmlElement</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#7f1d7291880534c1e5cdeb392d8c1f45">FirstChildElement</a> (const std::string &amp;_value)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">STL std::string form. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">int&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#57b99d5c97d67a42b9752f5210a1ba5e">Type</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Query the type (as an enumerated value, above) of this node.  <a href="#57b99d5c97d67a42b9752f5210a1ba5e"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">const <a class="el" href="classTiXmlDocument.html">TiXmlDocument</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#80e397fa973cf5323e33b07154b024f3">GetDocument</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return a pointer to the Document this node lives in.  <a href="#80e397fa973cf5323e33b07154b024f3"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="eed21ad30630ef6e7faf096127edc9f3"></a><!-- doxytag: member="TiXmlNode::NoChildren" ref="eed21ad30630ef6e7faf096127edc9f3" args="() const " -->
+bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#eed21ad30630ef6e7faf096127edc9f3">NoChildren</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Returns true if this node has no children. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8a4cda4b15c29f64cff419309aebed08"></a><!-- doxytag: member="TiXmlNode::ToDocument" ref="8a4cda4b15c29f64cff419309aebed08" args="() const " -->
+virtual const <a class="el" href="classTiXmlDocument.html">TiXmlDocument</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#8a4cda4b15c29f64cff419309aebed08">ToDocument</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cast to a more defined type. Will return null if not of the requested type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="72abed96dc9667ab9e0a2a275301bb1c"></a><!-- doxytag: member="TiXmlNode::ToElement" ref="72abed96dc9667ab9e0a2a275301bb1c" args="() const " -->
+virtual const <a class="el" href="classTiXmlElement.html">TiXmlElement</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#72abed96dc9667ab9e0a2a275301bb1c">ToElement</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cast to a more defined type. Will return null if not of the requested type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a0a5086f9eaee910bbfdc7f975e26574"></a><!-- doxytag: member="TiXmlNode::ToComment" ref="a0a5086f9eaee910bbfdc7f975e26574" args="() const " -->
+virtual const <a class="el" href="classTiXmlComment.html">TiXmlComment</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#a0a5086f9eaee910bbfdc7f975e26574">ToComment</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cast to a more defined type. Will return null if not of the requested type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fd7205cf31d7a376929f8a36930627a2"></a><!-- doxytag: member="TiXmlNode::ToUnknown" ref="fd7205cf31d7a376929f8a36930627a2" args="() const " -->
+virtual const <a class="el" href="classTiXmlUnknown.html">TiXmlUnknown</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#fd7205cf31d7a376929f8a36930627a2">ToUnknown</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cast to a more defined type. Will return null if not of the requested type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="95a46a52c525992d6b4ee08beb14cd69"></a><!-- doxytag: member="TiXmlNode::ToText" ref="95a46a52c525992d6b4ee08beb14cd69" args="() const " -->
+virtual const <a class="el" href="classTiXmlText.html">TiXmlText</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#95a46a52c525992d6b4ee08beb14cd69">ToText</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cast to a more defined type. Will return null if not of the requested type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="9f43e6984fc7d4afd6eb32714c6b7b72"></a><!-- doxytag: member="TiXmlNode::ToDeclaration" ref="9f43e6984fc7d4afd6eb32714c6b7b72" args="() const " -->
+virtual const <a class="el" href="classTiXmlDeclaration.html">TiXmlDeclaration</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#9f43e6984fc7d4afd6eb32714c6b7b72">ToDeclaration</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cast to a more defined type. Will return null if not of the requested type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="6a4c8ac28ee7a745d059db6691e03bae"></a><!-- doxytag: member="TiXmlNode::ToDocument" ref="6a4c8ac28ee7a745d059db6691e03bae" args="()" -->
+virtual <a class="el" href="classTiXmlDocument.html">TiXmlDocument</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#6a4c8ac28ee7a745d059db6691e03bae">ToDocument</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cast to a more defined type. Will return null if not of the requested type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a65d000223187d22a4dcebd7479e9ebc"></a><!-- doxytag: member="TiXmlNode::ToElement" ref="a65d000223187d22a4dcebd7479e9ebc" args="()" -->
+virtual <a class="el" href="classTiXmlElement.html">TiXmlElement</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#a65d000223187d22a4dcebd7479e9ebc">ToElement</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cast to a more defined type. Will return null if not of the requested type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="383e06a0787f7063953934867990f849"></a><!-- doxytag: member="TiXmlNode::ToComment" ref="383e06a0787f7063953934867990f849" args="()" -->
+virtual <a class="el" href="classTiXmlComment.html">TiXmlComment</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#383e06a0787f7063953934867990f849">ToComment</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cast to a more defined type. Will return null if not of the requested type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="06de5af852668c7e4af0d09c205f0b0d"></a><!-- doxytag: member="TiXmlNode::ToUnknown" ref="06de5af852668c7e4af0d09c205f0b0d" args="()" -->
+virtual <a class="el" href="classTiXmlUnknown.html">TiXmlUnknown</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#06de5af852668c7e4af0d09c205f0b0d">ToUnknown</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cast to a more defined type. Will return null if not of the requested type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3ddfbcac78fbea041fad57e5c6d60a03"></a><!-- doxytag: member="TiXmlNode::ToText" ref="3ddfbcac78fbea041fad57e5c6d60a03" args="()" -->
+virtual <a class="el" href="classTiXmlText.html">TiXmlText</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#3ddfbcac78fbea041fad57e5c6d60a03">ToText</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cast to a more defined type. Will return null if not of the requested type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="4027136ca820ff4a636b607231b6a6df"></a><!-- doxytag: member="TiXmlNode::ToDeclaration" ref="4027136ca820ff4a636b607231b6a6df" args="()" -->
+virtual <a class="el" href="classTiXmlDeclaration.html">TiXmlDeclaration</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#4027136ca820ff4a636b607231b6a6df">ToDeclaration</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cast to a more defined type. Will return null if not of the requested type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual <a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#4508cc3a2d7a98e96a54cc09c37a78a4">Clone</a> () const =0</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Create an exact duplicate of this node and return it.  <a href="#4508cc3a2d7a98e96a54cc09c37a78a4"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#cc0f88b7462c6cb73809d410a4f5bb86">Accept</a> (<a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a> *visitor) const =0</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Accept a hierchical visit the nodes in the TinyXML DOM.  <a href="#cc0f88b7462c6cb73809d410a4f5bb86"></a><br></td></tr>
+<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="173617f6dfe902cf484ce5552b950475"></a><!-- doxytag: member="TiXmlNode::TiXmlDocument" ref="173617f6dfe902cf484ce5552b950475" args="" -->
+class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#173617f6dfe902cf484ce5552b950475">TiXmlDocument</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b6592e32cb9132be517cc12a70564c4b"></a><!-- doxytag: member="TiXmlNode::TiXmlElement" ref="b6592e32cb9132be517cc12a70564c4b" args="" -->
+class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#b6592e32cb9132be517cc12a70564c4b">TiXmlElement</a></td></tr>
+
+<tr><td class="memItemLeft" nowrap align="right" valign="top">std::istream &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#b57bd426563c926844f65a78412e18b9">operator&gt;&gt;</a> (std::istream &amp;in, <a class="el" href="classTiXmlNode.html">TiXmlNode</a> &amp;base)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An input stream operator, for every class.  <a href="#b57bd426563c926844f65a78412e18b9"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">std::ostream &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#86cd49cfb17a844c0010b3136ac966c7">operator&lt;&lt;</a> (std::ostream &amp;out, const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> &amp;base)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">An output stream operator, for every class.  <a href="#86cd49cfb17a844c0010b3136ac966c7"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="52ef17e7080df2490cf87bde380685ab"></a><!-- doxytag: member="TiXmlNode::operator&lt;&lt;" ref="52ef17e7080df2490cf87bde380685ab" args="(std::string &amp;out, const TiXmlNode &amp;base)" -->
+std::string &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlNode.html#52ef17e7080df2490cf87bde380685ab">operator&lt;&lt;</a> (std::string &amp;out, const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> &amp;base)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Appends the XML node or attribute to a std::string. <br></td></tr>
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+The parent class for everything in the Document Object Model. 
+<p>
+(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 <a class="el" href="classTiXmlNode.html">TiXmlNode</a> can be queried, and it can be cast to its more defined type. 
+<p>
+<hr><h2>Member Enumeration Documentation</h2>
+<a class="anchor" name="836eded4920ab9e9ef28496f48cd95a2"></a><!-- doxytag: member="TiXmlNode::NodeType" ref="836eded4920ab9e9ef28496f48cd95a2" args="" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">enum <a class="el" href="classTiXmlNode.html#836eded4920ab9e9ef28496f48cd95a2">TiXmlNode::NodeType</a>          </td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+The types of XML nodes supported by TinyXml. 
+<p>
+(All the unsupported types are picked up by UNKNOWN.) 
+</div>
+</div><p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="cc0f88b7462c6cb73809d410a4f5bb86"></a><!-- doxytag: member="TiXmlNode::Accept" ref="cc0f88b7462c6cb73809d410a4f5bb86" args="(TiXmlVisitor *visitor) const =0" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">virtual bool TiXmlNode::Accept           </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a> *&nbsp;</td>
+          <td class="paramname"> <em>visitor</em>          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const<code> [pure virtual]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Accept a hierchical visit the nodes in the TinyXML DOM. 
+<p>
+Every node in the XML tree will be conditionally visited and the host will be called back via the <a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a> interface.<p>
+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.)<p>
+The interface has been based on ideas from:<p>
+<ul>
+<li><a href="http://www.saxproject.org/">http://www.saxproject.org/</a></li><li><a href="http://c2.com/cgi/wiki?HierarchicalVisitorPattern">http://c2.com/cgi/wiki?HierarchicalVisitorPattern</a></li></ul>
+<p>
+Which are both good references for "visiting".<p>
+An example of using <a class="el" href="classTiXmlNode.html#cc0f88b7462c6cb73809d410a4f5bb86">Accept()</a>: <div class="fragment"><pre class="fragment">		TiXmlPrinter printer;
+		tinyxmlDoc.Accept( &amp;printer );
+		const char* xmlcstr = printer.CStr();
+		</pre></div> 
+<p>
+Implemented in <a class="el" href="classTiXmlElement.html#71a81b2afb0d42be1543d1c404dee6f5">TiXmlElement</a>, <a class="el" href="classTiXmlComment.html#f3ac1b99fbbe9ea4fb6e14146156e43e">TiXmlComment</a>, <a class="el" href="classTiXmlText.html#8483d4415ce9de6c4fa8f63d067d5de6">TiXmlText</a>, <a class="el" href="classTiXmlDeclaration.html#22315a535983b86535cdba3458669e3e">TiXmlDeclaration</a>, <a class="el" href="classTiXmlUnknown.html#d7122e5135581b3c832a1a3217760a93">TiXmlUnknown</a>, and <a class="el" href="classTiXmlDocument.html#a545aae325d9752ad64120bc4ecf939a">TiXmlDocument</a>.
+</div>
+</div><p>
+<a class="anchor" name="4508cc3a2d7a98e96a54cc09c37a78a4"></a><!-- doxytag: member="TiXmlNode::Clone" ref="4508cc3a2d7a98e96a54cc09c37a78a4" args="() const =0" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">virtual <a class="el" href="classTiXmlNode.html">TiXmlNode</a>* TiXmlNode::Clone           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const<code> [pure virtual]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Create an exact duplicate of this node and return it. 
+<p>
+The memory must be deleted by the caller. 
+<p>
+Implemented in <a class="el" href="classTiXmlElement.html#a464535ea1994db337cb6a8ce4b588b5">TiXmlElement</a>, <a class="el" href="classTiXmlComment.html#0d6662bdc52488b9e12b3c7a0453d028">TiXmlComment</a>, <a class="el" href="classTiXmlText.html#0c411e93a27537369479d034cc82da3b">TiXmlText</a>, <a class="el" href="classTiXmlDeclaration.html#7cf459186040141cda7a180a6585ce2e">TiXmlDeclaration</a>, <a class="el" href="classTiXmlUnknown.html#0960bb7428b3f341da46244229604d73">TiXmlUnknown</a>, and <a class="el" href="classTiXmlDocument.html#4968661cab4a1f44a23329c6f8db1907">TiXmlDocument</a>.
+</div>
+</div><p>
+<a class="anchor" name="1f05828d023150706eeb16d6fb3f6355"></a><!-- doxytag: member="TiXmlNode::FirstChild" ref="1f05828d023150706eeb16d6fb3f6355" args="(const char *value) const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const <a class="el" href="classTiXmlNode.html">TiXmlNode</a>* TiXmlNode::FirstChild           </td>
+          <td>(</td>
+          <td class="paramtype">const char *&nbsp;</td>
+          <td class="paramname"> <em>value</em>          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const</td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+The first child of this node with the matching 'value'. 
+<p>
+Will be null if none found. 
+</div>
+</div><p>
+<a class="anchor" name="80e397fa973cf5323e33b07154b024f3"></a><!-- doxytag: member="TiXmlNode::GetDocument" ref="80e397fa973cf5323e33b07154b024f3" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const <a class="el" href="classTiXmlDocument.html">TiXmlDocument</a>* TiXmlNode::GetDocument           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const</td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Return a pointer to the Document this node lives in. 
+<p>
+Returns null if not in a document. 
+</div>
+</div><p>
+<a class="anchor" name="d9b75e54ec19301c8b4d5ff583d0b3d5"></a><!-- doxytag: member="TiXmlNode::InsertAfterChild" ref="d9b75e54ec19301c8b4d5ff583d0b3d5" args="(TiXmlNode *afterThis, const TiXmlNode &amp;addThis)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="classTiXmlNode.html">TiXmlNode</a>* TiXmlNode::InsertAfterChild           </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td>
+          <td class="paramname"> <em>afterThis</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> &amp;&nbsp;</td>
+          <td class="paramname"> <em>addThis</em></td><td>&nbsp;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Add a new node related to this. 
+<p>
+Adds a child after the specified child. Returns a pointer to the new object or NULL if an error occured. 
+</div>
+</div><p>
+<a class="anchor" name="0c146fa2fff0157b681594102f48cbc7"></a><!-- doxytag: member="TiXmlNode::InsertBeforeChild" ref="0c146fa2fff0157b681594102f48cbc7" args="(TiXmlNode *beforeThis, const TiXmlNode &amp;addThis)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="classTiXmlNode.html">TiXmlNode</a>* TiXmlNode::InsertBeforeChild           </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td>
+          <td class="paramname"> <em>beforeThis</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> &amp;&nbsp;</td>
+          <td class="paramname"> <em>addThis</em></td><td>&nbsp;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Add a new node related to this. 
+<p>
+Adds a child before the specified child. Returns a pointer to the new object or NULL if an error occured. 
+</div>
+</div><p>
+<a class="anchor" name="d7d4630e1a2a916edda16be22448a8ba"></a><!-- doxytag: member="TiXmlNode::InsertEndChild" ref="d7d4630e1a2a916edda16be22448a8ba" args="(const TiXmlNode &amp;addThis)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="classTiXmlNode.html">TiXmlNode</a>* TiXmlNode::InsertEndChild           </td>
+          <td>(</td>
+          <td class="paramtype">const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> &amp;&nbsp;</td>
+          <td class="paramname"> <em>addThis</em>          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Add a new node related to this. 
+<p>
+Adds a child past the LastChild. Returns a pointer to the new object or NULL if an error occured. 
+</div>
+</div><p>
+<a class="anchor" name="8621196ba3705fa226bef4a761cc51b6"></a><!-- doxytag: member="TiXmlNode::IterateChildren" ref="8621196ba3705fa226bef4a761cc51b6" args="(const TiXmlNode *previous) const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const <a class="el" href="classTiXmlNode.html">TiXmlNode</a>* TiXmlNode::IterateChildren           </td>
+          <td>(</td>
+          <td class="paramtype">const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td>
+          <td class="paramname"> <em>previous</em>          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const</td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+An alternate way to walk the children of a node. 
+<p>
+One way to iterate over nodes is: <div class="fragment"><pre class="fragment">			for( child = parent-&gt;FirstChild(); child; child = child-&gt;NextSibling() )
+		</pre></div><p>
+IterateChildren does the same thing with the syntax: <div class="fragment"><pre class="fragment">			child = 0;
+			while( child = parent-&gt;IterateChildren( child ) )
+		</pre></div><p>
+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. 
+</div>
+</div><p>
+<a class="anchor" name="5d29442ae46de6d0168429156197bfc6"></a><!-- doxytag: member="TiXmlNode::LinkEndChild" ref="5d29442ae46de6d0168429156197bfc6" args="(TiXmlNode *addThis)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="classTiXmlNode.html">TiXmlNode</a>* TiXmlNode::LinkEndChild           </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td>
+          <td class="paramname"> <em>addThis</em>          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Add a new node related to this. 
+<p>
+Adds a child past the LastChild.<p>
+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.<p>
+<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="classTiXmlNode.html#d7d4630e1a2a916edda16be22448a8ba">InsertEndChild</a> </dd></dl>
+
+</div>
+</div><p>
+<a class="anchor" name="071ba77fd7ab79402fa84b7e9b8607b3"></a><!-- doxytag: member="TiXmlNode::NextSiblingElement" ref="071ba77fd7ab79402fa84b7e9b8607b3" args="(const char *) const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const <a class="el" href="classTiXmlElement.html">TiXmlElement</a>* TiXmlNode::NextSiblingElement           </td>
+          <td>(</td>
+          <td class="paramtype">const char *&nbsp;</td>
+          <td class="paramname">          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const</td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Convenience function to get through elements. 
+<p>
+Calls NextSibling and ToElement. Will skip all non-Element nodes. Returns 0 if there is not another element. 
+</div>
+</div><p>
+<a class="anchor" name="73acf929d49d10bd0e5fb3d31b0372d1"></a><!-- doxytag: member="TiXmlNode::NextSiblingElement" ref="73acf929d49d10bd0e5fb3d31b0372d1" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const <a class="el" href="classTiXmlElement.html">TiXmlElement</a>* TiXmlNode::NextSiblingElement           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const</td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Convenience function to get through elements. 
+<p>
+Calls NextSibling and ToElement. Will skip all non-Element nodes. Returns 0 if there is not another element. 
+</div>
+</div><p>
+<a class="anchor" name="0c49e739a17b9938050c22cd89617fbd"></a><!-- doxytag: member="TiXmlNode::ReplaceChild" ref="0c49e739a17b9938050c22cd89617fbd" args="(TiXmlNode *replaceThis, const TiXmlNode &amp;withThis)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname"><a class="el" href="classTiXmlNode.html">TiXmlNode</a>* TiXmlNode::ReplaceChild           </td>
+          <td>(</td>
+          <td class="paramtype"><a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td>
+          <td class="paramname"> <em>replaceThis</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> &amp;&nbsp;</td>
+          <td class="paramname"> <em>withThis</em></td><td>&nbsp;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Replace a child of this node. 
+<p>
+Returns a pointer to the new object or NULL if an error occured. 
+</div>
+</div><p>
+<a class="anchor" name="2a38329ca5d3f28f98ce932b8299ae90"></a><!-- doxytag: member="TiXmlNode::SetValue" ref="2a38329ca5d3f28f98ce932b8299ae90" args="(const char *_value)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void TiXmlNode::SetValue           </td>
+          <td>(</td>
+          <td class="paramtype">const char *&nbsp;</td>
+          <td class="paramname"> <em>_value</em>          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Changes the value of the node. 
+<p>
+Defined as: <div class="fragment"><pre class="fragment">		Document:	filename of the xml file
+		Element:	name of the element
+		Comment:	the comment text
+		Unknown:	the tag contents
+		Text:		the text string
+		</pre></div> 
+</div>
+</div><p>
+<a class="anchor" name="57b99d5c97d67a42b9752f5210a1ba5e"></a><!-- doxytag: member="TiXmlNode::Type" ref="57b99d5c97d67a42b9752f5210a1ba5e" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">int TiXmlNode::Type           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const<code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Query the type (as an enumerated value, above) of this node. 
+<p>
+The possible types are: DOCUMENT, ELEMENT, COMMENT, UNKNOWN, TEXT, and DECLARATION. 
+</div>
+</div><p>
+<a class="anchor" name="77943eb90d12c2892b1337a9f5918b41"></a><!-- doxytag: member="TiXmlNode::Value" ref="77943eb90d12c2892b1337a9f5918b41" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const char* TiXmlNode::Value           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const<code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+The meaning of 'value' changes for the specific type of <a class="el" href="classTiXmlNode.html">TiXmlNode</a>. 
+<p>
+<div class="fragment"><pre class="fragment">		Document:	filename of the xml file
+		Element:	name of the element
+		Comment:	the comment text
+		Unknown:	the tag contents
+		Text:		the text string
+		</pre></div><p>
+The subclasses will wrap this function. 
+</div>
+</div><p>
+<a class="anchor" name="6d9e505619d39bf50bfd9609c9169ea5"></a><!-- doxytag: member="TiXmlNode::ValueStr" ref="6d9e505619d39bf50bfd9609c9169ea5" args="() const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">const std::string&amp; TiXmlNode::ValueStr           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"> const<code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Return <a class="el" href="classTiXmlNode.html#77943eb90d12c2892b1337a9f5918b41">Value()</a> as a std::string. 
+<p>
+If you only use STL, this is more efficient than calling <a class="el" href="classTiXmlNode.html#77943eb90d12c2892b1337a9f5918b41">Value()</a>. Only available in STL mode. 
+</div>
+</div><p>
+<hr><h2>Friends And Related Function Documentation</h2>
+<a class="anchor" name="86cd49cfb17a844c0010b3136ac966c7"></a><!-- doxytag: member="TiXmlNode::operator&lt;&lt;" ref="86cd49cfb17a844c0010b3136ac966c7" args="(std::ostream &amp;out, const TiXmlNode &amp;base)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">std::ostream&amp; operator&lt;&lt;           </td>
+          <td>(</td>
+          <td class="paramtype">std::ostream &amp;&nbsp;</td>
+          <td class="paramname"> <em>out</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">const <a class="el" href="classTiXmlNode.html">TiXmlNode</a> &amp;&nbsp;</td>
+          <td class="paramname"> <em>base</em></td><td>&nbsp;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"><code> [friend]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+An output stream operator, for every class. 
+<p>
+Note that this outputs without any newlines or formatting, as opposed to <a class="el" href="classTiXmlBase.html#0de56b3f2ef14c65091a3b916437b512">Print()</a>, which includes tabs and new lines.<p>
+The operator&lt;&lt; and operator&gt;&gt; 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.<p>
+But reading is not as well defined. (As it always is.) If you create a <a class="el" href="classTiXmlElement.html">TiXmlElement</a> (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.<p>
+A <a class="el" href="classTiXmlDocument.html">TiXmlDocument</a> will read nodes until it reads a root element, and all the children of that root element. 
+</div>
+</div><p>
+<a class="anchor" name="b57bd426563c926844f65a78412e18b9"></a><!-- doxytag: member="TiXmlNode::operator&gt;&gt;" ref="b57bd426563c926844f65a78412e18b9" args="(std::istream &amp;in, TiXmlNode &amp;base)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">std::istream&amp; operator&gt;&gt;           </td>
+          <td>(</td>
+          <td class="paramtype">std::istream &amp;&nbsp;</td>
+          <td class="paramname"> <em>in</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype"><a class="el" href="classTiXmlNode.html">TiXmlNode</a> &amp;&nbsp;</td>
+          <td class="paramname"> <em>base</em></td><td>&nbsp;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"><code> [friend]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+An input stream operator, for every class. 
+<p>
+Tolerant of newlines and formatting, but doesn't expect them. 
+</div>
+</div><p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="tinyxml_8h-source.html">tinyxml.h</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
Binary file src/tinyxml/docs/classTiXmlNode.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/classTiXmlPrinter-members.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,42 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: Member List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<h1>TiXmlPrinter Member List</h1>This is the complete list of members for <a class="el" href="classTiXmlPrinter.html">TiXmlPrinter</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="classTiXmlPrinter.html#859eede9597d3e0355b77757be48735e">CStr</a>()</td><td><a class="el" href="classTiXmlPrinter.html">TiXmlPrinter</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlPrinter.html#bb33ec7d4bad6aaeb57f4304394b133d">Indent</a>()</td><td><a class="el" href="classTiXmlPrinter.html">TiXmlPrinter</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlPrinter.html#11f1b4804a460b175ec244eb5724d96d">LineBreak</a>()</td><td><a class="el" href="classTiXmlPrinter.html">TiXmlPrinter</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlPrinter.html#213377a4070c7e625bae59716b089e5e">SetIndent</a>(const char *_indent)</td><td><a class="el" href="classTiXmlPrinter.html">TiXmlPrinter</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlPrinter.html#4be1e37e69e3858c59635aa947174fe6">SetLineBreak</a>(const char *_lineBreak)</td><td><a class="el" href="classTiXmlPrinter.html">TiXmlPrinter</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlPrinter.html#b23a90629e374cb1cadca090468bbd19">SetStreamPrinting</a>()</td><td><a class="el" href="classTiXmlPrinter.html">TiXmlPrinter</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlPrinter.html#d01375ae9199bd2f48252eaddce3039d">Size</a>()</td><td><a class="el" href="classTiXmlPrinter.html">TiXmlPrinter</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlPrinter.html#3bd4daf44309b41f5813a833caa0d1c9">Str</a>()</td><td><a class="el" href="classTiXmlPrinter.html">TiXmlPrinter</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlPrinter.html#ce1b14d33eede2575c0743e2350f6a38">Visit</a>(const TiXmlDeclaration &amp;declaration)</td><td><a class="el" href="classTiXmlPrinter.html">TiXmlPrinter</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlPrinter.html#711e7d65d4af9ec70977568d2451fb1c">Visit</a>(const TiXmlText &amp;text)</td><td><a class="el" href="classTiXmlPrinter.html">TiXmlPrinter</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlPrinter.html#83c13d6b980064b30f989f9a35498979">Visit</a>(const TiXmlComment &amp;comment)</td><td><a class="el" href="classTiXmlPrinter.html">TiXmlPrinter</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlPrinter.html#d2dca6dd106e8982fd3c7db1f3330970">Visit</a>(const TiXmlUnknown &amp;unknown)</td><td><a class="el" href="classTiXmlPrinter.html">TiXmlPrinter</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlPrinter.html#799f4f0388570cbb54c0d3c345fef7c1">VisitEnter</a>(const TiXmlDocument &amp;doc)</td><td><a class="el" href="classTiXmlPrinter.html">TiXmlPrinter</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlPrinter.html#0c5e7bf8622838417a0d0bfb8f433854">VisitEnter</a>(const TiXmlElement &amp;element, const TiXmlAttribute *firstAttribute)</td><td><a class="el" href="classTiXmlPrinter.html">TiXmlPrinter</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlPrinter.html#66b33edd76c538b462f789b797a4fdf2">VisitExit</a>(const TiXmlDocument &amp;doc)</td><td><a class="el" href="classTiXmlPrinter.html">TiXmlPrinter</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlPrinter.html#1853cf2f6e63ad4b4232b4835e0acaf0">VisitExit</a>(const TiXmlElement &amp;element)</td><td><a class="el" href="classTiXmlPrinter.html">TiXmlPrinter</a></td><td><code> [virtual]</code></td></tr>
+</table><hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/classTiXmlPrinter.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,184 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: TiXmlPrinter Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<h1>TiXmlPrinter Class Reference</h1><!-- doxytag: class="TiXmlPrinter" --><!-- doxytag: inherits="TiXmlVisitor" -->Print to memory functionality.  
+<a href="#_details">More...</a>
+<p>
+<code>#include &lt;<a class="el" href="tinyxml_8h-source.html">tinyxml.h</a>&gt;</code>
+<p>
+<p>Inheritance diagram for TiXmlPrinter:
+<p><center><img src="classTiXmlPrinter.png" usemap="#TiXmlPrinter_map" border="0" alt=""></center>
+<map name="TiXmlPrinter_map">
+<area href="classTiXmlVisitor.html" alt="TiXmlVisitor" shape="rect" coords="0,0,81,24">
+</map>
+<a href="classTiXmlPrinter-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="799f4f0388570cbb54c0d3c345fef7c1"></a><!-- doxytag: member="TiXmlPrinter::VisitEnter" ref="799f4f0388570cbb54c0d3c345fef7c1" args="(const TiXmlDocument &amp;doc)" -->
+virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlPrinter.html#799f4f0388570cbb54c0d3c345fef7c1">VisitEnter</a> (const <a class="el" href="classTiXmlDocument.html">TiXmlDocument</a> &amp;doc)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Visit a document. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="66b33edd76c538b462f789b797a4fdf2"></a><!-- doxytag: member="TiXmlPrinter::VisitExit" ref="66b33edd76c538b462f789b797a4fdf2" args="(const TiXmlDocument &amp;doc)" -->
+virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlPrinter.html#66b33edd76c538b462f789b797a4fdf2">VisitExit</a> (const <a class="el" href="classTiXmlDocument.html">TiXmlDocument</a> &amp;doc)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Visit a document. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0c5e7bf8622838417a0d0bfb8f433854"></a><!-- doxytag: member="TiXmlPrinter::VisitEnter" ref="0c5e7bf8622838417a0d0bfb8f433854" args="(const TiXmlElement &amp;element, const TiXmlAttribute *firstAttribute)" -->
+virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlPrinter.html#0c5e7bf8622838417a0d0bfb8f433854">VisitEnter</a> (const <a class="el" href="classTiXmlElement.html">TiXmlElement</a> &amp;element, const <a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a> *firstAttribute)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Visit an element. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="1853cf2f6e63ad4b4232b4835e0acaf0"></a><!-- doxytag: member="TiXmlPrinter::VisitExit" ref="1853cf2f6e63ad4b4232b4835e0acaf0" args="(const TiXmlElement &amp;element)" -->
+virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlPrinter.html#1853cf2f6e63ad4b4232b4835e0acaf0">VisitExit</a> (const <a class="el" href="classTiXmlElement.html">TiXmlElement</a> &amp;element)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Visit an element. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ce1b14d33eede2575c0743e2350f6a38"></a><!-- doxytag: member="TiXmlPrinter::Visit" ref="ce1b14d33eede2575c0743e2350f6a38" args="(const TiXmlDeclaration &amp;declaration)" -->
+virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlPrinter.html#ce1b14d33eede2575c0743e2350f6a38">Visit</a> (const <a class="el" href="classTiXmlDeclaration.html">TiXmlDeclaration</a> &amp;declaration)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Visit a declaration. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="711e7d65d4af9ec70977568d2451fb1c"></a><!-- doxytag: member="TiXmlPrinter::Visit" ref="711e7d65d4af9ec70977568d2451fb1c" args="(const TiXmlText &amp;text)" -->
+virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlPrinter.html#711e7d65d4af9ec70977568d2451fb1c">Visit</a> (const <a class="el" href="classTiXmlText.html">TiXmlText</a> &amp;text)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Visit a text node. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="83c13d6b980064b30f989f9a35498979"></a><!-- doxytag: member="TiXmlPrinter::Visit" ref="83c13d6b980064b30f989f9a35498979" args="(const TiXmlComment &amp;comment)" -->
+virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlPrinter.html#83c13d6b980064b30f989f9a35498979">Visit</a> (const <a class="el" href="classTiXmlComment.html">TiXmlComment</a> &amp;comment)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Visit a comment node. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d2dca6dd106e8982fd3c7db1f3330970"></a><!-- doxytag: member="TiXmlPrinter::Visit" ref="d2dca6dd106e8982fd3c7db1f3330970" args="(const TiXmlUnknown &amp;unknown)" -->
+virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlPrinter.html#d2dca6dd106e8982fd3c7db1f3330970">Visit</a> (const <a class="el" href="classTiXmlUnknown.html">TiXmlUnknown</a> &amp;unknown)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Visit an unknow node. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlPrinter.html#213377a4070c7e625bae59716b089e5e">SetIndent</a> (const char *_indent)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the indent characters for printing.  <a href="#213377a4070c7e625bae59716b089e5e"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="bb33ec7d4bad6aaeb57f4304394b133d"></a><!-- doxytag: member="TiXmlPrinter::Indent" ref="bb33ec7d4bad6aaeb57f4304394b133d" args="()" -->
+const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlPrinter.html#bb33ec7d4bad6aaeb57f4304394b133d">Indent</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Query the indention string. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlPrinter.html#4be1e37e69e3858c59635aa947174fe6">SetLineBreak</a> (const char *_lineBreak)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Set the line breaking string.  <a href="#4be1e37e69e3858c59635aa947174fe6"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="11f1b4804a460b175ec244eb5724d96d"></a><!-- doxytag: member="TiXmlPrinter::LineBreak" ref="11f1b4804a460b175ec244eb5724d96d" args="()" -->
+const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlPrinter.html#11f1b4804a460b175ec244eb5724d96d">LineBreak</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Query the current line breaking string. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlPrinter.html#b23a90629e374cb1cadca090468bbd19">SetStreamPrinting</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Switch over to "stream printing" which is the most dense formatting without linebreaks.  <a href="#b23a90629e374cb1cadca090468bbd19"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="859eede9597d3e0355b77757be48735e"></a><!-- doxytag: member="TiXmlPrinter::CStr" ref="859eede9597d3e0355b77757be48735e" args="()" -->
+const char *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlPrinter.html#859eede9597d3e0355b77757be48735e">CStr</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the result. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d01375ae9199bd2f48252eaddce3039d"></a><!-- doxytag: member="TiXmlPrinter::Size" ref="d01375ae9199bd2f48252eaddce3039d" args="()" -->
+size_t&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlPrinter.html#d01375ae9199bd2f48252eaddce3039d">Size</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the length of the result string. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="3bd4daf44309b41f5813a833caa0d1c9"></a><!-- doxytag: member="TiXmlPrinter::Str" ref="3bd4daf44309b41f5813a833caa0d1c9" args="()" -->
+const std::string &amp;&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlPrinter.html#3bd4daf44309b41f5813a833caa0d1c9">Str</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Return the result. <br></td></tr>
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+Print to memory functionality. 
+<p>
+The <a class="el" href="classTiXmlPrinter.html">TiXmlPrinter</a> is useful when you need to:<p>
+<ol type=1>
+<li>Print to memory (especially in non-STL mode)</li><li>Control formatting (line endings, etc.)</li></ol>
+<p>
+When constructed, the <a class="el" href="classTiXmlPrinter.html">TiXmlPrinter</a> is in its default "pretty printing" mode. Before calling Accept() you can call methods to control the printing of the XML document. After <a class="el" href="classTiXmlNode.html#cc0f88b7462c6cb73809d410a4f5bb86">TiXmlNode::Accept()</a> is called, the printed document can be accessed via the <a class="el" href="classTiXmlPrinter.html#859eede9597d3e0355b77757be48735e">CStr()</a>, <a class="el" href="classTiXmlPrinter.html#3bd4daf44309b41f5813a833caa0d1c9">Str()</a>, and <a class="el" href="classTiXmlPrinter.html#d01375ae9199bd2f48252eaddce3039d">Size()</a> methods.<p>
+<a class="el" href="classTiXmlPrinter.html">TiXmlPrinter</a> uses the Visitor API. <div class="fragment"><pre class="fragment">	TiXmlPrinter printer;
+	printer.SetIndent( "\t" );
+
+	doc.Accept( &amp;printer );
+	fprintf( stdout, "%s", printer.CStr() );
+	</pre></div> 
+<p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="213377a4070c7e625bae59716b089e5e"></a><!-- doxytag: member="TiXmlPrinter::SetIndent" ref="213377a4070c7e625bae59716b089e5e" args="(const char *_indent)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void TiXmlPrinter::SetIndent           </td>
+          <td>(</td>
+          <td class="paramtype">const char *&nbsp;</td>
+          <td class="paramname"> <em>_indent</em>          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Set the indent characters for printing. 
+<p>
+By default 4 spaces but tab () is also useful, or null/empty string for no indentation. 
+</div>
+</div><p>
+<a class="anchor" name="4be1e37e69e3858c59635aa947174fe6"></a><!-- doxytag: member="TiXmlPrinter::SetLineBreak" ref="4be1e37e69e3858c59635aa947174fe6" args="(const char *_lineBreak)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void TiXmlPrinter::SetLineBreak           </td>
+          <td>(</td>
+          <td class="paramtype">const char *&nbsp;</td>
+          <td class="paramname"> <em>_lineBreak</em>          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Set the line breaking string. 
+<p>
+By default set to newline (<br>
+). Some operating systems prefer other characters, or can be set to the null/empty string for no indenation. 
+</div>
+</div><p>
+<a class="anchor" name="b23a90629e374cb1cadca090468bbd19"></a><!-- doxytag: member="TiXmlPrinter::SetStreamPrinting" ref="b23a90629e374cb1cadca090468bbd19" args="()" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">void TiXmlPrinter::SetStreamPrinting           </td>
+          <td>(</td>
+          <td class="paramname">          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Switch over to "stream printing" which is the most dense formatting without linebreaks. 
+<p>
+Common when the XML is needed for network transmission. 
+</div>
+</div><p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="tinyxml_8h-source.html">tinyxml.h</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
Binary file src/tinyxml/docs/classTiXmlPrinter.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/classTiXmlText-members.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,102 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: Member List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<h1>TiXmlText Member List</h1>This is the complete list of members for <a class="el" href="classTiXmlText.html">TiXmlText</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="classTiXmlText.html#8483d4415ce9de6c4fa8f63d067d5de6">Accept</a>(TiXmlVisitor *content) const </td><td><a class="el" href="classTiXmlText.html">TiXmlText</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlText.html#d1a6a6b83fa2271022dd97c072a2b586">CDATA</a>() const </td><td><a class="el" href="classTiXmlText.html">TiXmlText</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#708e7f953df61d4d2d12f73171550a4b">Clear</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlText.html#0c411e93a27537369479d034cc82da3b">Clone</a>() const </td><td><a class="el" href="classTiXmlText.html">TiXmlText</a></td><td><code> [protected, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#b54bfb9b70fe6dd276e7b279cab7f003">Column</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#6bd8c315c1acb09e34107b8736505948">EncodeString</a>(const TIXML_STRING &amp;str, TIXML_STRING *out)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#44c8eee26bbe2d1b2762038df9dde2f0">FirstChild</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1f05828d023150706eeb16d6fb3f6355">FirstChild</a>(const char *value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#bc8bf32be6419ec453a731868de19554">FirstChild</a>(const char *_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#07f6200a5956c723c5b52d70f29c46f6">FirstChild</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#10d2669ccb5e29e02fcb0e4408685ef6">FirstChild</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#f4fb652f6bd79ae0d5ce7d0f7d3c0fba">FirstChildElement</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#ccda2c6b45c25bb5a6f9c3407a644e61">FirstChildElement</a>(const char *_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#327ad4bbd90073c5dfc931b07314f5f7">FirstChildElement</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#7f1d7291880534c1e5cdeb392d8c1f45">FirstChildElement</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#80e397fa973cf5323e33b07154b024f3">GetDocument</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#6559a530ca6763fc301a14d77ed28c17">GetUserData</a>()</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#d0120210e4680ef2088601753ce0ede4">GetUserData</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#d9b75e54ec19301c8b4d5ff583d0b3d5">InsertAfterChild</a>(TiXmlNode *afterThis, const TiXmlNode &amp;addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#0c146fa2fff0157b681594102f48cbc7">InsertBeforeChild</a>(TiXmlNode *beforeThis, const TiXmlNode &amp;addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#d7d4630e1a2a916edda16be22448a8ba">InsertEndChild</a>(const TiXmlNode &amp;addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#d4b1472531c647a25b1840a87ae42438">IsWhiteSpaceCondensed</a>()</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#8621196ba3705fa226bef4a761cc51b6">IterateChildren</a>(const TiXmlNode *previous) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#dfaef35a076b9343adc1420757376c39">IterateChildren</a>(const char *value, const TiXmlNode *previous) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1cbaaf8e82c09ad763d52616d75724df">IterateChildren</a>(const std::string &amp;_value, const TiXmlNode *previous) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#16e9ad53e2f5445b14bf325c90aa862c">IterateChildren</a>(const std::string &amp;_value, const TiXmlNode *previous)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#6432d2b2495f6caf9cb4278df706a031">LastChild</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#bad5bf1059c48127b958711ef89e8e5d">LastChild</a>(const char *_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#256d0cdbfcfeccae83f3a1c9747a8b63">LastChild</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#69772c9202f70553f940b15c06b07be3">LastChild</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#5d29442ae46de6d0168429156197bfc6">LinkEndChild</a>(TiXmlNode *addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1b94d2f7fa7ab25a5a8e8d4340c449c9">NextSibling</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1757c1f4d01e8c9596ffdbd561c76aea">NextSibling</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#f854baeba384f5fe9859f5aee03b548e">NextSibling</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#2e61c0b89a77e36a0e8c60490003cb46">NextSibling</a>(const char *) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#73acf929d49d10bd0e5fb3d31b0372d1">NextSiblingElement</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#071ba77fd7ab79402fa84b7e9b8607b3">NextSiblingElement</a>(const char *) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#7572d0af9d1e696ee3f05d8bb5ebb463">NextSiblingElement</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#506958e34406729a4e4c5326ea39d081">NextSiblingElement</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#eed21ad30630ef6e7faf096127edc9f3">NoChildren</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#836eded4920ab9e9ef28496f48cd95a2">NodeType</a> enum name</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#86cd49cfb17a844c0010b3136ac966c7">operator&lt;&lt;</a>(std::ostream &amp;out, const TiXmlNode &amp;base)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#52ef17e7080df2490cf87bde380685ab">operator&lt;&lt;</a>(std::string &amp;out, const TiXmlNode &amp;base)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#b57bd426563c926844f65a78412e18b9">operator&gt;&gt;</a>(std::istream &amp;in, TiXmlNode &amp;base)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#b643043132ffd794f8602685d34a982e">Parent</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#c2cd892768726270e511b2ab32de4d10">PreviousSibling</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#5bdd49327eec1e609b7d22af706b8316">PreviousSibling</a>(const char *) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#658276f57d35d5d4256d1dc1a2c398ab">PreviousSibling</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#cc8a0434c7f401d4a3b6dee77c1a5912">PreviousSibling</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlText.html#0cafbf6f236c7f02d12b2bffc2b7976b">Print</a>(FILE *cfile, int depth) const </td><td><a class="el" href="classTiXmlText.html">TiXmlText</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#e19d8510efc90596552f4feeac9a8fbf">RemoveChild</a>(TiXmlNode *removeThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#0c49e739a17b9938050c22cd89617fbd">ReplaceChild</a>(TiXmlNode *replaceThis, const TiXmlNode &amp;withThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#024bceb070188df92c2a8d8852dd0853">Row</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlText.html#cb17ff7c5d09b2c839393445a3de5ea9">SetCDATA</a>(bool _cdata)</td><td><a class="el" href="classTiXmlText.html">TiXmlText</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#0f799ec645bfb8d8a969e83478f379c1">SetCondenseWhiteSpace</a>(bool condense)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#c6b3e0f790930d4970ec30764e937b5d">SetUserData</a>(void *user)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#2a38329ca5d3f28f98ce932b8299ae90">SetValue</a>(const char *_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#2598d5f448042c1abbeae4503dd45ff2">SetValue</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlText.html#f659e77c6b87d684827f35a8f4895960">TiXmlText</a>(const char *initValue)</td><td><a class="el" href="classTiXmlText.html">TiXmlText</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlText.html#439792f6183a3d3fb6f2bc2b16fa5691">TiXmlText</a>(const std::string &amp;initValue)</td><td><a class="el" href="classTiXmlText.html">TiXmlText</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#a0a5086f9eaee910bbfdc7f975e26574">ToComment</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#383e06a0787f7063953934867990f849">ToComment</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#9f43e6984fc7d4afd6eb32714c6b7b72">ToDeclaration</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#4027136ca820ff4a636b607231b6a6df">ToDeclaration</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#8a4cda4b15c29f64cff419309aebed08">ToDocument</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#6a4c8ac28ee7a745d059db6691e03bae">ToDocument</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#72abed96dc9667ab9e0a2a275301bb1c">ToElement</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#a65d000223187d22a4dcebd7479e9ebc">ToElement</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlText.html#895bf34ffad17f7439ab2a52b9651648">ToText</a>() const </td><td><a class="el" href="classTiXmlText.html">TiXmlText</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlText.html#e7c3a8fd3e4dbf6c0c4363a943d72f5b">ToText</a>()</td><td><a class="el" href="classTiXmlText.html">TiXmlText</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#fd7205cf31d7a376929f8a36930627a2">ToUnknown</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#06de5af852668c7e4af0d09c205f0b0d">ToUnknown</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#57b99d5c97d67a42b9752f5210a1ba5e">Type</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#b242c01590191f644569fa89a080d97c">userData</a></td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#77943eb90d12c2892b1337a9f5918b41">Value</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#6d9e505619d39bf50bfd9609c9169ea5">ValueStr</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+</table><hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/classTiXmlText.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,145 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: TiXmlText Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<h1>TiXmlText Class Reference</h1><!-- doxytag: class="TiXmlText" --><!-- doxytag: inherits="TiXmlNode" -->XML text.  
+<a href="#_details">More...</a>
+<p>
+<code>#include &lt;<a class="el" href="tinyxml_8h-source.html">tinyxml.h</a>&gt;</code>
+<p>
+<p>Inheritance diagram for TiXmlText:
+<p><center><img src="classTiXmlText.png" usemap="#TiXmlText_map" border="0" alt=""></center>
+<map name="TiXmlText_map">
+<area href="classTiXmlNode.html" alt="TiXmlNode" shape="rect" coords="0,56,73,80">
+<area href="classTiXmlBase.html" alt="TiXmlBase" shape="rect" coords="0,0,73,24">
+</map>
+<a href="classTiXmlText-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlText.html#f659e77c6b87d684827f35a8f4895960">TiXmlText</a> (const char *initValue)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor for text element.  <a href="#f659e77c6b87d684827f35a8f4895960"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="439792f6183a3d3fb6f2bc2b16fa5691"></a><!-- doxytag: member="TiXmlText::TiXmlText" ref="439792f6183a3d3fb6f2bc2b16fa5691" args="(const std::string &amp;initValue)" -->
+&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlText.html#439792f6183a3d3fb6f2bc2b16fa5691">TiXmlText</a> (const std::string &amp;initValue)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Constructor. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlText.html#0cafbf6f236c7f02d12b2bffc2b7976b">Print</a> (FILE *cfile, int depth) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode.  <a href="#0cafbf6f236c7f02d12b2bffc2b7976b"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d1a6a6b83fa2271022dd97c072a2b586"></a><!-- doxytag: member="TiXmlText::CDATA" ref="d1a6a6b83fa2271022dd97c072a2b586" args="() const " -->
+bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlText.html#d1a6a6b83fa2271022dd97c072a2b586">CDATA</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Queries whether this represents text using a CDATA section. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="cb17ff7c5d09b2c839393445a3de5ea9"></a><!-- doxytag: member="TiXmlText::SetCDATA" ref="cb17ff7c5d09b2c839393445a3de5ea9" args="(bool _cdata)" -->
+void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlText.html#cb17ff7c5d09b2c839393445a3de5ea9">SetCDATA</a> (bool _cdata)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Turns on or off a CDATA representation of text. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="895bf34ffad17f7439ab2a52b9651648"></a><!-- doxytag: member="TiXmlText::ToText" ref="895bf34ffad17f7439ab2a52b9651648" args="() const " -->
+virtual const <a class="el" href="classTiXmlText.html">TiXmlText</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlText.html#895bf34ffad17f7439ab2a52b9651648">ToText</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cast to a more defined type. Will return null not of the requested type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="e7c3a8fd3e4dbf6c0c4363a943d72f5b"></a><!-- doxytag: member="TiXmlText::ToText" ref="e7c3a8fd3e4dbf6c0c4363a943d72f5b" args="()" -->
+virtual <a class="el" href="classTiXmlText.html">TiXmlText</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlText.html#e7c3a8fd3e4dbf6c0c4363a943d72f5b">ToText</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cast to a more defined type. Will return null not of the requested type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="8483d4415ce9de6c4fa8f63d067d5de6"></a><!-- doxytag: member="TiXmlText::Accept" ref="8483d4415ce9de6c4fa8f63d067d5de6" args="(TiXmlVisitor *content) const " -->
+virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlText.html#8483d4415ce9de6c4fa8f63d067d5de6">Accept</a> (<a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a> *content) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Walk the XML tree visiting this node and all of its children. <br></td></tr>
+<tr><td colspan="2"><br><h2>Protected Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0c411e93a27537369479d034cc82da3b"></a><!-- doxytag: member="TiXmlText::Clone" ref="0c411e93a27537369479d034cc82da3b" args="() const " -->
+virtual <a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlText.html#0c411e93a27537369479d034cc82da3b">Clone</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">[internal use] Creates a new Element and returns it. <br></td></tr>
+<tr><td colspan="2"><br><h2>Friends</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b6592e32cb9132be517cc12a70564c4b"></a><!-- doxytag: member="TiXmlText::TiXmlElement" ref="b6592e32cb9132be517cc12a70564c4b" args="" -->
+class&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlText.html#b6592e32cb9132be517cc12a70564c4b">TiXmlElement</a></td></tr>
+
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+XML text. 
+<p>
+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 <a class="el" href="classTiXmlText.html#cb17ff7c5d09b2c839393445a3de5ea9">SetCDATA()</a> and query it with <a class="el" href="classTiXmlText.html#d1a6a6b83fa2271022dd97c072a2b586">CDATA()</a>. 
+<p>
+<hr><h2>Constructor &amp; Destructor Documentation</h2>
+<a class="anchor" name="f659e77c6b87d684827f35a8f4895960"></a><!-- doxytag: member="TiXmlText::TiXmlText" ref="f659e77c6b87d684827f35a8f4895960" args="(const char *initValue)" -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">TiXmlText::TiXmlText           </td>
+          <td>(</td>
+          <td class="paramtype">const char *&nbsp;</td>
+          <td class="paramname"> <em>initValue</em>          </td>
+          <td>&nbsp;)&nbsp;</td>
+          <td width="100%"><code> [inline]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+Constructor for text element. 
+<p>
+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' 
+</div>
+</div><p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="0cafbf6f236c7f02d12b2bffc2b7976b"></a><!-- doxytag: member="TiXmlText::Print" ref="0cafbf6f236c7f02d12b2bffc2b7976b" args="(FILE *cfile, int depth) const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">virtual void TiXmlText::Print           </td>
+          <td>(</td>
+          <td class="paramtype">FILE *&nbsp;</td>
+          <td class="paramname"> <em>cfile</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&nbsp;</td>
+          <td class="paramname"> <em>depth</em></td><td>&nbsp;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"> const<code> [virtual]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode. 
+<p>
+) Either or both cfile and str can be null.<p>
+This is a formatted print, and will insert tabs and newlines.<p>
+(For an unformatted stream, use the &lt;&lt; operator.) 
+<p>
+Implements <a class="el" href="classTiXmlBase.html#0de56b3f2ef14c65091a3b916437b512">TiXmlBase</a>.
+</div>
+</div><p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="tinyxml_8h-source.html">tinyxml.h</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
Binary file src/tinyxml/docs/classTiXmlText.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/classTiXmlUnknown-members.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,98 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: Member List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<h1>TiXmlUnknown Member List</h1>This is the complete list of members for <a class="el" href="classTiXmlUnknown.html">TiXmlUnknown</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="classTiXmlUnknown.html#d7122e5135581b3c832a1a3217760a93">Accept</a>(TiXmlVisitor *content) const </td><td><a class="el" href="classTiXmlUnknown.html">TiXmlUnknown</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#708e7f953df61d4d2d12f73171550a4b">Clear</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlUnknown.html#0960bb7428b3f341da46244229604d73">Clone</a>() const </td><td><a class="el" href="classTiXmlUnknown.html">TiXmlUnknown</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#b54bfb9b70fe6dd276e7b279cab7f003">Column</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#6bd8c315c1acb09e34107b8736505948">EncodeString</a>(const TIXML_STRING &amp;str, TIXML_STRING *out)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#44c8eee26bbe2d1b2762038df9dde2f0">FirstChild</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1f05828d023150706eeb16d6fb3f6355">FirstChild</a>(const char *value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#bc8bf32be6419ec453a731868de19554">FirstChild</a>(const char *_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#07f6200a5956c723c5b52d70f29c46f6">FirstChild</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#10d2669ccb5e29e02fcb0e4408685ef6">FirstChild</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#f4fb652f6bd79ae0d5ce7d0f7d3c0fba">FirstChildElement</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#ccda2c6b45c25bb5a6f9c3407a644e61">FirstChildElement</a>(const char *_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#327ad4bbd90073c5dfc931b07314f5f7">FirstChildElement</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#7f1d7291880534c1e5cdeb392d8c1f45">FirstChildElement</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#80e397fa973cf5323e33b07154b024f3">GetDocument</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#6559a530ca6763fc301a14d77ed28c17">GetUserData</a>()</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#d0120210e4680ef2088601753ce0ede4">GetUserData</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#d9b75e54ec19301c8b4d5ff583d0b3d5">InsertAfterChild</a>(TiXmlNode *afterThis, const TiXmlNode &amp;addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#0c146fa2fff0157b681594102f48cbc7">InsertBeforeChild</a>(TiXmlNode *beforeThis, const TiXmlNode &amp;addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#d7d4630e1a2a916edda16be22448a8ba">InsertEndChild</a>(const TiXmlNode &amp;addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#d4b1472531c647a25b1840a87ae42438">IsWhiteSpaceCondensed</a>()</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#8621196ba3705fa226bef4a761cc51b6">IterateChildren</a>(const TiXmlNode *previous) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#dfaef35a076b9343adc1420757376c39">IterateChildren</a>(const char *value, const TiXmlNode *previous) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1cbaaf8e82c09ad763d52616d75724df">IterateChildren</a>(const std::string &amp;_value, const TiXmlNode *previous) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#16e9ad53e2f5445b14bf325c90aa862c">IterateChildren</a>(const std::string &amp;_value, const TiXmlNode *previous)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#6432d2b2495f6caf9cb4278df706a031">LastChild</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#bad5bf1059c48127b958711ef89e8e5d">LastChild</a>(const char *_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#256d0cdbfcfeccae83f3a1c9747a8b63">LastChild</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#69772c9202f70553f940b15c06b07be3">LastChild</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#5d29442ae46de6d0168429156197bfc6">LinkEndChild</a>(TiXmlNode *addThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1b94d2f7fa7ab25a5a8e8d4340c449c9">NextSibling</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#1757c1f4d01e8c9596ffdbd561c76aea">NextSibling</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#f854baeba384f5fe9859f5aee03b548e">NextSibling</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#2e61c0b89a77e36a0e8c60490003cb46">NextSibling</a>(const char *) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#73acf929d49d10bd0e5fb3d31b0372d1">NextSiblingElement</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#071ba77fd7ab79402fa84b7e9b8607b3">NextSiblingElement</a>(const char *) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#7572d0af9d1e696ee3f05d8bb5ebb463">NextSiblingElement</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#506958e34406729a4e4c5326ea39d081">NextSiblingElement</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#eed21ad30630ef6e7faf096127edc9f3">NoChildren</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#836eded4920ab9e9ef28496f48cd95a2">NodeType</a> enum name</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#86cd49cfb17a844c0010b3136ac966c7">operator&lt;&lt;</a>(std::ostream &amp;out, const TiXmlNode &amp;base)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#52ef17e7080df2490cf87bde380685ab">operator&lt;&lt;</a>(std::string &amp;out, const TiXmlNode &amp;base)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#b57bd426563c926844f65a78412e18b9">operator&gt;&gt;</a>(std::istream &amp;in, TiXmlNode &amp;base)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [friend]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#b643043132ffd794f8602685d34a982e">Parent</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#c2cd892768726270e511b2ab32de4d10">PreviousSibling</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#5bdd49327eec1e609b7d22af706b8316">PreviousSibling</a>(const char *) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#658276f57d35d5d4256d1dc1a2c398ab">PreviousSibling</a>(const std::string &amp;_value) const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#cc8a0434c7f401d4a3b6dee77c1a5912">PreviousSibling</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlUnknown.html#31ba089a40fb5a1869750fce09b0bacb">Print</a>(FILE *cfile, int depth) const </td><td><a class="el" href="classTiXmlUnknown.html">TiXmlUnknown</a></td><td><code> [virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#e19d8510efc90596552f4feeac9a8fbf">RemoveChild</a>(TiXmlNode *removeThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#0c49e739a17b9938050c22cd89617fbd">ReplaceChild</a>(TiXmlNode *replaceThis, const TiXmlNode &amp;withThis)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#024bceb070188df92c2a8d8852dd0853">Row</a>() const </td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#0f799ec645bfb8d8a969e83478f379c1">SetCondenseWhiteSpace</a>(bool condense)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline, static]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#c6b3e0f790930d4970ec30764e937b5d">SetUserData</a>(void *user)</td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#2a38329ca5d3f28f98ce932b8299ae90">SetValue</a>(const char *_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#2598d5f448042c1abbeae4503dd45ff2">SetValue</a>(const std::string &amp;_value)</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#a0a5086f9eaee910bbfdc7f975e26574">ToComment</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#383e06a0787f7063953934867990f849">ToComment</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#9f43e6984fc7d4afd6eb32714c6b7b72">ToDeclaration</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#4027136ca820ff4a636b607231b6a6df">ToDeclaration</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#8a4cda4b15c29f64cff419309aebed08">ToDocument</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#6a4c8ac28ee7a745d059db6691e03bae">ToDocument</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#72abed96dc9667ab9e0a2a275301bb1c">ToElement</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#a65d000223187d22a4dcebd7479e9ebc">ToElement</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#95a46a52c525992d6b4ee08beb14cd69">ToText</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#3ddfbcac78fbea041fad57e5c6d60a03">ToText</a>()</td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlUnknown.html#b0313e5fe77987d746ac1a97a254419d">ToUnknown</a>() const </td><td><a class="el" href="classTiXmlUnknown.html">TiXmlUnknown</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlUnknown.html#67c9fd22940e8c47f706a72cdd2e332c">ToUnknown</a>()</td><td><a class="el" href="classTiXmlUnknown.html">TiXmlUnknown</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#57b99d5c97d67a42b9752f5210a1ba5e">Type</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlBase.html#b242c01590191f644569fa89a080d97c">userData</a></td><td><a class="el" href="classTiXmlBase.html">TiXmlBase</a></td><td><code> [protected]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#77943eb90d12c2892b1337a9f5918b41">Value</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlNode.html#6d9e505619d39bf50bfd9609c9169ea5">ValueStr</a>() const </td><td><a class="el" href="classTiXmlNode.html">TiXmlNode</a></td><td><code> [inline]</code></td></tr>
+</table><hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/classTiXmlUnknown.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,103 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: TiXmlUnknown Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<h1>TiXmlUnknown Class Reference</h1><!-- doxytag: class="TiXmlUnknown" --><!-- doxytag: inherits="TiXmlNode" -->Any tag that tinyXml doesn't recognize is saved as an unknown.  
+<a href="#_details">More...</a>
+<p>
+<code>#include &lt;<a class="el" href="tinyxml_8h-source.html">tinyxml.h</a>&gt;</code>
+<p>
+<p>Inheritance diagram for TiXmlUnknown:
+<p><center><img src="classTiXmlUnknown.png" usemap="#TiXmlUnknown_map" border="0" alt=""></center>
+<map name="TiXmlUnknown_map">
+<area href="classTiXmlNode.html" alt="TiXmlNode" shape="rect" coords="0,56,94,80">
+<area href="classTiXmlBase.html" alt="TiXmlBase" shape="rect" coords="0,0,94,24">
+</map>
+<a href="classTiXmlUnknown-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="0960bb7428b3f341da46244229604d73"></a><!-- doxytag: member="TiXmlUnknown::Clone" ref="0960bb7428b3f341da46244229604d73" args="() const " -->
+virtual <a class="el" href="classTiXmlNode.html">TiXmlNode</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlUnknown.html#0960bb7428b3f341da46244229604d73">Clone</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Creates a copy of this Unknown and returns it. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top">virtual void&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlUnknown.html#31ba089a40fb5a1869750fce09b0bacb">Print</a> (FILE *cfile, int depth) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode.  <a href="#31ba089a40fb5a1869750fce09b0bacb"></a><br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="b0313e5fe77987d746ac1a97a254419d"></a><!-- doxytag: member="TiXmlUnknown::ToUnknown" ref="b0313e5fe77987d746ac1a97a254419d" args="() const " -->
+virtual const <a class="el" href="classTiXmlUnknown.html">TiXmlUnknown</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlUnknown.html#b0313e5fe77987d746ac1a97a254419d">ToUnknown</a> () const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cast to a more defined type. Will return null not of the requested type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="67c9fd22940e8c47f706a72cdd2e332c"></a><!-- doxytag: member="TiXmlUnknown::ToUnknown" ref="67c9fd22940e8c47f706a72cdd2e332c" args="()" -->
+virtual <a class="el" href="classTiXmlUnknown.html">TiXmlUnknown</a> *&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlUnknown.html#67c9fd22940e8c47f706a72cdd2e332c">ToUnknown</a> ()</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Cast to a more defined type. Will return null not of the requested type. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="d7122e5135581b3c832a1a3217760a93"></a><!-- doxytag: member="TiXmlUnknown::Accept" ref="d7122e5135581b3c832a1a3217760a93" args="(TiXmlVisitor *content) const " -->
+virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlUnknown.html#d7122e5135581b3c832a1a3217760a93">Accept</a> (<a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a> *content) const </td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Walk the XML tree visiting this node and all of its children. <br></td></tr>
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+Any tag that tinyXml doesn't recognize is saved as an unknown. 
+<p>
+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.<p>
+DTD tags get thrown into TiXmlUnknowns. 
+<p>
+<hr><h2>Member Function Documentation</h2>
+<a class="anchor" name="31ba089a40fb5a1869750fce09b0bacb"></a><!-- doxytag: member="TiXmlUnknown::Print" ref="31ba089a40fb5a1869750fce09b0bacb" args="(FILE *cfile, int depth) const " -->
+<div class="memitem">
+<div class="memproto">
+      <table class="memname">
+        <tr>
+          <td class="memname">virtual void TiXmlUnknown::Print           </td>
+          <td>(</td>
+          <td class="paramtype">FILE *&nbsp;</td>
+          <td class="paramname"> <em>cfile</em>, </td>
+        </tr>
+        <tr>
+          <td class="paramkey"></td>
+          <td></td>
+          <td class="paramtype">int&nbsp;</td>
+          <td class="paramname"> <em>depth</em></td><td>&nbsp;</td>
+        </tr>
+        <tr>
+          <td></td>
+          <td>)</td>
+          <td></td><td></td><td width="100%"> const<code> [virtual]</code></td>
+        </tr>
+      </table>
+</div>
+<div class="memdoc">
+
+<p>
+All TinyXml classes can print themselves to a filestream or the string class (TiXmlString in non-STL mode, std::string in STL mode. 
+<p>
+) Either or both cfile and str can be null.<p>
+This is a formatted print, and will insert tabs and newlines.<p>
+(For an unformatted stream, use the &lt;&lt; operator.) 
+<p>
+Implements <a class="el" href="classTiXmlBase.html#0de56b3f2ef14c65091a3b916437b512">TiXmlBase</a>.
+</div>
+</div><p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="tinyxml_8h-source.html">tinyxml.h</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
Binary file src/tinyxml/docs/classTiXmlUnknown.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/classTiXmlVisitor-members.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,34 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: Member List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<h1>TiXmlVisitor Member List</h1>This is the complete list of members for <a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a>, including all inherited members.<p><table>
+  <tr class="memlist"><td><a class="el" href="classTiXmlVisitor.html#fad71c71ce6473fb9b4b64cd92de4a19">Visit</a>(const TiXmlDeclaration &amp;)</td><td><a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlVisitor.html#399b8ebca5cd14664974a32d2ce029e5">Visit</a>(const TiXmlText &amp;)</td><td><a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlVisitor.html#53a60e7a528627b31af3161972cc7fa2">Visit</a>(const TiXmlComment &amp;)</td><td><a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlVisitor.html#7e284d607d275c51dac1adb58159ce28">Visit</a>(const TiXmlUnknown &amp;)</td><td><a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlVisitor.html#07baecb52dd7d8716ae2a48ad0956ee0">VisitEnter</a>(const TiXmlDocument &amp;)</td><td><a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlVisitor.html#f6c6178ffa517bbdba95d70490875fff">VisitEnter</a>(const TiXmlElement &amp;, const TiXmlAttribute *)</td><td><a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlVisitor.html#a0ade4f27087447e93974e975c3246ad">VisitExit</a>(const TiXmlDocument &amp;)</td><td><a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a></td><td><code> [inline, virtual]</code></td></tr>
+  <tr class="memlist"><td><a class="el" href="classTiXmlVisitor.html#ec2b1f8116226d52f3a1b95dafd3a32c">VisitExit</a>(const TiXmlElement &amp;)</td><td><a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a></td><td><code> [inline, virtual]</code></td></tr>
+</table><hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/classTiXmlVisitor.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,84 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: TiXmlVisitor Class Reference</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<h1>TiXmlVisitor Class Reference</h1><!-- doxytag: class="TiXmlVisitor" -->If you call the Accept() method, it requires being passed a <a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a> class to handle callbacks.  
+<a href="#_details">More...</a>
+<p>
+<code>#include &lt;<a class="el" href="tinyxml_8h-source.html">tinyxml.h</a>&gt;</code>
+<p>
+<p>Inheritance diagram for TiXmlVisitor:
+<p><center><img src="classTiXmlVisitor.png" usemap="#TiXmlVisitor_map" border="0" alt=""></center>
+<map name="TiXmlVisitor_map">
+<area href="classTiXmlPrinter.html" alt="TiXmlPrinter" shape="rect" coords="0,56,81,80">
+</map>
+<a href="classTiXmlVisitor-members.html">List of all members.</a><table border="0" cellpadding="0" cellspacing="0">
+<tr><td></td></tr>
+<tr><td colspan="2"><br><h2>Public Member Functions</h2></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="07baecb52dd7d8716ae2a48ad0956ee0"></a><!-- doxytag: member="TiXmlVisitor::VisitEnter" ref="07baecb52dd7d8716ae2a48ad0956ee0" args="(const TiXmlDocument &amp;)" -->
+virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlVisitor.html#07baecb52dd7d8716ae2a48ad0956ee0">VisitEnter</a> (const <a class="el" href="classTiXmlDocument.html">TiXmlDocument</a> &amp;)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Visit a document. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="a0ade4f27087447e93974e975c3246ad"></a><!-- doxytag: member="TiXmlVisitor::VisitExit" ref="a0ade4f27087447e93974e975c3246ad" args="(const TiXmlDocument &amp;)" -->
+virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlVisitor.html#a0ade4f27087447e93974e975c3246ad">VisitExit</a> (const <a class="el" href="classTiXmlDocument.html">TiXmlDocument</a> &amp;)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Visit a document. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="f6c6178ffa517bbdba95d70490875fff"></a><!-- doxytag: member="TiXmlVisitor::VisitEnter" ref="f6c6178ffa517bbdba95d70490875fff" args="(const TiXmlElement &amp;, const TiXmlAttribute *)" -->
+virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlVisitor.html#f6c6178ffa517bbdba95d70490875fff">VisitEnter</a> (const <a class="el" href="classTiXmlElement.html">TiXmlElement</a> &amp;, const <a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a> *)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Visit an element. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="ec2b1f8116226d52f3a1b95dafd3a32c"></a><!-- doxytag: member="TiXmlVisitor::VisitExit" ref="ec2b1f8116226d52f3a1b95dafd3a32c" args="(const TiXmlElement &amp;)" -->
+virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlVisitor.html#ec2b1f8116226d52f3a1b95dafd3a32c">VisitExit</a> (const <a class="el" href="classTiXmlElement.html">TiXmlElement</a> &amp;)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Visit an element. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="fad71c71ce6473fb9b4b64cd92de4a19"></a><!-- doxytag: member="TiXmlVisitor::Visit" ref="fad71c71ce6473fb9b4b64cd92de4a19" args="(const TiXmlDeclaration &amp;)" -->
+virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlVisitor.html#fad71c71ce6473fb9b4b64cd92de4a19">Visit</a> (const <a class="el" href="classTiXmlDeclaration.html">TiXmlDeclaration</a> &amp;)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Visit a declaration. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="399b8ebca5cd14664974a32d2ce029e5"></a><!-- doxytag: member="TiXmlVisitor::Visit" ref="399b8ebca5cd14664974a32d2ce029e5" args="(const TiXmlText &amp;)" -->
+virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlVisitor.html#399b8ebca5cd14664974a32d2ce029e5">Visit</a> (const <a class="el" href="classTiXmlText.html">TiXmlText</a> &amp;)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Visit a text node. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="53a60e7a528627b31af3161972cc7fa2"></a><!-- doxytag: member="TiXmlVisitor::Visit" ref="53a60e7a528627b31af3161972cc7fa2" args="(const TiXmlComment &amp;)" -->
+virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlVisitor.html#53a60e7a528627b31af3161972cc7fa2">Visit</a> (const <a class="el" href="classTiXmlComment.html">TiXmlComment</a> &amp;)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Visit a comment node. <br></td></tr>
+<tr><td class="memItemLeft" nowrap align="right" valign="top"><a class="anchor" name="7e284d607d275c51dac1adb58159ce28"></a><!-- doxytag: member="TiXmlVisitor::Visit" ref="7e284d607d275c51dac1adb58159ce28" args="(const TiXmlUnknown &amp;)" -->
+virtual bool&nbsp;</td><td class="memItemRight" valign="bottom"><a class="el" href="classTiXmlVisitor.html#7e284d607d275c51dac1adb58159ce28">Visit</a> (const <a class="el" href="classTiXmlUnknown.html">TiXmlUnknown</a> &amp;)</td></tr>
+
+<tr><td class="mdescLeft">&nbsp;</td><td class="mdescRight">Visit an unknow node. <br></td></tr>
+</table>
+<hr><a name="_details"></a><h2>Detailed Description</h2>
+If you call the Accept() method, it requires being passed a <a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a> class to handle callbacks. 
+<p>
+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 <a class="el" href="classTiXmlVisitor.html#fad71c71ce6473fb9b4b64cd92de4a19">Visit()</a>.<p>
+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.<p>
+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.<p>
+Generally Accept() is called on the <a class="el" href="classTiXmlDocument.html">TiXmlDocument</a>, although all nodes suppert Visiting.<p>
+You should never change the document from a callback.<p>
+<dl compact><dt><b>See also:</b></dt><dd><a class="el" href="classTiXmlNode.html#cc0f88b7462c6cb73809d410a4f5bb86">TiXmlNode::Accept()</a> </dd></dl>
+
+<p>
+<hr>The documentation for this class was generated from the following file:<ul>
+<li><a class="el" href="tinyxml_8h-source.html">tinyxml.h</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
Binary file src/tinyxml/docs/classTiXmlVisitor.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/deprecated.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,38 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: Deprecated List</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<h1><a class="anchor" name="deprecated">Deprecated List</a></h1><a class="anchor" name="_deprecated000002"></a> <dl>
+<dt>Member <a class="el" href="classTiXmlHandle.html#cb5fe8388a526289ea65e817a51e05e7">TiXmlHandle::Element</a> () const  </dt>
+<dd>use ToElement. Return the handle as a <a class="el" href="classTiXmlElement.html">TiXmlElement</a>. This may return null. </dd>
+</dl>
+<p>
+<a class="anchor" name="_deprecated000001"></a> <dl>
+<dt>Member <a class="el" href="classTiXmlHandle.html#b44b723a8dc9af72838a303c079d0376">TiXmlHandle::Node</a> () const  </dt>
+<dd>use ToNode. Return the handle as a <a class="el" href="classTiXmlNode.html">TiXmlNode</a>. This may return null. </dd>
+</dl>
+<p>
+<a class="anchor" name="_deprecated000003"></a> <dl>
+<dt>Member <a class="el" href="classTiXmlHandle.html#9fc739c8a18d160006f82572fc143d13">TiXmlHandle::Text</a> () const  </dt>
+<dd>use ToText() Return the handle as a <a class="el" href="classTiXmlText.html">TiXmlText</a>. This may return null. </dd>
+</dl>
+<p>
+<a class="anchor" name="_deprecated000004"></a> <dl>
+<dt>Member <a class="el" href="classTiXmlHandle.html#49675b74357ba2aae124657a9a1ef465">TiXmlHandle::Unknown</a> () const  </dt>
+<dd>use ToUnknown() Return the handle as a <a class="el" href="classTiXmlUnknown.html">TiXmlUnknown</a>. This may return null. </dd>
+</dl>
+<hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/doxygen.css	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,358 @@
+BODY,H1,H2,H3,H4,H5,H6,P,CENTER,TD,TH,UL,DL,DIV {
+	font-family: Geneva, Arial, Helvetica, sans-serif;
+}
+BODY,TD {
+       font-size: 90%;
+}
+H1 {
+	text-align: center;
+       font-size: 160%;
+}
+H2 {
+       font-size: 120%;
+}
+H3 {
+       font-size: 100%;
+}
+CAPTION { font-weight: bold }
+DIV.qindex {
+	width: 100%;
+	background-color: #e8eef2;
+	border: 1px solid #84b0c7;
+	text-align: center;
+	margin: 2px;
+	padding: 2px;
+	line-height: 140%;
+}
+DIV.nav {
+	width: 100%;
+	background-color: #e8eef2;
+	border: 1px solid #84b0c7;
+	text-align: center;
+	margin: 2px;
+	padding: 2px;
+	line-height: 140%;
+}
+DIV.navtab {
+       background-color: #e8eef2;
+       border: 1px solid #84b0c7;
+       text-align: center;
+       margin: 2px;
+       margin-right: 15px;
+       padding: 2px;
+}
+TD.navtab {
+       font-size: 70%;
+}
+A.qindex {
+       text-decoration: none;
+       font-weight: bold;
+       color: #1A419D;
+}
+A.qindex:visited {
+       text-decoration: none;
+       font-weight: bold;
+       color: #1A419D
+}
+A.qindex:hover {
+	text-decoration: none;
+	background-color: #ddddff;
+}
+A.qindexHL {
+	text-decoration: none;
+	font-weight: bold;
+	background-color: #6666cc;
+	color: #ffffff;
+	border: 1px double #9295C2;
+}
+A.qindexHL:hover {
+	text-decoration: none;
+	background-color: #6666cc;
+	color: #ffffff;
+}
+A.qindexHL:visited { text-decoration: none; background-color: #6666cc; color: #ffffff }
+A.el { text-decoration: none; font-weight: bold }
+A.elRef { font-weight: bold }
+A.code:link { text-decoration: none; font-weight: normal; color: #0000FF}
+A.code:visited { text-decoration: none; font-weight: normal; color: #0000FF}
+A.codeRef:link { font-weight: normal; color: #0000FF}
+A.codeRef:visited { font-weight: normal; color: #0000FF}
+A:hover { text-decoration: none; background-color: #f2f2ff }
+DL.el { margin-left: -1cm }
+.fragment {
+       font-family: monospace, fixed;
+       font-size: 95%;
+}
+PRE.fragment {
+	border: 1px solid #CCCCCC;
+	background-color: #f5f5f5;
+	margin-top: 4px;
+	margin-bottom: 4px;
+	margin-left: 2px;
+	margin-right: 8px;
+	padding-left: 6px;
+	padding-right: 6px;
+	padding-top: 4px;
+	padding-bottom: 4px;
+}
+DIV.ah { background-color: black; font-weight: bold; color: #ffffff; margin-bottom: 3px; margin-top: 3px }
+
+DIV.groupHeader {
+       margin-left: 16px;
+       margin-top: 12px;
+       margin-bottom: 6px;
+       font-weight: bold;
+}
+DIV.groupText { margin-left: 16px; font-style: italic; font-size: 90% }
+BODY {
+	background: white;
+	color: black;
+	margin-right: 20px;
+	margin-left: 20px;
+}
+TD.indexkey {
+	background-color: #e8eef2;
+	font-weight: bold;
+	padding-right  : 10px;
+	padding-top    : 2px;
+	padding-left   : 10px;
+	padding-bottom : 2px;
+	margin-left    : 0px;
+	margin-right   : 0px;
+	margin-top     : 2px;
+	margin-bottom  : 2px;
+	border: 1px solid #CCCCCC;
+}
+TD.indexvalue {
+	background-color: #e8eef2;
+	font-style: italic;
+	padding-right  : 10px;
+	padding-top    : 2px;
+	padding-left   : 10px;
+	padding-bottom : 2px;
+	margin-left    : 0px;
+	margin-right   : 0px;
+	margin-top     : 2px;
+	margin-bottom  : 2px;
+	border: 1px solid #CCCCCC;
+}
+TR.memlist {
+   background-color: #f0f0f0; 
+}
+P.formulaDsp { text-align: center; }
+IMG.formulaDsp { }
+IMG.formulaInl { vertical-align: middle; }
+SPAN.keyword       { color: #008000 }
+SPAN.keywordtype   { color: #604020 }
+SPAN.keywordflow   { color: #e08000 }
+SPAN.comment       { color: #800000 }
+SPAN.preprocessor  { color: #806020 }
+SPAN.stringliteral { color: #002080 }
+SPAN.charliteral   { color: #008080 }
+.mdescLeft {
+       padding: 0px 8px 4px 8px;
+	font-size: 80%;
+	font-style: italic;
+	background-color: #FAFAFA;
+	border-top: 1px none #E0E0E0;
+	border-right: 1px none #E0E0E0;
+	border-bottom: 1px none #E0E0E0;
+	border-left: 1px none #E0E0E0;
+	margin: 0px;
+}
+.mdescRight {
+       padding: 0px 8px 4px 8px;
+	font-size: 80%;
+	font-style: italic;
+	background-color: #FAFAFA;
+	border-top: 1px none #E0E0E0;
+	border-right: 1px none #E0E0E0;
+	border-bottom: 1px none #E0E0E0;
+	border-left: 1px none #E0E0E0;
+	margin: 0px;
+}
+.memItemLeft {
+	padding: 1px 0px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: solid;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-size: 80%;
+}
+.memItemRight {
+	padding: 1px 8px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: solid;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-size: 80%;
+}
+.memTemplItemLeft {
+	padding: 1px 0px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: none;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-size: 80%;
+}
+.memTemplItemRight {
+	padding: 1px 8px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: none;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+	background-color: #FAFAFA;
+	font-size: 80%;
+}
+.memTemplParams {
+	padding: 1px 0px 0px 8px;
+	margin: 4px;
+	border-top-width: 1px;
+	border-right-width: 1px;
+	border-bottom-width: 1px;
+	border-left-width: 1px;
+	border-top-color: #E0E0E0;
+	border-right-color: #E0E0E0;
+	border-bottom-color: #E0E0E0;
+	border-left-color: #E0E0E0;
+	border-top-style: solid;
+	border-right-style: none;
+	border-bottom-style: none;
+	border-left-style: none;
+       color: #606060;
+	background-color: #FAFAFA;
+	font-size: 80%;
+}
+.search     { color: #003399;
+              font-weight: bold;
+}
+FORM.search {
+              margin-bottom: 0px;
+              margin-top: 0px;
+}
+INPUT.search { font-size: 75%;
+               color: #000080;
+               font-weight: normal;
+               background-color: #e8eef2;
+}
+TD.tiny      { font-size: 75%;
+}
+a {
+	color: #1A41A8;
+}
+a:visited {
+	color: #2A3798;
+}
+.dirtab { padding: 4px;
+          border-collapse: collapse;
+          border: 1px solid #84b0c7;
+}
+TH.dirtab { background: #e8eef2;
+            font-weight: bold;
+}
+HR { height: 1px;
+     border: none;
+     border-top: 1px solid black;
+}
+
+/* Style for detailed member documentation */
+.memtemplate {
+  font-size: 80%;
+  color: #606060;
+  font-weight: normal;
+} 
+.memnav { 
+  background-color: #e8eef2;
+  border: 1px solid #84b0c7;
+  text-align: center;
+  margin: 2px;
+  margin-right: 15px;
+  padding: 2px;
+}
+.memitem {
+  padding: 4px;
+  background-color: #eef3f5;
+  border-width: 1px;
+  border-style: solid;
+  border-color: #dedeee;
+  -moz-border-radius: 8px 8px 8px 8px;
+}
+.memname {
+  white-space: nowrap;
+  font-weight: bold;
+}
+.memdoc{
+  padding-left: 10px;
+}
+.memproto {
+  background-color: #d5e1e8;
+  width: 100%;
+  border-width: 1px;
+  border-style: solid;
+  border-color: #84b0c7;
+  font-weight: bold;
+  -moz-border-radius: 8px 8px 8px 8px;
+}
+.paramkey {
+  text-align: right;
+}
+.paramtype {
+  white-space: nowrap;
+}
+.paramname {
+  color: #602020;
+  font-style: italic;
+}
+/* End Styling for detailed member documentation */
+
+/* for the tree view */
+.ftvtree {
+	font-family: sans-serif;
+	margin:0.5em;
+}
+.directory { font-size: 9pt; font-weight: bold; }
+.directory h3 { margin: 0px; margin-top: 1em; font-size: 11pt; }
+.directory > h3 { margin-top: 0; }
+.directory p { margin: 0px; white-space: nowrap; }
+.directory div { display: none; margin: 0px; }
+.directory img { vertical-align: -30%; }
+
Binary file src/tinyxml/docs/doxygen.png has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/files.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: File Index</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li><a href="annotated.html"><span>Classes</span></a></li>
+    <li id="current"><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<h1>TinyXml File List</h1>Here is a list of all documented files with brief descriptions:<table>
+  <tr><td class="indexkey"><b>tinystr.h</b> <a href="tinystr_8h-source.html">[code]</a></td><td class="indexvalue"></td></tr>
+  <tr><td class="indexkey"><b>tinyxml.h</b> <a href="tinyxml_8h-source.html">[code]</a></td><td class="indexvalue"></td></tr>
+</table>
+<hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/functions.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,196 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: Class Members</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li id="current"><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li id="current"><a href="functions.html"><span>All</span></a></li>
+    <li><a href="functions_func.html"><span>Functions</span></a></li>
+    <li><a href="functions_vars.html"><span>Variables</span></a></li>
+    <li><a href="functions_enum.html"><span>Enumerations</span></a></li>
+    <li><a href="functions_rela.html"><span>Related&nbsp;Functions</span></a></li>
+  </ul>
+</div>
+<div class="tabs">
+  <ul>
+    <li><a href="#index_a"><span>a</span></a></li>
+    <li><a href="#index_c"><span>c</span></a></li>
+    <li><a href="#index_d"><span>d</span></a></li>
+    <li><a href="#index_e"><span>e</span></a></li>
+    <li><a href="#index_f"><span>f</span></a></li>
+    <li><a href="#index_g"><span>g</span></a></li>
+    <li><a href="#index_i"><span>i</span></a></li>
+    <li><a href="#index_l"><span>l</span></a></li>
+    <li><a href="#index_n"><span>n</span></a></li>
+    <li><a href="#index_o"><span>o</span></a></li>
+    <li><a href="#index_p"><span>p</span></a></li>
+    <li><a href="#index_q"><span>q</span></a></li>
+    <li><a href="#index_r"><span>r</span></a></li>
+    <li><a href="#index_s"><span>s</span></a></li>
+    <li><a href="#index_t"><span>t</span></a></li>
+    <li><a href="#index_u"><span>u</span></a></li>
+    <li><a href="#index_v"><span>v</span></a></li>
+  </ul>
+</div>
+
+<p>
+Here is a list of all documented class members with links to the class documentation for each member:
+<p>
+<h3><a class="anchor" name="index_a">- a -</a></h3><ul>
+<li>Accept()
+: <a class="el" href="classTiXmlDocument.html#a545aae325d9752ad64120bc4ecf939a">TiXmlDocument</a>, <a class="el" href="classTiXmlUnknown.html#d7122e5135581b3c832a1a3217760a93">TiXmlUnknown</a>, <a class="el" href="classTiXmlDeclaration.html#22315a535983b86535cdba3458669e3e">TiXmlDeclaration</a>, <a class="el" href="classTiXmlText.html#8483d4415ce9de6c4fa8f63d067d5de6">TiXmlText</a>, <a class="el" href="classTiXmlComment.html#f3ac1b99fbbe9ea4fb6e14146156e43e">TiXmlComment</a>, <a class="el" href="classTiXmlElement.html#71a81b2afb0d42be1543d1c404dee6f5">TiXmlElement</a>, <a class="el" href="classTiXmlNode.html#cc0f88b7462c6cb73809d410a4f5bb86">TiXmlNode</a><li>Attribute()
+: <a class="el" href="classTiXmlElement.html#eaff99d4f0ea5b34f7aee202aad457ba">TiXmlElement</a></ul>
+<h3><a class="anchor" name="index_c">- c -</a></h3><ul>
+<li>CDATA()
+: <a class="el" href="classTiXmlText.html#d1a6a6b83fa2271022dd97c072a2b586">TiXmlText</a><li>Child()
+: <a class="el" href="classTiXmlHandle.html#f9cf6a7d08a5da94a8924425ad0cd5ac">TiXmlHandle</a><li>ChildElement()
+: <a class="el" href="classTiXmlHandle.html#8786475b9d1f1518492e3a46704c7ef0">TiXmlHandle</a><li>Clear()
+: <a class="el" href="classTiXmlNode.html#708e7f953df61d4d2d12f73171550a4b">TiXmlNode</a><li>ClearError()
+: <a class="el" href="classTiXmlDocument.html#c66b8c28db86363315712a3574e87c35">TiXmlDocument</a><li>Clone()
+: <a class="el" href="classTiXmlDocument.html#4968661cab4a1f44a23329c6f8db1907">TiXmlDocument</a>, <a class="el" href="classTiXmlUnknown.html#0960bb7428b3f341da46244229604d73">TiXmlUnknown</a>, <a class="el" href="classTiXmlDeclaration.html#7cf459186040141cda7a180a6585ce2e">TiXmlDeclaration</a>, <a class="el" href="classTiXmlText.html#0c411e93a27537369479d034cc82da3b">TiXmlText</a>, <a class="el" href="classTiXmlComment.html#0d6662bdc52488b9e12b3c7a0453d028">TiXmlComment</a>, <a class="el" href="classTiXmlElement.html#a464535ea1994db337cb6a8ce4b588b5">TiXmlElement</a>, <a class="el" href="classTiXmlNode.html#4508cc3a2d7a98e96a54cc09c37a78a4">TiXmlNode</a><li>Column()
+: <a class="el" href="classTiXmlBase.html#b54bfb9b70fe6dd276e7b279cab7f003">TiXmlBase</a><li>CStr()
+: <a class="el" href="classTiXmlPrinter.html#859eede9597d3e0355b77757be48735e">TiXmlPrinter</a></ul>
+<h3><a class="anchor" name="index_d">- d -</a></h3><ul>
+<li>DoubleValue()
+: <a class="el" href="classTiXmlAttribute.html#2880ddef53fc7522c99535273954d230">TiXmlAttribute</a></ul>
+<h3><a class="anchor" name="index_e">- e -</a></h3><ul>
+<li>Element()
+: <a class="el" href="classTiXmlHandle.html#cb5fe8388a526289ea65e817a51e05e7">TiXmlHandle</a><li>EncodeString()
+: <a class="el" href="classTiXmlBase.html#6bd8c315c1acb09e34107b8736505948">TiXmlBase</a><li>Encoding()
+: <a class="el" href="classTiXmlDeclaration.html#5d974231f9e9a2f0542f15f3a46cdb76">TiXmlDeclaration</a><li>Error()
+: <a class="el" href="classTiXmlDocument.html#6dfc01a6e5d58e56acd537dfd3bdeb29">TiXmlDocument</a><li>ErrorCol()
+: <a class="el" href="classTiXmlDocument.html#a90bc630ee5203c6109ca5fad3323649">TiXmlDocument</a><li>ErrorDesc()
+: <a class="el" href="classTiXmlDocument.html#9d0f689f6e09ea494ea547be8d79c25e">TiXmlDocument</a><li>ErrorId()
+: <a class="el" href="classTiXmlDocument.html#f96fc2f3f9ec6422782bfe916c9e778f">TiXmlDocument</a><li>ErrorRow()
+: <a class="el" href="classTiXmlDocument.html#f30efc75e804aa2e92fb8be3a8cb676e">TiXmlDocument</a></ul>
+<h3><a class="anchor" name="index_f">- f -</a></h3><ul>
+<li>FirstAttribute()
+: <a class="el" href="classTiXmlElement.html#516054c9073647d6cb29b6abe9fa0592">TiXmlElement</a><li>FirstChild()
+: <a class="el" href="classTiXmlHandle.html#8c61f64ae9365d89c264f289085541f8">TiXmlHandle</a>, <a class="el" href="classTiXmlNode.html#10d2669ccb5e29e02fcb0e4408685ef6">TiXmlNode</a><li>FirstChildElement()
+: <a class="el" href="classTiXmlHandle.html#f0aea751320f5e430fac6f8fff3b8dd4">TiXmlHandle</a>, <a class="el" href="classTiXmlNode.html#7f1d7291880534c1e5cdeb392d8c1f45">TiXmlNode</a></ul>
+<h3><a class="anchor" name="index_g">- g -</a></h3><ul>
+<li>GetDocument()
+: <a class="el" href="classTiXmlNode.html#80e397fa973cf5323e33b07154b024f3">TiXmlNode</a><li>GetText()
+: <a class="el" href="classTiXmlElement.html#f3282294986cdb216646ea1f67af2c87">TiXmlElement</a><li>GetUserData()
+: <a class="el" href="classTiXmlBase.html#d0120210e4680ef2088601753ce0ede4">TiXmlBase</a></ul>
+<h3><a class="anchor" name="index_i">- i -</a></h3><ul>
+<li>Indent()
+: <a class="el" href="classTiXmlPrinter.html#bb33ec7d4bad6aaeb57f4304394b133d">TiXmlPrinter</a><li>InsertAfterChild()
+: <a class="el" href="classTiXmlNode.html#d9b75e54ec19301c8b4d5ff583d0b3d5">TiXmlNode</a><li>InsertBeforeChild()
+: <a class="el" href="classTiXmlNode.html#0c146fa2fff0157b681594102f48cbc7">TiXmlNode</a><li>InsertEndChild()
+: <a class="el" href="classTiXmlNode.html#d7d4630e1a2a916edda16be22448a8ba">TiXmlNode</a><li>IntValue()
+: <a class="el" href="classTiXmlAttribute.html#a1a20ad59dc7e89a0ab265396360d50f">TiXmlAttribute</a><li>IsWhiteSpaceCondensed()
+: <a class="el" href="classTiXmlBase.html#d4b1472531c647a25b1840a87ae42438">TiXmlBase</a><li>IterateChildren()
+: <a class="el" href="classTiXmlNode.html#16e9ad53e2f5445b14bf325c90aa862c">TiXmlNode</a></ul>
+<h3><a class="anchor" name="index_l">- l -</a></h3><ul>
+<li>LastAttribute()
+: <a class="el" href="classTiXmlElement.html#86191b49f9177be132b85b14655f1381">TiXmlElement</a><li>LastChild()
+: <a class="el" href="classTiXmlNode.html#69772c9202f70553f940b15c06b07be3">TiXmlNode</a><li>LineBreak()
+: <a class="el" href="classTiXmlPrinter.html#11f1b4804a460b175ec244eb5724d96d">TiXmlPrinter</a><li>LinkEndChild()
+: <a class="el" href="classTiXmlNode.html#5d29442ae46de6d0168429156197bfc6">TiXmlNode</a><li>LoadFile()
+: <a class="el" href="classTiXmlDocument.html#18ae6ed34fed7991ebc220862dfac884">TiXmlDocument</a></ul>
+<h3><a class="anchor" name="index_n">- n -</a></h3><ul>
+<li>Name()
+: <a class="el" href="classTiXmlAttribute.html#298a57287d305904ba6bd96ae6f78d3d">TiXmlAttribute</a><li>Next()
+: <a class="el" href="classTiXmlAttribute.html#1c78e92e223a40843f644ba48ef69f67">TiXmlAttribute</a><li>NextSibling()
+: <a class="el" href="classTiXmlNode.html#2e61c0b89a77e36a0e8c60490003cb46">TiXmlNode</a><li>NextSiblingElement()
+: <a class="el" href="classTiXmlNode.html#506958e34406729a4e4c5326ea39d081">TiXmlNode</a><li>NoChildren()
+: <a class="el" href="classTiXmlNode.html#eed21ad30630ef6e7faf096127edc9f3">TiXmlNode</a><li>Node()
+: <a class="el" href="classTiXmlHandle.html#b44b723a8dc9af72838a303c079d0376">TiXmlHandle</a><li>NodeType
+: <a class="el" href="classTiXmlNode.html#836eded4920ab9e9ef28496f48cd95a2">TiXmlNode</a></ul>
+<h3><a class="anchor" name="index_o">- o -</a></h3><ul>
+<li>operator&lt;&lt;
+: <a class="el" href="classTiXmlNode.html#52ef17e7080df2490cf87bde380685ab">TiXmlNode</a><li>operator&gt;&gt;
+: <a class="el" href="classTiXmlNode.html#b57bd426563c926844f65a78412e18b9">TiXmlNode</a></ul>
+<h3><a class="anchor" name="index_p">- p -</a></h3><ul>
+<li>Parent()
+: <a class="el" href="classTiXmlNode.html#b643043132ffd794f8602685d34a982e">TiXmlNode</a><li>Parse()
+: <a class="el" href="classTiXmlDocument.html#17ebabe36926ef398e78dec0d0ad0378">TiXmlDocument</a><li>Previous()
+: <a class="el" href="classTiXmlAttribute.html#6ebbfe333fe76cd834bd6cbcca3130cf">TiXmlAttribute</a><li>PreviousSibling()
+: <a class="el" href="classTiXmlNode.html#cc8a0434c7f401d4a3b6dee77c1a5912">TiXmlNode</a><li>Print()
+: <a class="el" href="classTiXmlDocument.html#8701fda1fa31b25abbc9c0df42da10e8">TiXmlDocument</a>, <a class="el" href="classTiXmlUnknown.html#31ba089a40fb5a1869750fce09b0bacb">TiXmlUnknown</a>, <a class="el" href="classTiXmlDeclaration.html#bf6303db4bd05b5be554036817ff1cb4">TiXmlDeclaration</a>, <a class="el" href="classTiXmlText.html#0cafbf6f236c7f02d12b2bffc2b7976b">TiXmlText</a>, <a class="el" href="classTiXmlComment.html#6b316527aaa8da0370cd68c22a5a0f5f">TiXmlComment</a>, <a class="el" href="classTiXmlElement.html#fbf52736e70fc91ec9d760721d6f4fd2">TiXmlElement</a>, <a class="el" href="classTiXmlAttribute.html#cc04956c1d5c4c31fe74f7a7528d109a">TiXmlAttribute</a>, <a class="el" href="classTiXmlBase.html#0de56b3f2ef14c65091a3b916437b512">TiXmlBase</a></ul>
+<h3><a class="anchor" name="index_q">- q -</a></h3><ul>
+<li>QueryDoubleAttribute()
+: <a class="el" href="classTiXmlElement.html#898d7730ecc341f0bffc7a9dadbf1ce7">TiXmlElement</a><li>QueryDoubleValue()
+: <a class="el" href="classTiXmlAttribute.html#c87b2a8489906a5d7aa2875f20be3513">TiXmlAttribute</a><li>QueryFloatAttribute()
+: <a class="el" href="classTiXmlElement.html#a04d3af11601ef5a5f88295203a843be">TiXmlElement</a><li>QueryIntAttribute()
+: <a class="el" href="classTiXmlElement.html#ea0bfe471380f281c5945770ddbf52b9">TiXmlElement</a><li>QueryIntValue()
+: <a class="el" href="classTiXmlAttribute.html#d6c93088ee21af41a107931223339344">TiXmlAttribute</a><li>QueryValueAttribute()
+: <a class="el" href="classTiXmlElement.html#e3b9a03b0a56663a40801c7256683576">TiXmlElement</a></ul>
+<h3><a class="anchor" name="index_r">- r -</a></h3><ul>
+<li>RemoveAttribute()
+: <a class="el" href="classTiXmlElement.html#1afa6aea716511326a608e4c05df4f3a">TiXmlElement</a><li>RemoveChild()
+: <a class="el" href="classTiXmlNode.html#e19d8510efc90596552f4feeac9a8fbf">TiXmlNode</a><li>ReplaceChild()
+: <a class="el" href="classTiXmlNode.html#0c49e739a17b9938050c22cd89617fbd">TiXmlNode</a><li>RootElement()
+: <a class="el" href="classTiXmlDocument.html#d09d17927f908f40efb406af2fb873be">TiXmlDocument</a><li>Row()
+: <a class="el" href="classTiXmlBase.html#024bceb070188df92c2a8d8852dd0853">TiXmlBase</a></ul>
+<h3><a class="anchor" name="index_s">- s -</a></h3><ul>
+<li>SaveFile()
+: <a class="el" href="classTiXmlDocument.html#3d4fae0463f3f03679ba0b7cf6f2df52">TiXmlDocument</a><li>SetAttribute()
+: <a class="el" href="classTiXmlElement.html#ce6f4be75e373726d4774073d666d1a7">TiXmlElement</a><li>SetCDATA()
+: <a class="el" href="classTiXmlText.html#cb17ff7c5d09b2c839393445a3de5ea9">TiXmlText</a><li>SetCondenseWhiteSpace()
+: <a class="el" href="classTiXmlBase.html#0f799ec645bfb8d8a969e83478f379c1">TiXmlBase</a><li>SetDoubleAttribute()
+: <a class="el" href="classTiXmlElement.html#0d1dd975d75496778177e35abfe0ec0b">TiXmlElement</a><li>SetDoubleValue()
+: <a class="el" href="classTiXmlAttribute.html#0316da31373496c4368ad549bf711394">TiXmlAttribute</a><li>SetIndent()
+: <a class="el" href="classTiXmlPrinter.html#213377a4070c7e625bae59716b089e5e">TiXmlPrinter</a><li>SetIntValue()
+: <a class="el" href="classTiXmlAttribute.html#7e065df640116a62ea4f4b7da5449cc8">TiXmlAttribute</a><li>SetLineBreak()
+: <a class="el" href="classTiXmlPrinter.html#4be1e37e69e3858c59635aa947174fe6">TiXmlPrinter</a><li>SetName()
+: <a class="el" href="classTiXmlAttribute.html#b296ff0c9a8c701055cd257a8a976e57">TiXmlAttribute</a><li>SetStreamPrinting()
+: <a class="el" href="classTiXmlPrinter.html#b23a90629e374cb1cadca090468bbd19">TiXmlPrinter</a><li>SetTabSize()
+: <a class="el" href="classTiXmlDocument.html#51dac56316f89b35bdb7d0d433ba988e">TiXmlDocument</a><li>SetUserData()
+: <a class="el" href="classTiXmlBase.html#c6b3e0f790930d4970ec30764e937b5d">TiXmlBase</a><li>SetValue()
+: <a class="el" href="classTiXmlAttribute.html#b43f67a0cc3ec1d80e62606500f0925f">TiXmlAttribute</a>, <a class="el" href="classTiXmlNode.html#2598d5f448042c1abbeae4503dd45ff2">TiXmlNode</a><li>Size()
+: <a class="el" href="classTiXmlPrinter.html#d01375ae9199bd2f48252eaddce3039d">TiXmlPrinter</a><li>Standalone()
+: <a class="el" href="classTiXmlDeclaration.html#9ff06afc033d7ef730ec7c6825b97ad9">TiXmlDeclaration</a><li>Str()
+: <a class="el" href="classTiXmlPrinter.html#3bd4daf44309b41f5813a833caa0d1c9">TiXmlPrinter</a></ul>
+<h3><a class="anchor" name="index_t">- t -</a></h3><ul>
+<li>Text()
+: <a class="el" href="classTiXmlHandle.html#9fc739c8a18d160006f82572fc143d13">TiXmlHandle</a><li>TiXmlAttribute()
+: <a class="el" href="classTiXmlAttribute.html#759d0b76fb8fcf765ecab243bc14f05e">TiXmlAttribute</a><li>TiXmlComment()
+: <a class="el" href="classTiXmlComment.html#37e7802ef17bc03ebe5ae79bf0713d47">TiXmlComment</a><li>TiXmlDeclaration()
+: <a class="el" href="classTiXmlDeclaration.html#3b618d1c30c25e4b7a71f31a595ee298">TiXmlDeclaration</a><li>TiXmlDocument()
+: <a class="el" href="classTiXmlDocument.html#2c6e58fb99bfa76cc613f16840022225">TiXmlDocument</a><li>TiXmlElement()
+: <a class="el" href="classTiXmlElement.html#40fc2e3c1a955e2f78e1a32350d180e7">TiXmlElement</a><li>TiXmlHandle()
+: <a class="el" href="classTiXmlHandle.html#236d7855e1e56ccc7b980630c48c7fd7">TiXmlHandle</a><li>TiXmlText()
+: <a class="el" href="classTiXmlText.html#439792f6183a3d3fb6f2bc2b16fa5691">TiXmlText</a><li>ToComment()
+: <a class="el" href="classTiXmlComment.html#cc7c7e07e13c23f17797d642981511df">TiXmlComment</a>, <a class="el" href="classTiXmlNode.html#383e06a0787f7063953934867990f849">TiXmlNode</a><li>ToDeclaration()
+: <a class="el" href="classTiXmlDeclaration.html#6bd3d1daddcaeb9543c24bfd090969ce">TiXmlDeclaration</a>, <a class="el" href="classTiXmlNode.html#4027136ca820ff4a636b607231b6a6df">TiXmlNode</a><li>ToDocument()
+: <a class="el" href="classTiXmlDocument.html#1025d942a1f328fd742d545e37efdd42">TiXmlDocument</a>, <a class="el" href="classTiXmlNode.html#6a4c8ac28ee7a745d059db6691e03bae">TiXmlNode</a><li>ToElement()
+: <a class="el" href="classTiXmlHandle.html#bc6e7ed383a5fe1e52b0c0004b457b9e">TiXmlHandle</a>, <a class="el" href="classTiXmlElement.html#9def86337ea7a755eb41cac980f60c7a">TiXmlElement</a>, <a class="el" href="classTiXmlNode.html#a65d000223187d22a4dcebd7479e9ebc">TiXmlNode</a><li>ToNode()
+: <a class="el" href="classTiXmlHandle.html#f678e5088e83be67baf76f699756f2c3">TiXmlHandle</a><li>ToText()
+: <a class="el" href="classTiXmlHandle.html#4ac53a652296203a5b5e13854d923586">TiXmlHandle</a>, <a class="el" href="classTiXmlText.html#e7c3a8fd3e4dbf6c0c4363a943d72f5b">TiXmlText</a>, <a class="el" href="classTiXmlNode.html#3ddfbcac78fbea041fad57e5c6d60a03">TiXmlNode</a><li>ToUnknown()
+: <a class="el" href="classTiXmlHandle.html#1381c17507a130767b1e23afc93b3674">TiXmlHandle</a>, <a class="el" href="classTiXmlUnknown.html#67c9fd22940e8c47f706a72cdd2e332c">TiXmlUnknown</a>, <a class="el" href="classTiXmlNode.html#06de5af852668c7e4af0d09c205f0b0d">TiXmlNode</a><li>Type()
+: <a class="el" href="classTiXmlNode.html#57b99d5c97d67a42b9752f5210a1ba5e">TiXmlNode</a></ul>
+<h3><a class="anchor" name="index_u">- u -</a></h3><ul>
+<li>Unknown()
+: <a class="el" href="classTiXmlHandle.html#49675b74357ba2aae124657a9a1ef465">TiXmlHandle</a><li>userData
+: <a class="el" href="classTiXmlBase.html#b242c01590191f644569fa89a080d97c">TiXmlBase</a></ul>
+<h3><a class="anchor" name="index_v">- v -</a></h3><ul>
+<li>Value()
+: <a class="el" href="classTiXmlAttribute.html#0f874490eac8ca00ee0070765d0e97e3">TiXmlAttribute</a>, <a class="el" href="classTiXmlNode.html#77943eb90d12c2892b1337a9f5918b41">TiXmlNode</a><li>ValueStr()
+: <a class="el" href="classTiXmlAttribute.html#87705c3ccf9ee9417beb4f7cbacd4d33">TiXmlAttribute</a>, <a class="el" href="classTiXmlNode.html#6d9e505619d39bf50bfd9609c9169ea5">TiXmlNode</a><li>Version()
+: <a class="el" href="classTiXmlDeclaration.html#02ee557b1a4545c3219ed377c103ec76">TiXmlDeclaration</a><li>Visit()
+: <a class="el" href="classTiXmlPrinter.html#d2dca6dd106e8982fd3c7db1f3330970">TiXmlPrinter</a>, <a class="el" href="classTiXmlVisitor.html#7e284d607d275c51dac1adb58159ce28">TiXmlVisitor</a><li>VisitEnter()
+: <a class="el" href="classTiXmlPrinter.html#0c5e7bf8622838417a0d0bfb8f433854">TiXmlPrinter</a>, <a class="el" href="classTiXmlVisitor.html#f6c6178ffa517bbdba95d70490875fff">TiXmlVisitor</a><li>VisitExit()
+: <a class="el" href="classTiXmlPrinter.html#1853cf2f6e63ad4b4232b4835e0acaf0">TiXmlPrinter</a>, <a class="el" href="classTiXmlVisitor.html#ec2b1f8116226d52f3a1b95dafd3a32c">TiXmlVisitor</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/functions_enum.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: Class Members - Enumerations</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li id="current"><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="functions.html"><span>All</span></a></li>
+    <li><a href="functions_func.html"><span>Functions</span></a></li>
+    <li><a href="functions_vars.html"><span>Variables</span></a></li>
+    <li id="current"><a href="functions_enum.html"><span>Enumerations</span></a></li>
+    <li><a href="functions_rela.html"><span>Related&nbsp;Functions</span></a></li>
+  </ul>
+</div>
+&nbsp;
+<p>
+<ul>
+<li>NodeType
+: <a class="el" href="classTiXmlNode.html#836eded4920ab9e9ef28496f48cd95a2">TiXmlNode</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/functions_func.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,189 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: Class Members - Functions</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li id="current"><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="functions.html"><span>All</span></a></li>
+    <li id="current"><a href="functions_func.html"><span>Functions</span></a></li>
+    <li><a href="functions_vars.html"><span>Variables</span></a></li>
+    <li><a href="functions_enum.html"><span>Enumerations</span></a></li>
+    <li><a href="functions_rela.html"><span>Related&nbsp;Functions</span></a></li>
+  </ul>
+</div>
+<div class="tabs">
+  <ul>
+    <li><a href="#index_a"><span>a</span></a></li>
+    <li><a href="#index_c"><span>c</span></a></li>
+    <li><a href="#index_d"><span>d</span></a></li>
+    <li><a href="#index_e"><span>e</span></a></li>
+    <li><a href="#index_f"><span>f</span></a></li>
+    <li><a href="#index_g"><span>g</span></a></li>
+    <li><a href="#index_i"><span>i</span></a></li>
+    <li><a href="#index_l"><span>l</span></a></li>
+    <li><a href="#index_n"><span>n</span></a></li>
+    <li><a href="#index_p"><span>p</span></a></li>
+    <li><a href="#index_q"><span>q</span></a></li>
+    <li><a href="#index_r"><span>r</span></a></li>
+    <li><a href="#index_s"><span>s</span></a></li>
+    <li><a href="#index_t"><span>t</span></a></li>
+    <li><a href="#index_u"><span>u</span></a></li>
+    <li><a href="#index_v"><span>v</span></a></li>
+  </ul>
+</div>
+
+<p>
+&nbsp;
+<p>
+<h3><a class="anchor" name="index_a">- a -</a></h3><ul>
+<li>Accept()
+: <a class="el" href="classTiXmlDocument.html#a545aae325d9752ad64120bc4ecf939a">TiXmlDocument</a>, <a class="el" href="classTiXmlUnknown.html#d7122e5135581b3c832a1a3217760a93">TiXmlUnknown</a>, <a class="el" href="classTiXmlDeclaration.html#22315a535983b86535cdba3458669e3e">TiXmlDeclaration</a>, <a class="el" href="classTiXmlText.html#8483d4415ce9de6c4fa8f63d067d5de6">TiXmlText</a>, <a class="el" href="classTiXmlComment.html#f3ac1b99fbbe9ea4fb6e14146156e43e">TiXmlComment</a>, <a class="el" href="classTiXmlElement.html#71a81b2afb0d42be1543d1c404dee6f5">TiXmlElement</a>, <a class="el" href="classTiXmlNode.html#cc0f88b7462c6cb73809d410a4f5bb86">TiXmlNode</a><li>Attribute()
+: <a class="el" href="classTiXmlElement.html#eaff99d4f0ea5b34f7aee202aad457ba">TiXmlElement</a></ul>
+<h3><a class="anchor" name="index_c">- c -</a></h3><ul>
+<li>CDATA()
+: <a class="el" href="classTiXmlText.html#d1a6a6b83fa2271022dd97c072a2b586">TiXmlText</a><li>Child()
+: <a class="el" href="classTiXmlHandle.html#f9cf6a7d08a5da94a8924425ad0cd5ac">TiXmlHandle</a><li>ChildElement()
+: <a class="el" href="classTiXmlHandle.html#8786475b9d1f1518492e3a46704c7ef0">TiXmlHandle</a><li>Clear()
+: <a class="el" href="classTiXmlNode.html#708e7f953df61d4d2d12f73171550a4b">TiXmlNode</a><li>ClearError()
+: <a class="el" href="classTiXmlDocument.html#c66b8c28db86363315712a3574e87c35">TiXmlDocument</a><li>Clone()
+: <a class="el" href="classTiXmlDocument.html#4968661cab4a1f44a23329c6f8db1907">TiXmlDocument</a>, <a class="el" href="classTiXmlUnknown.html#0960bb7428b3f341da46244229604d73">TiXmlUnknown</a>, <a class="el" href="classTiXmlDeclaration.html#7cf459186040141cda7a180a6585ce2e">TiXmlDeclaration</a>, <a class="el" href="classTiXmlText.html#0c411e93a27537369479d034cc82da3b">TiXmlText</a>, <a class="el" href="classTiXmlComment.html#0d6662bdc52488b9e12b3c7a0453d028">TiXmlComment</a>, <a class="el" href="classTiXmlElement.html#a464535ea1994db337cb6a8ce4b588b5">TiXmlElement</a>, <a class="el" href="classTiXmlNode.html#4508cc3a2d7a98e96a54cc09c37a78a4">TiXmlNode</a><li>Column()
+: <a class="el" href="classTiXmlBase.html#b54bfb9b70fe6dd276e7b279cab7f003">TiXmlBase</a><li>CStr()
+: <a class="el" href="classTiXmlPrinter.html#859eede9597d3e0355b77757be48735e">TiXmlPrinter</a></ul>
+<h3><a class="anchor" name="index_d">- d -</a></h3><ul>
+<li>DoubleValue()
+: <a class="el" href="classTiXmlAttribute.html#2880ddef53fc7522c99535273954d230">TiXmlAttribute</a></ul>
+<h3><a class="anchor" name="index_e">- e -</a></h3><ul>
+<li>Element()
+: <a class="el" href="classTiXmlHandle.html#cb5fe8388a526289ea65e817a51e05e7">TiXmlHandle</a><li>EncodeString()
+: <a class="el" href="classTiXmlBase.html#6bd8c315c1acb09e34107b8736505948">TiXmlBase</a><li>Encoding()
+: <a class="el" href="classTiXmlDeclaration.html#5d974231f9e9a2f0542f15f3a46cdb76">TiXmlDeclaration</a><li>Error()
+: <a class="el" href="classTiXmlDocument.html#6dfc01a6e5d58e56acd537dfd3bdeb29">TiXmlDocument</a><li>ErrorCol()
+: <a class="el" href="classTiXmlDocument.html#a90bc630ee5203c6109ca5fad3323649">TiXmlDocument</a><li>ErrorDesc()
+: <a class="el" href="classTiXmlDocument.html#9d0f689f6e09ea494ea547be8d79c25e">TiXmlDocument</a><li>ErrorId()
+: <a class="el" href="classTiXmlDocument.html#f96fc2f3f9ec6422782bfe916c9e778f">TiXmlDocument</a><li>ErrorRow()
+: <a class="el" href="classTiXmlDocument.html#f30efc75e804aa2e92fb8be3a8cb676e">TiXmlDocument</a></ul>
+<h3><a class="anchor" name="index_f">- f -</a></h3><ul>
+<li>FirstAttribute()
+: <a class="el" href="classTiXmlElement.html#516054c9073647d6cb29b6abe9fa0592">TiXmlElement</a><li>FirstChild()
+: <a class="el" href="classTiXmlHandle.html#8c61f64ae9365d89c264f289085541f8">TiXmlHandle</a>, <a class="el" href="classTiXmlNode.html#10d2669ccb5e29e02fcb0e4408685ef6">TiXmlNode</a><li>FirstChildElement()
+: <a class="el" href="classTiXmlHandle.html#f0aea751320f5e430fac6f8fff3b8dd4">TiXmlHandle</a>, <a class="el" href="classTiXmlNode.html#7f1d7291880534c1e5cdeb392d8c1f45">TiXmlNode</a></ul>
+<h3><a class="anchor" name="index_g">- g -</a></h3><ul>
+<li>GetDocument()
+: <a class="el" href="classTiXmlNode.html#80e397fa973cf5323e33b07154b024f3">TiXmlNode</a><li>GetText()
+: <a class="el" href="classTiXmlElement.html#f3282294986cdb216646ea1f67af2c87">TiXmlElement</a><li>GetUserData()
+: <a class="el" href="classTiXmlBase.html#d0120210e4680ef2088601753ce0ede4">TiXmlBase</a></ul>
+<h3><a class="anchor" name="index_i">- i -</a></h3><ul>
+<li>Indent()
+: <a class="el" href="classTiXmlPrinter.html#bb33ec7d4bad6aaeb57f4304394b133d">TiXmlPrinter</a><li>InsertAfterChild()
+: <a class="el" href="classTiXmlNode.html#d9b75e54ec19301c8b4d5ff583d0b3d5">TiXmlNode</a><li>InsertBeforeChild()
+: <a class="el" href="classTiXmlNode.html#0c146fa2fff0157b681594102f48cbc7">TiXmlNode</a><li>InsertEndChild()
+: <a class="el" href="classTiXmlNode.html#d7d4630e1a2a916edda16be22448a8ba">TiXmlNode</a><li>IntValue()
+: <a class="el" href="classTiXmlAttribute.html#a1a20ad59dc7e89a0ab265396360d50f">TiXmlAttribute</a><li>IsWhiteSpaceCondensed()
+: <a class="el" href="classTiXmlBase.html#d4b1472531c647a25b1840a87ae42438">TiXmlBase</a><li>IterateChildren()
+: <a class="el" href="classTiXmlNode.html#16e9ad53e2f5445b14bf325c90aa862c">TiXmlNode</a></ul>
+<h3><a class="anchor" name="index_l">- l -</a></h3><ul>
+<li>LastAttribute()
+: <a class="el" href="classTiXmlElement.html#86191b49f9177be132b85b14655f1381">TiXmlElement</a><li>LastChild()
+: <a class="el" href="classTiXmlNode.html#69772c9202f70553f940b15c06b07be3">TiXmlNode</a><li>LineBreak()
+: <a class="el" href="classTiXmlPrinter.html#11f1b4804a460b175ec244eb5724d96d">TiXmlPrinter</a><li>LinkEndChild()
+: <a class="el" href="classTiXmlNode.html#5d29442ae46de6d0168429156197bfc6">TiXmlNode</a><li>LoadFile()
+: <a class="el" href="classTiXmlDocument.html#18ae6ed34fed7991ebc220862dfac884">TiXmlDocument</a></ul>
+<h3><a class="anchor" name="index_n">- n -</a></h3><ul>
+<li>Name()
+: <a class="el" href="classTiXmlAttribute.html#298a57287d305904ba6bd96ae6f78d3d">TiXmlAttribute</a><li>Next()
+: <a class="el" href="classTiXmlAttribute.html#1c78e92e223a40843f644ba48ef69f67">TiXmlAttribute</a><li>NextSibling()
+: <a class="el" href="classTiXmlNode.html#2e61c0b89a77e36a0e8c60490003cb46">TiXmlNode</a><li>NextSiblingElement()
+: <a class="el" href="classTiXmlNode.html#506958e34406729a4e4c5326ea39d081">TiXmlNode</a><li>NoChildren()
+: <a class="el" href="classTiXmlNode.html#eed21ad30630ef6e7faf096127edc9f3">TiXmlNode</a><li>Node()
+: <a class="el" href="classTiXmlHandle.html#b44b723a8dc9af72838a303c079d0376">TiXmlHandle</a></ul>
+<h3><a class="anchor" name="index_p">- p -</a></h3><ul>
+<li>Parent()
+: <a class="el" href="classTiXmlNode.html#b643043132ffd794f8602685d34a982e">TiXmlNode</a><li>Parse()
+: <a class="el" href="classTiXmlDocument.html#17ebabe36926ef398e78dec0d0ad0378">TiXmlDocument</a><li>Previous()
+: <a class="el" href="classTiXmlAttribute.html#6ebbfe333fe76cd834bd6cbcca3130cf">TiXmlAttribute</a><li>PreviousSibling()
+: <a class="el" href="classTiXmlNode.html#cc8a0434c7f401d4a3b6dee77c1a5912">TiXmlNode</a><li>Print()
+: <a class="el" href="classTiXmlDocument.html#8701fda1fa31b25abbc9c0df42da10e8">TiXmlDocument</a>, <a class="el" href="classTiXmlUnknown.html#31ba089a40fb5a1869750fce09b0bacb">TiXmlUnknown</a>, <a class="el" href="classTiXmlDeclaration.html#bf6303db4bd05b5be554036817ff1cb4">TiXmlDeclaration</a>, <a class="el" href="classTiXmlText.html#0cafbf6f236c7f02d12b2bffc2b7976b">TiXmlText</a>, <a class="el" href="classTiXmlComment.html#6b316527aaa8da0370cd68c22a5a0f5f">TiXmlComment</a>, <a class="el" href="classTiXmlElement.html#fbf52736e70fc91ec9d760721d6f4fd2">TiXmlElement</a>, <a class="el" href="classTiXmlAttribute.html#cc04956c1d5c4c31fe74f7a7528d109a">TiXmlAttribute</a>, <a class="el" href="classTiXmlBase.html#0de56b3f2ef14c65091a3b916437b512">TiXmlBase</a></ul>
+<h3><a class="anchor" name="index_q">- q -</a></h3><ul>
+<li>QueryDoubleAttribute()
+: <a class="el" href="classTiXmlElement.html#898d7730ecc341f0bffc7a9dadbf1ce7">TiXmlElement</a><li>QueryDoubleValue()
+: <a class="el" href="classTiXmlAttribute.html#c87b2a8489906a5d7aa2875f20be3513">TiXmlAttribute</a><li>QueryFloatAttribute()
+: <a class="el" href="classTiXmlElement.html#a04d3af11601ef5a5f88295203a843be">TiXmlElement</a><li>QueryIntAttribute()
+: <a class="el" href="classTiXmlElement.html#ea0bfe471380f281c5945770ddbf52b9">TiXmlElement</a><li>QueryIntValue()
+: <a class="el" href="classTiXmlAttribute.html#d6c93088ee21af41a107931223339344">TiXmlAttribute</a><li>QueryValueAttribute()
+: <a class="el" href="classTiXmlElement.html#e3b9a03b0a56663a40801c7256683576">TiXmlElement</a></ul>
+<h3><a class="anchor" name="index_r">- r -</a></h3><ul>
+<li>RemoveAttribute()
+: <a class="el" href="classTiXmlElement.html#1afa6aea716511326a608e4c05df4f3a">TiXmlElement</a><li>RemoveChild()
+: <a class="el" href="classTiXmlNode.html#e19d8510efc90596552f4feeac9a8fbf">TiXmlNode</a><li>ReplaceChild()
+: <a class="el" href="classTiXmlNode.html#0c49e739a17b9938050c22cd89617fbd">TiXmlNode</a><li>RootElement()
+: <a class="el" href="classTiXmlDocument.html#d09d17927f908f40efb406af2fb873be">TiXmlDocument</a><li>Row()
+: <a class="el" href="classTiXmlBase.html#024bceb070188df92c2a8d8852dd0853">TiXmlBase</a></ul>
+<h3><a class="anchor" name="index_s">- s -</a></h3><ul>
+<li>SaveFile()
+: <a class="el" href="classTiXmlDocument.html#3d4fae0463f3f03679ba0b7cf6f2df52">TiXmlDocument</a><li>SetAttribute()
+: <a class="el" href="classTiXmlElement.html#ce6f4be75e373726d4774073d666d1a7">TiXmlElement</a><li>SetCDATA()
+: <a class="el" href="classTiXmlText.html#cb17ff7c5d09b2c839393445a3de5ea9">TiXmlText</a><li>SetCondenseWhiteSpace()
+: <a class="el" href="classTiXmlBase.html#0f799ec645bfb8d8a969e83478f379c1">TiXmlBase</a><li>SetDoubleAttribute()
+: <a class="el" href="classTiXmlElement.html#0d1dd975d75496778177e35abfe0ec0b">TiXmlElement</a><li>SetDoubleValue()
+: <a class="el" href="classTiXmlAttribute.html#0316da31373496c4368ad549bf711394">TiXmlAttribute</a><li>SetIndent()
+: <a class="el" href="classTiXmlPrinter.html#213377a4070c7e625bae59716b089e5e">TiXmlPrinter</a><li>SetIntValue()
+: <a class="el" href="classTiXmlAttribute.html#7e065df640116a62ea4f4b7da5449cc8">TiXmlAttribute</a><li>SetLineBreak()
+: <a class="el" href="classTiXmlPrinter.html#4be1e37e69e3858c59635aa947174fe6">TiXmlPrinter</a><li>SetName()
+: <a class="el" href="classTiXmlAttribute.html#b296ff0c9a8c701055cd257a8a976e57">TiXmlAttribute</a><li>SetStreamPrinting()
+: <a class="el" href="classTiXmlPrinter.html#b23a90629e374cb1cadca090468bbd19">TiXmlPrinter</a><li>SetTabSize()
+: <a class="el" href="classTiXmlDocument.html#51dac56316f89b35bdb7d0d433ba988e">TiXmlDocument</a><li>SetUserData()
+: <a class="el" href="classTiXmlBase.html#c6b3e0f790930d4970ec30764e937b5d">TiXmlBase</a><li>SetValue()
+: <a class="el" href="classTiXmlAttribute.html#b43f67a0cc3ec1d80e62606500f0925f">TiXmlAttribute</a>, <a class="el" href="classTiXmlNode.html#2598d5f448042c1abbeae4503dd45ff2">TiXmlNode</a><li>Size()
+: <a class="el" href="classTiXmlPrinter.html#d01375ae9199bd2f48252eaddce3039d">TiXmlPrinter</a><li>Standalone()
+: <a class="el" href="classTiXmlDeclaration.html#9ff06afc033d7ef730ec7c6825b97ad9">TiXmlDeclaration</a><li>Str()
+: <a class="el" href="classTiXmlPrinter.html#3bd4daf44309b41f5813a833caa0d1c9">TiXmlPrinter</a></ul>
+<h3><a class="anchor" name="index_t">- t -</a></h3><ul>
+<li>Text()
+: <a class="el" href="classTiXmlHandle.html#9fc739c8a18d160006f82572fc143d13">TiXmlHandle</a><li>TiXmlAttribute()
+: <a class="el" href="classTiXmlAttribute.html#759d0b76fb8fcf765ecab243bc14f05e">TiXmlAttribute</a><li>TiXmlComment()
+: <a class="el" href="classTiXmlComment.html#37e7802ef17bc03ebe5ae79bf0713d47">TiXmlComment</a><li>TiXmlDeclaration()
+: <a class="el" href="classTiXmlDeclaration.html#3b618d1c30c25e4b7a71f31a595ee298">TiXmlDeclaration</a><li>TiXmlDocument()
+: <a class="el" href="classTiXmlDocument.html#2c6e58fb99bfa76cc613f16840022225">TiXmlDocument</a><li>TiXmlElement()
+: <a class="el" href="classTiXmlElement.html#40fc2e3c1a955e2f78e1a32350d180e7">TiXmlElement</a><li>TiXmlHandle()
+: <a class="el" href="classTiXmlHandle.html#236d7855e1e56ccc7b980630c48c7fd7">TiXmlHandle</a><li>TiXmlText()
+: <a class="el" href="classTiXmlText.html#439792f6183a3d3fb6f2bc2b16fa5691">TiXmlText</a><li>ToComment()
+: <a class="el" href="classTiXmlComment.html#cc7c7e07e13c23f17797d642981511df">TiXmlComment</a>, <a class="el" href="classTiXmlNode.html#383e06a0787f7063953934867990f849">TiXmlNode</a><li>ToDeclaration()
+: <a class="el" href="classTiXmlDeclaration.html#6bd3d1daddcaeb9543c24bfd090969ce">TiXmlDeclaration</a>, <a class="el" href="classTiXmlNode.html#4027136ca820ff4a636b607231b6a6df">TiXmlNode</a><li>ToDocument()
+: <a class="el" href="classTiXmlDocument.html#1025d942a1f328fd742d545e37efdd42">TiXmlDocument</a>, <a class="el" href="classTiXmlNode.html#6a4c8ac28ee7a745d059db6691e03bae">TiXmlNode</a><li>ToElement()
+: <a class="el" href="classTiXmlHandle.html#bc6e7ed383a5fe1e52b0c0004b457b9e">TiXmlHandle</a>, <a class="el" href="classTiXmlElement.html#9def86337ea7a755eb41cac980f60c7a">TiXmlElement</a>, <a class="el" href="classTiXmlNode.html#a65d000223187d22a4dcebd7479e9ebc">TiXmlNode</a><li>ToNode()
+: <a class="el" href="classTiXmlHandle.html#f678e5088e83be67baf76f699756f2c3">TiXmlHandle</a><li>ToText()
+: <a class="el" href="classTiXmlHandle.html#4ac53a652296203a5b5e13854d923586">TiXmlHandle</a>, <a class="el" href="classTiXmlText.html#e7c3a8fd3e4dbf6c0c4363a943d72f5b">TiXmlText</a>, <a class="el" href="classTiXmlNode.html#3ddfbcac78fbea041fad57e5c6d60a03">TiXmlNode</a><li>ToUnknown()
+: <a class="el" href="classTiXmlHandle.html#1381c17507a130767b1e23afc93b3674">TiXmlHandle</a>, <a class="el" href="classTiXmlUnknown.html#67c9fd22940e8c47f706a72cdd2e332c">TiXmlUnknown</a>, <a class="el" href="classTiXmlNode.html#06de5af852668c7e4af0d09c205f0b0d">TiXmlNode</a><li>Type()
+: <a class="el" href="classTiXmlNode.html#57b99d5c97d67a42b9752f5210a1ba5e">TiXmlNode</a></ul>
+<h3><a class="anchor" name="index_u">- u -</a></h3><ul>
+<li>Unknown()
+: <a class="el" href="classTiXmlHandle.html#49675b74357ba2aae124657a9a1ef465">TiXmlHandle</a></ul>
+<h3><a class="anchor" name="index_v">- v -</a></h3><ul>
+<li>Value()
+: <a class="el" href="classTiXmlAttribute.html#0f874490eac8ca00ee0070765d0e97e3">TiXmlAttribute</a>, <a class="el" href="classTiXmlNode.html#77943eb90d12c2892b1337a9f5918b41">TiXmlNode</a><li>ValueStr()
+: <a class="el" href="classTiXmlAttribute.html#87705c3ccf9ee9417beb4f7cbacd4d33">TiXmlAttribute</a>, <a class="el" href="classTiXmlNode.html#6d9e505619d39bf50bfd9609c9169ea5">TiXmlNode</a><li>Version()
+: <a class="el" href="classTiXmlDeclaration.html#02ee557b1a4545c3219ed377c103ec76">TiXmlDeclaration</a><li>Visit()
+: <a class="el" href="classTiXmlPrinter.html#d2dca6dd106e8982fd3c7db1f3330970">TiXmlPrinter</a>, <a class="el" href="classTiXmlVisitor.html#7e284d607d275c51dac1adb58159ce28">TiXmlVisitor</a><li>VisitEnter()
+: <a class="el" href="classTiXmlPrinter.html#0c5e7bf8622838417a0d0bfb8f433854">TiXmlPrinter</a>, <a class="el" href="classTiXmlVisitor.html#f6c6178ffa517bbdba95d70490875fff">TiXmlVisitor</a><li>VisitExit()
+: <a class="el" href="classTiXmlPrinter.html#1853cf2f6e63ad4b4232b4835e0acaf0">TiXmlPrinter</a>, <a class="el" href="classTiXmlVisitor.html#ec2b1f8116226d52f3a1b95dafd3a32c">TiXmlVisitor</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/functions_rela.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,40 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: Class Members - Related Functions</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li id="current"><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="functions.html"><span>All</span></a></li>
+    <li><a href="functions_func.html"><span>Functions</span></a></li>
+    <li><a href="functions_vars.html"><span>Variables</span></a></li>
+    <li><a href="functions_enum.html"><span>Enumerations</span></a></li>
+    <li id="current"><a href="functions_rela.html"><span>Related&nbsp;Functions</span></a></li>
+  </ul>
+</div>
+&nbsp;
+<p>
+<ul>
+<li>operator&lt;&lt;
+: <a class="el" href="classTiXmlNode.html#52ef17e7080df2490cf87bde380685ab">TiXmlNode</a><li>operator&gt;&gt;
+: <a class="el" href="classTiXmlNode.html#b57bd426563c926844f65a78412e18b9">TiXmlNode</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/functions_vars.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,39 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: Class Members - Variables</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li id="current"><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="functions.html"><span>All</span></a></li>
+    <li><a href="functions_func.html"><span>Functions</span></a></li>
+    <li id="current"><a href="functions_vars.html"><span>Variables</span></a></li>
+    <li><a href="functions_enum.html"><span>Enumerations</span></a></li>
+    <li><a href="functions_rela.html"><span>Related&nbsp;Functions</span></a></li>
+  </ul>
+</div>
+&nbsp;
+<p>
+<ul>
+<li>userData
+: <a class="el" href="classTiXmlBase.html#b242c01590191f644569fa89a080d97c">TiXmlBase</a></ul>
+<hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/hierarchy.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,45 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: Hierarchical Index</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li id="current"><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="tabs">
+  <ul>
+    <li><a href="annotated.html"><span>Class&nbsp;List</span></a></li>
+    <li id="current"><a href="hierarchy.html"><span>Class&nbsp;Hierarchy</span></a></li>
+    <li><a href="functions.html"><span>Class&nbsp;Members</span></a></li>
+  </ul></div>
+<h1>TinyXml Class Hierarchy</h1>This inheritance list is sorted roughly, but not completely, alphabetically:<ul>
+<li><a class="el" href="classTiXmlBase.html">TiXmlBase</a>
+<ul>
+<li><a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a>
+<li><a class="el" href="classTiXmlNode.html">TiXmlNode</a>
+<ul>
+<li><a class="el" href="classTiXmlComment.html">TiXmlComment</a>
+<li><a class="el" href="classTiXmlDeclaration.html">TiXmlDeclaration</a>
+<li><a class="el" href="classTiXmlDocument.html">TiXmlDocument</a>
+<li><a class="el" href="classTiXmlElement.html">TiXmlElement</a>
+<li><a class="el" href="classTiXmlText.html">TiXmlText</a>
+<li><a class="el" href="classTiXmlUnknown.html">TiXmlUnknown</a>
+</ul>
+</ul>
+<li><a class="el" href="classTiXmlHandle.html">TiXmlHandle</a>
+<li><a class="el" href="classTiXmlVisitor.html">TiXmlVisitor</a>
+<ul>
+<li><a class="el" href="classTiXmlPrinter.html">TiXmlPrinter</a>
+</ul>
+</ul>
+<hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/index.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,275 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: Main Page</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li id="current"><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<h1>TinyXml Documentation</h1>
+<p>
+<h3 align="center">2.5.3 </h3><h1>TinyXML </h1>
+<p>
+TinyXML is a simple, small, C++ XML parser that can be easily integrated into other programs.<p>
+<h2>What it does. </h2>
+<p>
+In brief, TinyXML parses an XML document, and builds from that a Document Object Model (DOM) that can be read, modified, and saved.<p>
+XML stands for "eXtensible Markup Language." It allows you to create your own document markups. Where HTML does a very good job of marking documents for browsers, XML allows you to define any kind of document markup, for example a document that describes a "to do" list for an organizer application. XML is a very structured and convenient format. All those random file formats created to store application data can all be replaced with XML. One parser for everything.<p>
+The best place for the complete, correct, and quite frankly hard to read spec is at <a href="http://www.w3.org/TR/2004/REC-xml-20040204/">http://www.w3.org/TR/2004/REC-xml-20040204/</a>. An intro to XML (that I really like) can be found at <a href="http://skew.org/xml/tutorial/">http://skew.org/xml/tutorial</a>.<p>
+There are different ways to access and interact with XML data. TinyXML uses a Document Object Model (DOM), meaning the XML data is parsed into a C++ objects that can be browsed and manipulated, and then written to disk or another output stream. You can also construct an XML document from scratch with C++ objects and write this to disk or another output stream.<p>
+TinyXML is designed to be easy and fast to learn. It is two headers and four cpp files. Simply add these to your project and off you go. There is an example file - xmltest.cpp - to get you started.<p>
+TinyXML is released under the ZLib license, so you can use it in open source or commercial code. The details of the license are at the top of every source file.<p>
+TinyXML attempts to be a flexible parser, but with truly correct and compliant XML output. TinyXML should compile on any reasonably C++ compliant system. It does not rely on exceptions or RTTI. It can be compiled with or without STL support. TinyXML fully supports the UTF-8 encoding, and the first 64k character entities.<p>
+<h2>What it doesn't do. </h2>
+<p>
+TinyXML doesn't parse or use DTDs (Document Type Definitions) or XSLs (eXtensible Stylesheet Language.) There are other parsers out there (check out www.sourceforge.org, search for XML) that are much more fully featured. But they are also much bigger, take longer to set up in your project, have a higher learning curve, and often have a more restrictive license. If you are working with browsers or have more complete XML needs, TinyXML is not the parser for you.<p>
+The following DTD syntax will not parse at this time in TinyXML:<p>
+<div class="fragment"><pre class="fragment">	&lt;!DOCTYPE Archiv [
+	 &lt;!ELEMENT Comment (#PCDATA)&gt;
+	]&gt;
+</pre></div><p>
+because TinyXML sees this as a !DOCTYPE node with an illegally embedded !ELEMENT node. This may be addressed in the future.<p>
+<h2>Tutorials. </h2>
+<p>
+For the impatient, here is a tutorial to get you going. A great way to get started, but it is worth your time to read this (very short) manual completely.<p>
+<ul>
+<li><a class="el" href="tutorial0.html">TinyXML Tutorial</a></li></ul>
+<p>
+<h2>Code Status. </h2>
+<p>
+TinyXML is mature, tested code. It is very stable. If you find bugs, please file a bug report on the sourceforge web site (www.sourceforge.net/projects/tinyxml). We'll get them straightened out as soon as possible.<p>
+There are some areas of improvement; please check sourceforge if you are interested in working on TinyXML.<p>
+<h2>Related Projects </h2>
+<p>
+TinyXML projects you may find useful! (Descriptions provided by the projects.)<p>
+<ul>
+<li>
+<b>TinyXPath</b> (<a href="http://tinyxpath.sourceforge.net">http://tinyxpath.sourceforge.net</a>). TinyXPath is a small footprint XPath syntax decoder, written in C++. </li>
+<li>
+<b>TinyXML++</b> (<a href="http://code.google.com/p/ticpp/">http://code.google.com/p/ticpp/</a>). TinyXML++ is a completely new interface to TinyXML that uses MANY of the C++ strengths. Templates, exceptions, and much better error handling. </li>
+</ul>
+<p>
+<h2>Features </h2>
+<p>
+<h3>Using STL </h3>
+<p>
+TinyXML can be compiled to use or not use STL. When using STL, TinyXML uses the std::string class, and fully supports std::istream, std::ostream, operator&lt;&lt;, and operator&gt;&gt;. Many API methods have both 'const char*' and 'const std::string&amp;' forms.<p>
+When STL support is compiled out, no STL files are included whatsoever. All the string classes are implemented by TinyXML itself. API methods all use the 'const char*' form for input.<p>
+Use the compile time define:<p>
+TIXML_USE_STL<p>
+to compile one version or the other. This can be passed by the compiler, or set as the first line of "tinyxml.h".<p>
+Note: If compiling the test code in Linux, setting the environment variable TINYXML_USE_STL=YES/NO will control STL compilation. In the Windows project file, STL and non STL targets are provided. In your project, It's probably easiest to add the line "#define TIXML_USE_STL" as the first line of <a class="el" href="tinyxml_8h-source.html">tinyxml.h</a>.<p>
+<h3>UTF-8 </h3>
+<p>
+TinyXML supports UTF-8 allowing to manipulate XML files in any language. TinyXML also supports "legacy mode" - the encoding used before UTF-8 support and probably best described as "extended ascii".<p>
+Normally, TinyXML will try to detect the correct encoding and use it. However, by setting the value of TIXML_DEFAULT_ENCODING in the header file, TinyXML can be forced to always use one encoding.<p>
+TinyXML will assume Legacy Mode until one of the following occurs: <ol>
+<li>
+If the non-standard but common "UTF-8 lead bytes" (0xef 0xbb 0xbf) begin the file or data stream, TinyXML will read it as UTF-8.  </li>
+<li>
+If the declaration tag is read, and it has an encoding="UTF-8", then TinyXML will read it as UTF-8.  </li>
+<li>
+If the declaration tag is read, and it has no encoding specified, then TinyXML will read it as UTF-8.  </li>
+<li>
+If the declaration tag is read, and it has an encoding="something else", then TinyXML will read it as Legacy Mode. In legacy mode, TinyXML will work as it did before. It's not clear what that mode does exactly, but old content should keep working. </li>
+<li>
+Until one of the above criteria is met, TinyXML runs in Legacy Mode. </li>
+</ol>
+<p>
+What happens if the encoding is incorrectly set or detected? TinyXML will try to read and pass through text seen as improperly encoded. You may get some strange results or mangled characters. You may want to force TinyXML to the correct mode.<p>
+You may force TinyXML to Legacy Mode by using LoadFile( TIXML_ENCODING_LEGACY ) or LoadFile( filename, TIXML_ENCODING_LEGACY ). You may force it to use legacy mode all the time by setting TIXML_DEFAULT_ENCODING = TIXML_ENCODING_LEGACY. Likewise, you may force it to TIXML_ENCODING_UTF8 with the same technique.<p>
+For English users, using English XML, UTF-8 is the same as low-ASCII. You don't need to be aware of UTF-8 or change your code in any way. You can think of UTF-8 as a "superset" of ASCII.<p>
+UTF-8 is not a double byte format - but it is a standard encoding of Unicode! TinyXML does not use or directly support wchar, TCHAR, or Microsoft's _UNICODE at this time. It is common to see the term "Unicode" improperly refer to UTF-16, a wide byte encoding of unicode. This is a source of confusion.<p>
+For "high-ascii" languages - everything not English, pretty much - TinyXML can handle all languages, at the same time, as long as the XML is encoded in UTF-8. That can be a little tricky, older programs and operating systems tend to use the "default" or "traditional" code page. Many apps (and almost all modern ones) can output UTF-8, but older or stubborn (or just broken) ones still output text in the default code page.<p>
+For example, Japanese systems traditionally use SHIFT-JIS encoding. Text encoded as SHIFT-JIS can not be read by TinyXML. A good text editor can import SHIFT-JIS and then save as UTF-8.<p>
+The <a href="http://skew.org/xml/tutorial/">Skew.org link</a> does a great job covering the encoding issue.<p>
+The test file "utf8test.xml" is an XML containing English, Spanish, Russian, and Simplified Chinese. (Hopefully they are translated correctly). The file "utf8test.gif" is a screen capture of the XML file, rendered in IE. Note that if you don't have the correct fonts (Simplified Chinese or Russian) on your system, you won't see output that matches the GIF file even if you can parse it correctly. Also note that (at least on my Windows machine) console output is in a Western code page, so that Print() or printf() cannot correctly display the file. This is not a bug in TinyXML - just an OS issue. No data is lost or destroyed by TinyXML. The console just doesn't render UTF-8.<p>
+<h3>Entities </h3>
+<p>
+TinyXML recognizes the pre-defined "character entities", meaning special characters. Namely:<p>
+<div class="fragment"><pre class="fragment">	&amp;amp;	&amp;
+	&amp;lt;	&lt;
+	&amp;gt;	&gt;
+	&amp;quot;	"
+	&amp;apos;	'
+</pre></div><p>
+These are recognized when the XML document is read, and translated to there UTF-8 equivalents. For instance, text with the XML of:<p>
+<div class="fragment"><pre class="fragment">	Far &amp;amp; Away
+</pre></div><p>
+will have the Value() of "Far &amp; Away" when queried from the <a class="el" href="classTiXmlText.html">TiXmlText</a> object, and will be written back to the XML stream/file as an ampersand. Older versions of TinyXML "preserved" character entities, but the newer versions will translate them into characters.<p>
+Additionally, any character can be specified by its Unicode code point: The syntax "&amp;#xA0;" or "&amp;#160;" are both to the non-breaking space characher.<p>
+<h3>Printing </h3>
+<p>
+TinyXML can print output in several different ways that all have strengths and limitations.<p>
+<ul>
+<li>Print( FILE* ). Output to a std-C stream, which includes all C files as well as stdout.<ul>
+<li>"Pretty prints", but you don't have control over printing options.</li><li>The output is streamed directly to the FILE object, so there is no memory overhead in the TinyXML code.</li><li>used by Print() and SaveFile()</li></ul>
+</li></ul>
+<p>
+<ul>
+<li>operator&lt;&lt;. Output to a c++ stream.<ul>
+<li>Integrates with standart C++ iostreams.</li><li>Outputs in "network printing" mode without line breaks. Good for network transmission and moving XML between C++ objects, but hard for a human to read.</li></ul>
+</li></ul>
+<p>
+<ul>
+<li><a class="el" href="classTiXmlPrinter.html">TiXmlPrinter</a>. Output to a std::string or memory buffer.<ul>
+<li>API is less concise</li><li>Future printing options will be put here.</li><li>Printing may change slightly in future versions as it is refined and expanded.</li></ul>
+</li></ul>
+<p>
+<h3>Streams </h3>
+<p>
+With TIXML_USE_STL on TinyXML supports C++ streams (operator &lt;&lt;,&gt;&gt;) streams as well as C (FILE*) streams. There are some differences that you may need to be aware of.<p>
+C style output:<ul>
+<li>based on FILE*</li><li>the Print() and SaveFile() methods</li></ul>
+<p>
+Generates formatted output, with plenty of white space, intended to be as human-readable as possible. They are very fast, and tolerant of ill formed XML documents. For example, an XML document that contains 2 root elements and 2 declarations, will still print.<p>
+C style input:<ul>
+<li>based on FILE*</li><li>the Parse() and LoadFile() methods</li></ul>
+<p>
+A fast, tolerant read. Use whenever you don't need the C++ streams.<p>
+C++ style output:<ul>
+<li>based on std::ostream</li><li>operator&lt;&lt;</li></ul>
+<p>
+Generates condensed output, intended for network transmission rather than readability. Depending on your system's implementation of the ostream class, these may be somewhat slower. (Or may not.) Not tolerant of ill formed XML: a document should contain the correct one root element. Additional root level elements will not be streamed out.<p>
+C++ style input:<ul>
+<li>based on std::istream</li><li>operator&gt;&gt;</li></ul>
+<p>
+Reads XML from a stream, making it useful for network transmission. The tricky part is knowing when the XML document is complete, since there will almost certainly be other data in the stream. TinyXML will assume the XML data is complete after it reads the root element. Put another way, documents that are ill-constructed with more than one root element will not read correctly. Also note that operator&gt;&gt; is somewhat slower than Parse, due to both implementation of the STL and limitations of TinyXML.<p>
+<h3>White space </h3>
+<p>
+The world simply does not agree on whether white space should be kept, or condensed. For example, pretend the '_' is a space, and look at "Hello____world". HTML, and at least some XML parsers, will interpret this as "Hello_world". They condense white space. Some XML parsers do not, and will leave it as "Hello____world". (Remember to keep pretending the _ is a space.) Others suggest that __Hello___world__ should become Hello___world.<p>
+It's an issue that hasn't been resolved to my satisfaction. TinyXML supports the first 2 approaches. Call <a class="el" href="classTiXmlBase.html#0f799ec645bfb8d8a969e83478f379c1">TiXmlBase::SetCondenseWhiteSpace( bool )</a> to set the desired behavior. The default is to condense white space.<p>
+If you change the default, you should call <a class="el" href="classTiXmlBase.html#0f799ec645bfb8d8a969e83478f379c1">TiXmlBase::SetCondenseWhiteSpace( bool )</a> before making any calls to Parse XML data, and I don't recommend changing it after it has been set.<p>
+<h3>Handles </h3>
+<p>
+Where browsing an XML document in a robust way, it is important to check for null returns from method calls. An error safe implementation can generate a lot of code like:<p>
+<div class="fragment"><pre class="fragment">TiXmlElement* root = document.FirstChildElement( "Document" );
+if ( root )
+{
+	TiXmlElement* element = root-&gt;FirstChildElement( "Element" );
+	if ( element )
+	{
+		TiXmlElement* child = element-&gt;FirstChildElement( "Child" );
+		if ( child )
+		{
+			TiXmlElement* child2 = child-&gt;NextSiblingElement( "Child" );
+			if ( child2 )
+			{
+				// Finally do something useful.
+</pre></div><p>
+Handles have been introduced to clean this up. Using the <a class="el" href="classTiXmlHandle.html">TiXmlHandle</a> class, the previous code reduces to:<p>
+<div class="fragment"><pre class="fragment">TiXmlHandle docHandle( &amp;document );
+TiXmlElement* child2 = docHandle.FirstChild( "Document" ).FirstChild( "Element" ).Child( "Child", 1 ).ToElement();
+if ( child2 )
+{
+	// do something useful
+</pre></div><p>
+Which is much easier to deal with. See <a class="el" href="classTiXmlHandle.html">TiXmlHandle</a> for more information.<p>
+<h3>Row and Column tracking </h3>
+<p>
+Being able to track nodes and attributes back to their origin location in source files can be very important for some applications. Additionally, knowing where parsing errors occured in the original source can be very time saving.<p>
+TinyXML can tracks the row and column origin of all nodes and attributes in a text file. The <a class="el" href="classTiXmlBase.html#024bceb070188df92c2a8d8852dd0853">TiXmlBase::Row()</a> and <a class="el" href="classTiXmlBase.html#b54bfb9b70fe6dd276e7b279cab7f003">TiXmlBase::Column()</a> methods return the origin of the node in the source text. The correct tabs can be configured in <a class="el" href="classTiXmlDocument.html#51dac56316f89b35bdb7d0d433ba988e">TiXmlDocument::SetTabSize()</a>.<p>
+<h2>Using and Installing </h2>
+<p>
+To Compile and Run xmltest:<p>
+A Linux Makefile and a Windows Visual C++ .dsw file is provided. Simply compile and run. It will write the file demotest.xml to your disk and generate output on the screen. It also tests walking the DOM by printing out the number of nodes found using different techniques.<p>
+The Linux makefile is very generic and runs on many systems - it is currently tested on mingw and MacOSX. You do not need to run 'make depend'. The dependecies have been hard coded.<p>
+<h3>Windows project file for VC6</h3>
+<p>
+<ul>
+<li>
+tinyxml: tinyxml library, non-STL  </li>
+<li>
+tinyxmlSTL: tinyxml library, STL  </li>
+<li>
+tinyXmlTest: test app, non-STL  </li>
+<li>
+tinyXmlTestSTL: test app, STL  </li>
+</ul>
+<p>
+<h3>Makefile</h3>
+<p>
+At the top of the makefile you can set:<p>
+PROFILE, DEBUG, and TINYXML_USE_STL. Details (such that they are) are in the makefile.<p>
+In the tinyxml directory, type "make clean" then "make". The executable file 'xmltest' will be created.<p>
+<h3>To Use in an Application:</h3>
+<p>
+Add tinyxml.cpp, <a class="el" href="tinyxml_8h-source.html">tinyxml.h</a>, tinyxmlerror.cpp, tinyxmlparser.cpp, tinystr.cpp, and <a class="el" href="tinystr_8h-source.html">tinystr.h</a> to your project or make file. That's it! It should compile on any reasonably compliant C++ system. You do not need to enable exceptions or RTTI for TinyXML.<p>
+<h2>How TinyXML works. </h2>
+<p>
+An example is probably the best way to go. Take: <div class="fragment"><pre class="fragment">	&lt;?xml version="1.0" standalone=no&gt;
+	&lt;!-- Our to do list data --&gt;
+	&lt;ToDo&gt;
+		&lt;Item priority="1"&gt; Go to the &lt;bold&gt;Toy store!&lt;/bold&gt;&lt;/Item&gt;
+		&lt;Item priority="2"&gt; Do bills&lt;/Item&gt;
+	&lt;/ToDo&gt;
+</pre></div><p>
+Its not much of a To Do list, but it will do. To read this file (say "demo.xml") you would create a document, and parse it in: <div class="fragment"><pre class="fragment">	TiXmlDocument doc( "demo.xml" );
+	doc.LoadFile();
+</pre></div><p>
+And its ready to go. Now lets look at some lines and how they relate to the DOM.<p>
+<div class="fragment"><pre class="fragment">&lt;?xml version="1.0" standalone=no&gt;
+</pre></div><p>
+The first line is a declaration, and gets turned into the <a class="el" href="classTiXmlDeclaration.html">TiXmlDeclaration</a> class. It will be the first child of the document node.<p>
+This is the only directive/special tag parsed by by TinyXML. Generally directive tags are stored in <a class="el" href="classTiXmlUnknown.html">TiXmlUnknown</a> so the commands wont be lost when it is saved back to disk.<p>
+<div class="fragment"><pre class="fragment">&lt;!-- Our to do list data --&gt;
+</pre></div><p>
+A comment. Will become a <a class="el" href="classTiXmlComment.html">TiXmlComment</a> object.<p>
+<div class="fragment"><pre class="fragment">&lt;ToDo&gt;
+</pre></div><p>
+The "ToDo" tag defines a <a class="el" href="classTiXmlElement.html">TiXmlElement</a> object. This one does not have any attributes, but does contain 2 other elements.<p>
+<div class="fragment"><pre class="fragment">&lt;Item priority="1"&gt; 
+</pre></div><p>
+Creates another <a class="el" href="classTiXmlElement.html">TiXmlElement</a> which is a child of the "ToDo" element. This element has 1 attribute, with the name "priority" and the value "1".<p>
+<div class="fragment"><pre class="fragment">Go to the
+</pre></div><p>
+A <a class="el" href="classTiXmlText.html">TiXmlText</a>. This is a leaf node and cannot contain other nodes. It is a child of the "Item" <a class="el" href="classTiXmlElement.html">TiXmlElement</a>.<p>
+<div class="fragment"><pre class="fragment">&lt;bold&gt;
+</pre></div><p>
+Another <a class="el" href="classTiXmlElement.html">TiXmlElement</a>, this one a child of the "Item" element.<p>
+Etc.<p>
+Looking at the entire object tree, you end up with: <div class="fragment"><pre class="fragment">TiXmlDocument					"demo.xml"
+	TiXmlDeclaration			"version='1.0'" "standalone=no"
+	TiXmlComment				" Our to do list data"
+	TiXmlElement				"ToDo"
+		TiXmlElement			"Item" Attribtutes: priority = 1
+			TiXmlText			"Go to the "
+			TiXmlElement		"bold"
+				TiXmlText		"Toy store!"
+		TiXmlElement			"Item" Attributes: priority=2
+			TiXmlText			"Do bills"
+</pre></div><p>
+<h2>Documentation </h2>
+<p>
+The documentation is build with Doxygen, using the 'dox' configuration file.<p>
+<h2>License </h2>
+<p>
+TinyXML is released under the zlib license:<p>
+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.<p>
+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:<p>
+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.<p>
+2. Altered source versions must be plainly marked as such, and must not be misrepresented as being the original software.<p>
+3. This notice may not be removed or altered from any source distribution.<p>
+<h2>References </h2>
+<p>
+The World Wide Web Consortium is the definitive standard body for XML, and there web pages contain huge amounts of information.<p>
+The definitive spec: <a href="http://www.w3.org/TR/2004/REC-xml-20040204/">http://www.w3.org/TR/2004/REC-xml-20040204/</a><p>
+I also recommend "XML Pocket Reference" by Robert Eckstein and published by OReilly...the book that got the whole thing started.<p>
+<h2>Contributors, Contacts, and a Brief History </h2>
+<p>
+Thanks very much to everyone who sends suggestions, bugs, ideas, and encouragement. It all helps, and makes this project fun. A special thanks to the contributors on the web pages that keep it lively.<p>
+So many people have sent in bugs and ideas, that rather than list here we try to give credit due in the "changes.txt" file.<p>
+TinyXML was originally written by Lee Thomason. (Often the "I" still in the documentation.) Lee reviews changes and releases new versions, with the help of Yves Berquin, Andrew Ellerton, and the tinyXml community.<p>
+We appreciate your suggestions, and would love to know if you use TinyXML. Hopefully you will enjoy it and find it useful. Please post questions, comments, file bugs, or contact us at:<p>
+www.sourceforge.net/projects/tinyxml<p>
+Lee Thomason, Yves Berquin, Andrew Ellerton <hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:22 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/pages.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,23 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: Page Index</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li id="current"><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<h1>TinyXml Related Pages</h1>Here is a list of all related documentation pages:<ul>
+<li><a class="el" href="deprecated.html">Deprecated List</a>
+
+</ul>
+<hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
Binary file src/tinyxml/docs/tab_b.gif has changed
Binary file src/tinyxml/docs/tab_l.gif has changed
Binary file src/tinyxml/docs/tab_r.gif has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/tabs.css	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,102 @@
+/* tabs styles, based on http://www.alistapart.com/articles/slidingdoors */
+
+DIV.tabs
+{
+   float            : left;
+   width            : 100%;
+   background       : url("tab_b.gif") repeat-x bottom;
+   margin-bottom    : 4px;
+}
+
+DIV.tabs UL
+{
+   margin           : 0px;
+   padding-left     : 10px;
+   list-style       : none;
+}
+
+DIV.tabs LI, DIV.tabs FORM
+{
+   display          : inline;
+   margin           : 0px;
+   padding          : 0px;
+}
+
+DIV.tabs FORM
+{
+   float            : right;
+}
+
+DIV.tabs A
+{
+   float            : left;
+   background       : url("tab_r.gif") no-repeat right top;
+   border-bottom    : 1px solid #84B0C7;
+   font-size        : x-small;
+   font-weight      : bold;
+   text-decoration  : none;
+}
+
+DIV.tabs A:hover
+{
+   background-position: 100% -150px;
+}
+
+DIV.tabs A:link, DIV.tabs A:visited,
+DIV.tabs A:active, DIV.tabs A:hover
+{
+       color: #1A419D;
+}
+
+DIV.tabs SPAN
+{
+   float            : left;
+   display          : block;
+   background       : url("tab_l.gif") no-repeat left top;
+   padding          : 5px 9px;
+   white-space      : nowrap;
+}
+
+DIV.tabs INPUT
+{
+   float            : right;
+   display          : inline;
+   font-size        : 1em;
+}
+
+DIV.tabs TD
+{
+   font-size        : x-small;
+   font-weight      : bold;
+   text-decoration  : none;
+}
+
+
+
+/* Commented Backslash Hack hides rule from IE5-Mac \*/
+DIV.tabs SPAN {float : none;}
+/* End IE5-Mac hack */
+
+DIV.tabs A:hover SPAN
+{
+   background-position: 0% -150px;
+}
+
+DIV.tabs LI#current A
+{
+   background-position: 100% -150px;
+   border-width     : 0px;
+}
+
+DIV.tabs LI#current SPAN
+{
+   background-position: 0% -150px;
+   padding-bottom   : 6px;
+}
+
+DIV.nav
+{
+   background       : none;
+   border           : none;
+   border-bottom    : 1px solid #84B0C7;
+}
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/tinystr_8h-source.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,338 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: tinystr.h Source File</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li><a href="annotated.html"><span>Classes</span></a></li>
+    <li id="current"><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<h1>tinystr.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
+<a name="l00002"></a>00002 <span class="comment">www.sourceforge.net/projects/tinyxml</span>
+<a name="l00003"></a>00003 <span class="comment">Original file by Yves Berquin.</span>
+<a name="l00004"></a>00004 <span class="comment"></span>
+<a name="l00005"></a>00005 <span class="comment">This software is provided 'as-is', without any express or implied</span>
+<a name="l00006"></a>00006 <span class="comment">warranty. In no event will the authors be held liable for any</span>
+<a name="l00007"></a>00007 <span class="comment">damages arising from the use of this software.</span>
+<a name="l00008"></a>00008 <span class="comment"></span>
+<a name="l00009"></a>00009 <span class="comment">Permission is granted to anyone to use this software for any</span>
+<a name="l00010"></a>00010 <span class="comment">purpose, including commercial applications, and to alter it and</span>
+<a name="l00011"></a>00011 <span class="comment">redistribute it freely, subject to the following restrictions:</span>
+<a name="l00012"></a>00012 <span class="comment"></span>
+<a name="l00013"></a>00013 <span class="comment">1. The origin of this software must not be misrepresented; you must</span>
+<a name="l00014"></a>00014 <span class="comment">not claim that you wrote the original software. If you use this</span>
+<a name="l00015"></a>00015 <span class="comment">software in a product, an acknowledgment in the product documentation</span>
+<a name="l00016"></a>00016 <span class="comment">would be appreciated but is not required.</span>
+<a name="l00017"></a>00017 <span class="comment"></span>
+<a name="l00018"></a>00018 <span class="comment">2. Altered source versions must be plainly marked as such, and</span>
+<a name="l00019"></a>00019 <span class="comment">must not be misrepresented as being the original software.</span>
+<a name="l00020"></a>00020 <span class="comment"></span>
+<a name="l00021"></a>00021 <span class="comment">3. This notice may not be removed or altered from any source</span>
+<a name="l00022"></a>00022 <span class="comment">distribution.</span>
+<a name="l00023"></a>00023 <span class="comment">*/</span>
+<a name="l00024"></a>00024 
+<a name="l00025"></a>00025 <span class="comment">/*</span>
+<a name="l00026"></a>00026 <span class="comment"> * THIS FILE WAS ALTERED BY Tyge Lovset, 7. April 2005.</span>
+<a name="l00027"></a>00027 <span class="comment"> *</span>
+<a name="l00028"></a>00028 <span class="comment"> * - completely rewritten. compact, clean, and fast implementation.</span>
+<a name="l00029"></a>00029 <span class="comment"> * - sizeof(TiXmlString) = pointer size (4 bytes on 32-bit systems)</span>
+<a name="l00030"></a>00030 <span class="comment"> * - fixed reserve() to work as per specification.</span>
+<a name="l00031"></a>00031 <span class="comment"> * - fixed buggy compares operator==(), operator&lt;(), and operator&gt;()</span>
+<a name="l00032"></a>00032 <span class="comment"> * - fixed operator+=() to take a const ref argument, following spec.</span>
+<a name="l00033"></a>00033 <span class="comment"> * - added "copy" constructor with length, and most compare operators.</span>
+<a name="l00034"></a>00034 <span class="comment"> * - added swap(), clear(), size(), capacity(), operator+().</span>
+<a name="l00035"></a>00035 <span class="comment"> */</span>
+<a name="l00036"></a>00036 
+<a name="l00037"></a>00037 <span class="preprocessor">#ifndef TIXML_USE_STL</span>
+<a name="l00038"></a>00038 <span class="preprocessor"></span>
+<a name="l00039"></a>00039 <span class="preprocessor">#ifndef TIXML_STRING_INCLUDED</span>
+<a name="l00040"></a>00040 <span class="preprocessor"></span><span class="preprocessor">#define TIXML_STRING_INCLUDED</span>
+<a name="l00041"></a>00041 <span class="preprocessor"></span>
+<a name="l00042"></a>00042 <span class="preprocessor">#include &lt;assert.h&gt;</span>
+<a name="l00043"></a>00043 <span class="preprocessor">#include &lt;string.h&gt;</span>
+<a name="l00044"></a>00044 
+<a name="l00045"></a>00045 <span class="comment">/*  The support for explicit isn't that universal, and it isn't really</span>
+<a name="l00046"></a>00046 <span class="comment">    required - it is used to check that the TiXmlString class isn't incorrectly</span>
+<a name="l00047"></a>00047 <span class="comment">    used. Be nice to old compilers and macro it here:</span>
+<a name="l00048"></a>00048 <span class="comment">*/</span>
+<a name="l00049"></a>00049 <span class="preprocessor">#if defined(_MSC_VER) &amp;&amp; (_MSC_VER &gt;= 1200 )</span>
+<a name="l00050"></a>00050 <span class="preprocessor"></span>    <span class="comment">// Microsoft visual studio, version 6 and higher.</span>
+<a name="l00051"></a>00051 <span class="preprocessor">    #define TIXML_EXPLICIT explicit</span>
+<a name="l00052"></a>00052 <span class="preprocessor"></span><span class="preprocessor">#elif defined(__GNUC__) &amp;&amp; (__GNUC__ &gt;= 3 )</span>
+<a name="l00053"></a>00053 <span class="preprocessor"></span>    <span class="comment">// GCC version 3 and higher.s</span>
+<a name="l00054"></a>00054 <span class="preprocessor">    #define TIXML_EXPLICIT explicit</span>
+<a name="l00055"></a>00055 <span class="preprocessor"></span><span class="preprocessor">#else</span>
+<a name="l00056"></a>00056 <span class="preprocessor"></span><span class="preprocessor">    #define TIXML_EXPLICIT</span>
+<a name="l00057"></a>00057 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00058"></a>00058 <span class="preprocessor"></span>
+<a name="l00059"></a>00059 
+<a name="l00060"></a>00060 <span class="comment">/*</span>
+<a name="l00061"></a>00061 <span class="comment">   TiXmlString is an emulation of a subset of the std::string template.</span>
+<a name="l00062"></a>00062 <span class="comment">   Its purpose is to allow compiling TinyXML on compilers with no or poor STL support.</span>
+<a name="l00063"></a>00063 <span class="comment">   Only the member functions relevant to the TinyXML project have been implemented.</span>
+<a name="l00064"></a>00064 <span class="comment">   The buffer allocation is made by a simplistic power of 2 like mechanism : if we increase</span>
+<a name="l00065"></a>00065 <span class="comment">   a string and there's no more room, we allocate a buffer twice as big as we need.</span>
+<a name="l00066"></a>00066 <span class="comment">*/</span>
+<a name="l00067"></a>00067 <span class="keyword">class </span>TiXmlString
+<a name="l00068"></a>00068 {
+<a name="l00069"></a>00069   <span class="keyword">public</span> :
+<a name="l00070"></a>00070     <span class="comment">// The size type used</span>
+<a name="l00071"></a>00071     <span class="keyword">typedef</span> size_t size_type;
+<a name="l00072"></a>00072 
+<a name="l00073"></a>00073     <span class="comment">// Error value for find primitive</span>
+<a name="l00074"></a>00074     <span class="keyword">static</span> <span class="keyword">const</span> size_type npos; <span class="comment">// = -1;</span>
+<a name="l00075"></a>00075 
+<a name="l00076"></a>00076 
+<a name="l00077"></a>00077     <span class="comment">// TiXmlString empty constructor</span>
+<a name="l00078"></a>00078     TiXmlString () : rep_(&amp;nullrep_)
+<a name="l00079"></a>00079     {
+<a name="l00080"></a>00080     }
+<a name="l00081"></a>00081 
+<a name="l00082"></a>00082     <span class="comment">// TiXmlString copy constructor</span>
+<a name="l00083"></a>00083     TiXmlString ( <span class="keyword">const</span> TiXmlString &amp; copy) : rep_(0)
+<a name="l00084"></a>00084     {
+<a name="l00085"></a>00085         init(copy.length());
+<a name="l00086"></a>00086         memcpy(start(), copy.data(), length());
+<a name="l00087"></a>00087     }
+<a name="l00088"></a>00088 
+<a name="l00089"></a>00089     <span class="comment">// TiXmlString constructor, based on a string</span>
+<a name="l00090"></a>00090     TIXML_EXPLICIT TiXmlString ( <span class="keyword">const</span> <span class="keywordtype">char</span> * copy) : rep_(0)
+<a name="l00091"></a>00091     {
+<a name="l00092"></a>00092         init( static_cast&lt;size_type&gt;( strlen(copy) ));
+<a name="l00093"></a>00093         memcpy(start(), copy, length());
+<a name="l00094"></a>00094     }
+<a name="l00095"></a>00095 
+<a name="l00096"></a>00096     <span class="comment">// TiXmlString constructor, based on a string</span>
+<a name="l00097"></a>00097     TIXML_EXPLICIT TiXmlString ( <span class="keyword">const</span> <span class="keywordtype">char</span> * str, size_type len) : rep_(0)
+<a name="l00098"></a>00098     {
+<a name="l00099"></a>00099         init(len);
+<a name="l00100"></a>00100         memcpy(start(), str, len);
+<a name="l00101"></a>00101     }
+<a name="l00102"></a>00102 
+<a name="l00103"></a>00103     <span class="comment">// TiXmlString destructor</span>
+<a name="l00104"></a>00104     ~TiXmlString ()
+<a name="l00105"></a>00105     {
+<a name="l00106"></a>00106         quit();
+<a name="l00107"></a>00107     }
+<a name="l00108"></a>00108 
+<a name="l00109"></a>00109     <span class="comment">// = operator</span>
+<a name="l00110"></a>00110     TiXmlString&amp; operator = (<span class="keyword">const</span> <span class="keywordtype">char</span> * copy)
+<a name="l00111"></a>00111     {
+<a name="l00112"></a>00112         <span class="keywordflow">return</span> assign( copy, (size_type)strlen(copy));
+<a name="l00113"></a>00113     }
+<a name="l00114"></a>00114 
+<a name="l00115"></a>00115     <span class="comment">// = operator</span>
+<a name="l00116"></a>00116     TiXmlString&amp; operator = (<span class="keyword">const</span> TiXmlString &amp; copy)
+<a name="l00117"></a>00117     {
+<a name="l00118"></a>00118         <span class="keywordflow">return</span> assign(copy.start(), copy.length());
+<a name="l00119"></a>00119     }
+<a name="l00120"></a>00120 
+<a name="l00121"></a>00121 
+<a name="l00122"></a>00122     <span class="comment">// += operator. Maps to append</span>
+<a name="l00123"></a>00123     TiXmlString&amp; operator += (<span class="keyword">const</span> <span class="keywordtype">char</span> * suffix)
+<a name="l00124"></a>00124     {
+<a name="l00125"></a>00125         <span class="keywordflow">return</span> append(suffix, static_cast&lt;size_type&gt;( strlen(suffix) ));
+<a name="l00126"></a>00126     }
+<a name="l00127"></a>00127 
+<a name="l00128"></a>00128     <span class="comment">// += operator. Maps to append</span>
+<a name="l00129"></a>00129     TiXmlString&amp; operator += (<span class="keywordtype">char</span> single)
+<a name="l00130"></a>00130     {
+<a name="l00131"></a>00131         <span class="keywordflow">return</span> append(&amp;single, 1);
+<a name="l00132"></a>00132     }
+<a name="l00133"></a>00133 
+<a name="l00134"></a>00134     <span class="comment">// += operator. Maps to append</span>
+<a name="l00135"></a>00135     TiXmlString&amp; operator += (<span class="keyword">const</span> TiXmlString &amp; suffix)
+<a name="l00136"></a>00136     {
+<a name="l00137"></a>00137         <span class="keywordflow">return</span> append(suffix.data(), suffix.length());
+<a name="l00138"></a>00138     }
+<a name="l00139"></a>00139 
+<a name="l00140"></a>00140 
+<a name="l00141"></a>00141     <span class="comment">// Convert a TiXmlString into a null-terminated char *</span>
+<a name="l00142"></a>00142     <span class="keyword">const</span> <span class="keywordtype">char</span> * c_str ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep_-&gt;str; }
+<a name="l00143"></a>00143 
+<a name="l00144"></a>00144     <span class="comment">// Convert a TiXmlString into a char * (need not be null terminated).</span>
+<a name="l00145"></a>00145     <span class="keyword">const</span> <span class="keywordtype">char</span> * data ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep_-&gt;str; }
+<a name="l00146"></a>00146 
+<a name="l00147"></a>00147     <span class="comment">// Return the length of a TiXmlString</span>
+<a name="l00148"></a>00148     size_type length ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep_-&gt;size; }
+<a name="l00149"></a>00149 
+<a name="l00150"></a>00150     <span class="comment">// Alias for length()</span>
+<a name="l00151"></a>00151     size_type size ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep_-&gt;size; }
+<a name="l00152"></a>00152 
+<a name="l00153"></a>00153     <span class="comment">// Checks if a TiXmlString is empty</span>
+<a name="l00154"></a>00154     <span class="keywordtype">bool</span> empty ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep_-&gt;size == 0; }
+<a name="l00155"></a>00155 
+<a name="l00156"></a>00156     <span class="comment">// Return capacity of string</span>
+<a name="l00157"></a>00157     size_type capacity ()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep_-&gt;capacity; }
+<a name="l00158"></a>00158 
+<a name="l00159"></a>00159 
+<a name="l00160"></a>00160     <span class="comment">// single char extraction</span>
+<a name="l00161"></a>00161     <span class="keyword">const</span> <span class="keywordtype">char</span>&amp; at (size_type index)<span class="keyword"> const</span>
+<a name="l00162"></a>00162 <span class="keyword">    </span>{
+<a name="l00163"></a>00163         assert( index &lt; length() );
+<a name="l00164"></a>00164         <span class="keywordflow">return</span> rep_-&gt;str[ index ];
+<a name="l00165"></a>00165     }
+<a name="l00166"></a>00166 
+<a name="l00167"></a>00167     <span class="comment">// [] operator</span>
+<a name="l00168"></a>00168     <span class="keywordtype">char</span>&amp; operator [] (size_type index)<span class="keyword"> const</span>
+<a name="l00169"></a>00169 <span class="keyword">    </span>{
+<a name="l00170"></a>00170         assert( index &lt; length() );
+<a name="l00171"></a>00171         <span class="keywordflow">return</span> rep_-&gt;str[ index ];
+<a name="l00172"></a>00172     }
+<a name="l00173"></a>00173 
+<a name="l00174"></a>00174     <span class="comment">// find a char in a string. Return TiXmlString::npos if not found</span>
+<a name="l00175"></a>00175     size_type find (<span class="keywordtype">char</span> lookup)<span class="keyword"> const</span>
+<a name="l00176"></a>00176 <span class="keyword">    </span>{
+<a name="l00177"></a>00177         <span class="keywordflow">return</span> find(lookup, 0);
+<a name="l00178"></a>00178     }
+<a name="l00179"></a>00179 
+<a name="l00180"></a>00180     <span class="comment">// find a char in a string from an offset. Return TiXmlString::npos if not found</span>
+<a name="l00181"></a>00181     size_type find (<span class="keywordtype">char</span> tofind, size_type offset)<span class="keyword"> const</span>
+<a name="l00182"></a>00182 <span class="keyword">    </span>{
+<a name="l00183"></a>00183         <span class="keywordflow">if</span> (offset &gt;= length()) <span class="keywordflow">return</span> npos;
+<a name="l00184"></a>00184 
+<a name="l00185"></a>00185         <span class="keywordflow">for</span> (<span class="keyword">const</span> <span class="keywordtype">char</span>* p = c_str() + offset; *p != <span class="charliteral">'\0'</span>; ++p)
+<a name="l00186"></a>00186         {
+<a name="l00187"></a>00187            <span class="keywordflow">if</span> (*p == tofind) <span class="keywordflow">return</span> static_cast&lt; size_type &gt;( p - c_str() );
+<a name="l00188"></a>00188         }
+<a name="l00189"></a>00189         <span class="keywordflow">return</span> npos;
+<a name="l00190"></a>00190     }
+<a name="l00191"></a>00191 
+<a name="l00192"></a>00192     <span class="keywordtype">void</span> clear ()
+<a name="l00193"></a>00193     {
+<a name="l00194"></a>00194         <span class="comment">//Lee:</span>
+<a name="l00195"></a>00195         <span class="comment">//The original was just too strange, though correct:</span>
+<a name="l00196"></a>00196         <span class="comment">//  TiXmlString().swap(*this);</span>
+<a name="l00197"></a>00197         <span class="comment">//Instead use the quit &amp; re-init:</span>
+<a name="l00198"></a>00198         quit();
+<a name="l00199"></a>00199         init(0,0);
+<a name="l00200"></a>00200     }
+<a name="l00201"></a>00201 
+<a name="l00202"></a>00202     <span class="comment">/*  Function to reserve a big amount of data when we know we'll need it. Be aware that this</span>
+<a name="l00203"></a>00203 <span class="comment">        function DOES NOT clear the content of the TiXmlString if any exists.</span>
+<a name="l00204"></a>00204 <span class="comment">    */</span>
+<a name="l00205"></a>00205     <span class="keywordtype">void</span> reserve (size_type cap);
+<a name="l00206"></a>00206 
+<a name="l00207"></a>00207     TiXmlString&amp; assign (<span class="keyword">const</span> <span class="keywordtype">char</span>* str, size_type len);
+<a name="l00208"></a>00208 
+<a name="l00209"></a>00209     TiXmlString&amp; append (<span class="keyword">const</span> <span class="keywordtype">char</span>* str, size_type len);
+<a name="l00210"></a>00210 
+<a name="l00211"></a>00211     <span class="keywordtype">void</span> swap (TiXmlString&amp; other)
+<a name="l00212"></a>00212     {
+<a name="l00213"></a>00213         Rep* r = rep_;
+<a name="l00214"></a>00214         rep_ = other.rep_;
+<a name="l00215"></a>00215         other.rep_ = r;
+<a name="l00216"></a>00216     }
+<a name="l00217"></a>00217 
+<a name="l00218"></a>00218   <span class="keyword">private</span>:
+<a name="l00219"></a>00219 
+<a name="l00220"></a>00220     <span class="keywordtype">void</span> init(size_type sz) { init(sz, sz); }
+<a name="l00221"></a>00221     <span class="keywordtype">void</span> set_size(size_type sz) { rep_-&gt;str[ rep_-&gt;size = sz ] = <span class="charliteral">'\0'</span>; }
+<a name="l00222"></a>00222     <span class="keywordtype">char</span>* start()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep_-&gt;str; }
+<a name="l00223"></a>00223     <span class="keywordtype">char</span>* finish()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rep_-&gt;str + rep_-&gt;size; }
+<a name="l00224"></a>00224 
+<a name="l00225"></a>00225     <span class="keyword">struct </span>Rep
+<a name="l00226"></a>00226     {
+<a name="l00227"></a>00227         size_type size, capacity;
+<a name="l00228"></a>00228         <span class="keywordtype">char</span> str[1];
+<a name="l00229"></a>00229     };
+<a name="l00230"></a>00230 
+<a name="l00231"></a>00231     <span class="keywordtype">void</span> init(size_type sz, size_type cap)
+<a name="l00232"></a>00232     {
+<a name="l00233"></a>00233         <span class="keywordflow">if</span> (cap)
+<a name="l00234"></a>00234         {
+<a name="l00235"></a>00235             <span class="comment">// Lee: the original form:</span>
+<a name="l00236"></a>00236             <span class="comment">//  rep_ = static_cast&lt;Rep*&gt;(operator new(sizeof(Rep) + cap));</span>
+<a name="l00237"></a>00237             <span class="comment">// doesn't work in some cases of new being overloaded. Switching</span>
+<a name="l00238"></a>00238             <span class="comment">// to the normal allocation, although use an 'int' for systems</span>
+<a name="l00239"></a>00239             <span class="comment">// that are overly picky about structure alignment.</span>
+<a name="l00240"></a>00240             <span class="keyword">const</span> size_type bytesNeeded = <span class="keyword">sizeof</span>(Rep) + cap;
+<a name="l00241"></a>00241             <span class="keyword">const</span> size_type intsNeeded = ( bytesNeeded + <span class="keyword">sizeof</span>(int) - 1 ) / <span class="keyword">sizeof</span>( int ); 
+<a name="l00242"></a>00242             rep_ = reinterpret_cast&lt;Rep*&gt;( <span class="keyword">new</span> <span class="keywordtype">int</span>[ intsNeeded ] );
+<a name="l00243"></a>00243 
+<a name="l00244"></a>00244             rep_-&gt;str[ rep_-&gt;size = sz ] = <span class="charliteral">'\0'</span>;
+<a name="l00245"></a>00245             rep_-&gt;capacity = cap;
+<a name="l00246"></a>00246         }
+<a name="l00247"></a>00247         <span class="keywordflow">else</span>
+<a name="l00248"></a>00248         {
+<a name="l00249"></a>00249             rep_ = &amp;nullrep_;
+<a name="l00250"></a>00250         }
+<a name="l00251"></a>00251     }
+<a name="l00252"></a>00252 
+<a name="l00253"></a>00253     <span class="keywordtype">void</span> quit()
+<a name="l00254"></a>00254     {
+<a name="l00255"></a>00255         <span class="keywordflow">if</span> (rep_ != &amp;nullrep_)
+<a name="l00256"></a>00256         {
+<a name="l00257"></a>00257             <span class="comment">// The rep_ is really an array of ints. (see the allocator, above).</span>
+<a name="l00258"></a>00258             <span class="comment">// Cast it back before delete, so the compiler won't incorrectly call destructors.</span>
+<a name="l00259"></a>00259             <span class="keyword">delete</span> [] ( reinterpret_cast&lt;int*&gt;( rep_ ) );
+<a name="l00260"></a>00260         }
+<a name="l00261"></a>00261     }
+<a name="l00262"></a>00262 
+<a name="l00263"></a>00263     Rep * rep_;
+<a name="l00264"></a>00264     <span class="keyword">static</span> Rep nullrep_;
+<a name="l00265"></a>00265 
+<a name="l00266"></a>00266 } ;
+<a name="l00267"></a>00267 
+<a name="l00268"></a>00268 
+<a name="l00269"></a>00269 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator == (<span class="keyword">const</span> TiXmlString &amp; a, <span class="keyword">const</span> TiXmlString &amp; b)
+<a name="l00270"></a>00270 {
+<a name="l00271"></a>00271     <span class="keywordflow">return</span>    ( a.length() == b.length() )              <span class="comment">// optimization on some platforms</span>
+<a name="l00272"></a>00272            &amp;&amp; ( strcmp(a.c_str(), b.c_str()) == 0 );    <span class="comment">// actual compare</span>
+<a name="l00273"></a>00273 }
+<a name="l00274"></a>00274 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator &lt; (<span class="keyword">const</span> TiXmlString &amp; a, <span class="keyword">const</span> TiXmlString &amp; b)
+<a name="l00275"></a>00275 {
+<a name="l00276"></a>00276     <span class="keywordflow">return</span> strcmp(a.c_str(), b.c_str()) &lt; 0;
+<a name="l00277"></a>00277 }
+<a name="l00278"></a>00278 
+<a name="l00279"></a>00279 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator != (<span class="keyword">const</span> TiXmlString &amp; a, <span class="keyword">const</span> TiXmlString &amp; b) { <span class="keywordflow">return</span> !(a == b); }
+<a name="l00280"></a>00280 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator &gt;  (<span class="keyword">const</span> TiXmlString &amp; a, <span class="keyword">const</span> TiXmlString &amp; b) { <span class="keywordflow">return</span> b &lt; a; }
+<a name="l00281"></a>00281 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator &lt;= (<span class="keyword">const</span> TiXmlString &amp; a, <span class="keyword">const</span> TiXmlString &amp; b) { <span class="keywordflow">return</span> !(b &lt; a); }
+<a name="l00282"></a>00282 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator &gt;= (<span class="keyword">const</span> TiXmlString &amp; a, <span class="keyword">const</span> TiXmlString &amp; b) { <span class="keywordflow">return</span> !(a &lt; b); }
+<a name="l00283"></a>00283 
+<a name="l00284"></a>00284 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator == (<span class="keyword">const</span> TiXmlString &amp; a, <span class="keyword">const</span> <span class="keywordtype">char</span>* b) { <span class="keywordflow">return</span> strcmp(a.c_str(), b) == 0; }
+<a name="l00285"></a>00285 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator == (<span class="keyword">const</span> <span class="keywordtype">char</span>* a, <span class="keyword">const</span> TiXmlString &amp; b) { <span class="keywordflow">return</span> b == a; }
+<a name="l00286"></a>00286 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator != (<span class="keyword">const</span> TiXmlString &amp; a, <span class="keyword">const</span> <span class="keywordtype">char</span>* b) { <span class="keywordflow">return</span> !(a == b); }
+<a name="l00287"></a>00287 <span class="keyword">inline</span> <span class="keywordtype">bool</span> operator != (<span class="keyword">const</span> <span class="keywordtype">char</span>* a, <span class="keyword">const</span> TiXmlString &amp; b) { <span class="keywordflow">return</span> !(b == a); }
+<a name="l00288"></a>00288 
+<a name="l00289"></a>00289 TiXmlString operator + (<span class="keyword">const</span> TiXmlString &amp; a, <span class="keyword">const</span> TiXmlString &amp; b);
+<a name="l00290"></a>00290 TiXmlString operator + (<span class="keyword">const</span> TiXmlString &amp; a, <span class="keyword">const</span> <span class="keywordtype">char</span>* b);
+<a name="l00291"></a>00291 TiXmlString operator + (<span class="keyword">const</span> <span class="keywordtype">char</span>* a, <span class="keyword">const</span> TiXmlString &amp; b);
+<a name="l00292"></a>00292 
+<a name="l00293"></a>00293 
+<a name="l00294"></a>00294 <span class="comment">/*</span>
+<a name="l00295"></a>00295 <span class="comment">   TiXmlOutStream is an emulation of std::ostream. It is based on TiXmlString.</span>
+<a name="l00296"></a>00296 <span class="comment">   Only the operators that we need for TinyXML have been developped.</span>
+<a name="l00297"></a>00297 <span class="comment">*/</span>
+<a name="l00298"></a>00298 <span class="keyword">class </span>TiXmlOutStream : <span class="keyword">public</span> TiXmlString
+<a name="l00299"></a>00299 {
+<a name="l00300"></a>00300 <span class="keyword">public</span> :
+<a name="l00301"></a>00301 
+<a name="l00302"></a>00302     <span class="comment">// TiXmlOutStream &lt;&lt; operator.</span>
+<a name="l00303"></a>00303     TiXmlOutStream &amp; operator &lt;&lt; (<span class="keyword">const</span> TiXmlString &amp; in)
+<a name="l00304"></a>00304     {
+<a name="l00305"></a>00305         *<span class="keyword">this</span> += in;
+<a name="l00306"></a>00306         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00307"></a>00307     }
+<a name="l00308"></a>00308 
+<a name="l00309"></a>00309     <span class="comment">// TiXmlOutStream &lt;&lt; operator.</span>
+<a name="l00310"></a>00310     TiXmlOutStream &amp; operator &lt;&lt; (<span class="keyword">const</span> <span class="keywordtype">char</span> * in)
+<a name="l00311"></a>00311     {
+<a name="l00312"></a>00312         *<span class="keyword">this</span> += in;
+<a name="l00313"></a>00313         <span class="keywordflow">return</span> *<span class="keyword">this</span>;
+<a name="l00314"></a>00314     }
+<a name="l00315"></a>00315 
+<a name="l00316"></a>00316 } ;
+<a name="l00317"></a>00317 
+<a name="l00318"></a>00318 <span class="preprocessor">#endif  // TIXML_STRING_INCLUDED</span>
+<a name="l00319"></a>00319 <span class="preprocessor"></span><span class="preprocessor">#endif  // TIXML_USE_STL</span>
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:22 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/tinyxml_8h-source.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,1201 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: tinyxml.h Source File</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li><a href="annotated.html"><span>Classes</span></a></li>
+    <li id="current"><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<h1>tinyxml.h</h1><div class="fragment"><pre class="fragment"><a name="l00001"></a>00001 <span class="comment">/*</span>
+<a name="l00002"></a>00002 <span class="comment">www.sourceforge.net/projects/tinyxml</span>
+<a name="l00003"></a>00003 <span class="comment">Original code (2.0 and earlier )copyright (c) 2000-2006 Lee Thomason (www.grinninglizard.com)</span>
+<a name="l00004"></a>00004 <span class="comment"></span>
+<a name="l00005"></a>00005 <span class="comment">This software is provided 'as-is', without any express or implied</span>
+<a name="l00006"></a>00006 <span class="comment">warranty. In no event will the authors be held liable for any</span>
+<a name="l00007"></a>00007 <span class="comment">damages arising from the use of this software.</span>
+<a name="l00008"></a>00008 <span class="comment"></span>
+<a name="l00009"></a>00009 <span class="comment">Permission is granted to anyone to use this software for any</span>
+<a name="l00010"></a>00010 <span class="comment">purpose, including commercial applications, and to alter it and</span>
+<a name="l00011"></a>00011 <span class="comment">redistribute it freely, subject to the following restrictions:</span>
+<a name="l00012"></a>00012 <span class="comment"></span>
+<a name="l00013"></a>00013 <span class="comment">1. The origin of this software must not be misrepresented; you must</span>
+<a name="l00014"></a>00014 <span class="comment">not claim that you wrote the original software. If you use this</span>
+<a name="l00015"></a>00015 <span class="comment">software in a product, an acknowledgment in the product documentation</span>
+<a name="l00016"></a>00016 <span class="comment">would be appreciated but is not required.</span>
+<a name="l00017"></a>00017 <span class="comment"></span>
+<a name="l00018"></a>00018 <span class="comment">2. Altered source versions must be plainly marked as such, and</span>
+<a name="l00019"></a>00019 <span class="comment">must not be misrepresented as being the original software.</span>
+<a name="l00020"></a>00020 <span class="comment"></span>
+<a name="l00021"></a>00021 <span class="comment">3. This notice may not be removed or altered from any source</span>
+<a name="l00022"></a>00022 <span class="comment">distribution.</span>
+<a name="l00023"></a>00023 <span class="comment">*/</span>
+<a name="l00024"></a>00024 
+<a name="l00025"></a>00025 
+<a name="l00026"></a>00026 <span class="preprocessor">#ifndef TINYXML_INCLUDED</span>
+<a name="l00027"></a>00027 <span class="preprocessor"></span><span class="preprocessor">#define TINYXML_INCLUDED</span>
+<a name="l00028"></a>00028 <span class="preprocessor"></span>
+<a name="l00029"></a>00029 <span class="preprocessor">#ifdef _MSC_VER</span>
+<a name="l00030"></a>00030 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( push )</span>
+<a name="l00031"></a>00031 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( disable : 4530 )</span>
+<a name="l00032"></a>00032 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( disable : 4786 )</span>
+<a name="l00033"></a>00033 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00034"></a>00034 <span class="preprocessor"></span>
+<a name="l00035"></a>00035 <span class="preprocessor">#include &lt;ctype.h&gt;</span>
+<a name="l00036"></a>00036 <span class="preprocessor">#include &lt;stdio.h&gt;</span>
+<a name="l00037"></a>00037 <span class="preprocessor">#include &lt;stdlib.h&gt;</span>
+<a name="l00038"></a>00038 <span class="preprocessor">#include &lt;string.h&gt;</span>
+<a name="l00039"></a>00039 <span class="preprocessor">#include &lt;assert.h&gt;</span>
+<a name="l00040"></a>00040 
+<a name="l00041"></a>00041 <span class="comment">// Help out windows:</span>
+<a name="l00042"></a>00042 <span class="preprocessor">#if defined( _DEBUG ) &amp;&amp; !defined( DEBUG )</span>
+<a name="l00043"></a>00043 <span class="preprocessor"></span><span class="preprocessor">#define DEBUG</span>
+<a name="l00044"></a>00044 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00045"></a>00045 <span class="preprocessor"></span>
+<a name="l00046"></a>00046 <span class="preprocessor">#ifdef TIXML_USE_STL</span>
+<a name="l00047"></a>00047 <span class="preprocessor"></span><span class="preprocessor">    #include &lt;string&gt;</span>
+<a name="l00048"></a>00048 <span class="preprocessor">    #include &lt;iostream&gt;</span>
+<a name="l00049"></a>00049 <span class="preprocessor">    #include &lt;sstream&gt;</span>
+<a name="l00050"></a>00050 <span class="preprocessor">    #define TIXML_STRING        std::string</span>
+<a name="l00051"></a>00051 <span class="preprocessor"></span><span class="preprocessor">#else</span>
+<a name="l00052"></a>00052 <span class="preprocessor"></span><span class="preprocessor">    #include "tinystr.h"</span>
+<a name="l00053"></a>00053 <span class="preprocessor">    #define TIXML_STRING        TiXmlString</span>
+<a name="l00054"></a>00054 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l00055"></a>00055 <span class="preprocessor"></span>
+<a name="l00056"></a>00056 <span class="comment">// Deprecated library function hell. Compilers want to use the</span>
+<a name="l00057"></a>00057 <span class="comment">// new safe versions. This probably doesn't fully address the problem,</span>
+<a name="l00058"></a>00058 <span class="comment">// but it gets closer. There are too many compilers for me to fully</span>
+<a name="l00059"></a>00059 <span class="comment">// test. If you get compilation troubles, undefine TIXML_SAFE</span>
+<a name="l00060"></a>00060 <span class="preprocessor">#define TIXML_SAFE</span>
+<a name="l00061"></a>00061 <span class="preprocessor"></span>
+<a name="l00062"></a>00062 <span class="preprocessor">#ifdef TIXML_SAFE</span>
+<a name="l00063"></a>00063 <span class="preprocessor"></span><span class="preprocessor">    #if defined(_MSC_VER) &amp;&amp; (_MSC_VER &gt;= 1400 )</span>
+<a name="l00064"></a>00064 <span class="preprocessor"></span>        <span class="comment">// Microsoft visual studio, version 2005 and higher.</span>
+<a name="l00065"></a>00065 <span class="preprocessor">        #define TIXML_SNPRINTF _snprintf_s</span>
+<a name="l00066"></a>00066 <span class="preprocessor"></span><span class="preprocessor">        #define TIXML_SNSCANF  _snscanf_s</span>
+<a name="l00067"></a>00067 <span class="preprocessor"></span><span class="preprocessor">        #define TIXML_SSCANF   sscanf_s</span>
+<a name="l00068"></a>00068 <span class="preprocessor"></span><span class="preprocessor">    #elif defined(_MSC_VER) &amp;&amp; (_MSC_VER &gt;= 1200 )</span>
+<a name="l00069"></a>00069 <span class="preprocessor"></span>        <span class="comment">// Microsoft visual studio, version 6 and higher.</span>
+<a name="l00070"></a>00070         <span class="comment">//#pragma message( "Using _sn* functions." )</span>
+<a name="l00071"></a>00071 <span class="preprocessor">        #define TIXML_SNPRINTF _snprintf</span>
+<a name="l00072"></a>00072 <span class="preprocessor"></span><span class="preprocessor">        #define TIXML_SNSCANF  _snscanf</span>
+<a name="l00073"></a>00073 <span class="preprocessor"></span><span class="preprocessor">        #define TIXML_SSCANF   sscanf</span>
+<a name="l00074"></a>00074 <span class="preprocessor"></span><span class="preprocessor">    #elif defined(__GNUC__) &amp;&amp; (__GNUC__ &gt;= 3 )</span>
+<a name="l00075"></a>00075 <span class="preprocessor"></span>        <span class="comment">// GCC version 3 and higher.s</span>
+<a name="l00076"></a>00076         <span class="comment">//#warning( "Using sn* functions." )</span>
+<a name="l00077"></a>00077 <span class="preprocessor">        #define TIXML_SNPRINTF snprintf</span>
+<a name="l00078"></a>00078 <span class="preprocessor"></span><span class="preprocessor">        #define TIXML_SNSCANF  snscanf</span>
+<a name="l00079"></a>00079 <span class="preprocessor"></span><span class="preprocessor">        #define TIXML_SSCANF   sscanf</span>
+<a name="l00080"></a>00080 <span class="preprocessor"></span><span class="preprocessor">    #else</span>
+<a name="l00081"></a>00081 <span class="preprocessor"></span><span class="preprocessor">        #define TIXML_SSCANF   sscanf</span>
+<a name="l00082"></a>00082 <span class="preprocessor"></span><span class="preprocessor">    #endif</span>
+<a name="l00083"></a>00083 <span class="preprocessor"></span><span class="preprocessor">#endif  </span>
+<a name="l00084"></a>00084 <span class="preprocessor"></span>
+<a name="l00085"></a>00085 <span class="keyword">class </span><a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>;
+<a name="l00086"></a>00086 <span class="keyword">class </span><a class="code" href="classTiXmlElement.html">TiXmlElement</a>;
+<a name="l00087"></a>00087 <span class="keyword">class </span><a class="code" href="classTiXmlComment.html">TiXmlComment</a>;
+<a name="l00088"></a>00088 <span class="keyword">class </span><a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>;
+<a name="l00089"></a>00089 <span class="keyword">class </span><a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>;
+<a name="l00090"></a>00090 <span class="keyword">class </span><a class="code" href="classTiXmlText.html">TiXmlText</a>;
+<a name="l00091"></a>00091 <span class="keyword">class </span><a class="code" href="classTiXmlDeclaration.html">TiXmlDeclaration</a>;
+<a name="l00092"></a>00092 <span class="keyword">class </span>TiXmlParsingData;
+<a name="l00093"></a>00093 
+<a name="l00094"></a>00094 <span class="keyword">const</span> <span class="keywordtype">int</span> TIXML_MAJOR_VERSION = 2;
+<a name="l00095"></a>00095 <span class="keyword">const</span> <span class="keywordtype">int</span> TIXML_MINOR_VERSION = 5;
+<a name="l00096"></a>00096 <span class="keyword">const</span> <span class="keywordtype">int</span> TIXML_PATCH_VERSION = 3;
+<a name="l00097"></a>00097 
+<a name="l00098"></a>00098 <span class="comment">/*  Internal structure for tracking location of items </span>
+<a name="l00099"></a>00099 <span class="comment">    in the XML file.</span>
+<a name="l00100"></a>00100 <span class="comment">*/</span>
+<a name="l00101"></a>00101 <span class="keyword">struct </span>TiXmlCursor
+<a name="l00102"></a>00102 {
+<a name="l00103"></a>00103     TiXmlCursor()       { Clear(); }
+<a name="l00104"></a>00104     <span class="keywordtype">void</span> Clear()        { row = col = -1; }
+<a name="l00105"></a>00105 
+<a name="l00106"></a>00106     <span class="keywordtype">int</span> row;    <span class="comment">// 0 based.</span>
+<a name="l00107"></a>00107     <span class="keywordtype">int</span> col;    <span class="comment">// 0 based.</span>
+<a name="l00108"></a>00108 };
+<a name="l00109"></a>00109 
+<a name="l00110"></a>00110 
+<a name="l00129"></a><a class="code" href="classTiXmlVisitor.html">00129</a> <span class="keyword">class </span><a class="code" href="classTiXmlVisitor.html">TiXmlVisitor</a>
+<a name="l00130"></a>00130 {
+<a name="l00131"></a>00131 <span class="keyword">public</span>:
+<a name="l00132"></a>00132     <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlVisitor.html">TiXmlVisitor</a>() {}
+<a name="l00133"></a>00133 
+<a name="l00135"></a><a class="code" href="classTiXmlVisitor.html#07baecb52dd7d8716ae2a48ad0956ee0">00135</a>     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlVisitor.html#07baecb52dd7d8716ae2a48ad0956ee0">VisitEnter</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>&amp; <span class="comment">/*doc*/</span> )         { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
+<a name="l00137"></a><a class="code" href="classTiXmlVisitor.html#a0ade4f27087447e93974e975c3246ad">00137</a>     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlVisitor.html#a0ade4f27087447e93974e975c3246ad">VisitExit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>&amp; <span class="comment">/*doc*/</span> )          { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
+<a name="l00138"></a>00138 
+<a name="l00140"></a><a class="code" href="classTiXmlVisitor.html#f6c6178ffa517bbdba95d70490875fff">00140</a>     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlVisitor.html#07baecb52dd7d8716ae2a48ad0956ee0">VisitEnter</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>&amp; <span class="comment">/*element*/</span>, <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* <span class="comment">/*firstAttribute*/</span> )    { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
+<a name="l00142"></a><a class="code" href="classTiXmlVisitor.html#ec2b1f8116226d52f3a1b95dafd3a32c">00142</a>     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlVisitor.html#a0ade4f27087447e93974e975c3246ad">VisitExit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>&amp; <span class="comment">/*element*/</span> )       { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
+<a name="l00143"></a>00143 
+<a name="l00145"></a><a class="code" href="classTiXmlVisitor.html#fad71c71ce6473fb9b4b64cd92de4a19">00145</a>     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlVisitor.html#fad71c71ce6473fb9b4b64cd92de4a19">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDeclaration.html">TiXmlDeclaration</a>&amp; <span class="comment">/*declaration*/</span> )   { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
+<a name="l00147"></a><a class="code" href="classTiXmlVisitor.html#399b8ebca5cd14664974a32d2ce029e5">00147</a>     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlVisitor.html#fad71c71ce6473fb9b4b64cd92de4a19">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlText.html">TiXmlText</a>&amp; <span class="comment">/*text*/</span> )                 { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
+<a name="l00149"></a><a class="code" href="classTiXmlVisitor.html#53a60e7a528627b31af3161972cc7fa2">00149</a>     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlVisitor.html#fad71c71ce6473fb9b4b64cd92de4a19">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlComment.html">TiXmlComment</a>&amp; <span class="comment">/*comment*/</span> )           { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
+<a name="l00151"></a><a class="code" href="classTiXmlVisitor.html#7e284d607d275c51dac1adb58159ce28">00151</a>     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlVisitor.html#fad71c71ce6473fb9b4b64cd92de4a19">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>&amp; <span class="comment">/*unknown*/</span> )           { <span class="keywordflow">return</span> <span class="keyword">true</span>; }
+<a name="l00152"></a>00152 };
+<a name="l00153"></a>00153 
+<a name="l00154"></a>00154 <span class="comment">// Only used by Attribute::Query functions</span>
+<a name="l00155"></a>00155 <span class="keyword">enum</span> 
+<a name="l00156"></a>00156 { 
+<a name="l00157"></a>00157     TIXML_SUCCESS,
+<a name="l00158"></a>00158     TIXML_NO_ATTRIBUTE,
+<a name="l00159"></a>00159     TIXML_WRONG_TYPE
+<a name="l00160"></a>00160 };
+<a name="l00161"></a>00161 
+<a name="l00162"></a>00162 
+<a name="l00163"></a>00163 <span class="comment">// Used by the parsing routines.</span>
+<a name="l00164"></a>00164 <span class="keyword">enum</span> TiXmlEncoding
+<a name="l00165"></a>00165 {
+<a name="l00166"></a>00166     TIXML_ENCODING_UNKNOWN,
+<a name="l00167"></a>00167     TIXML_ENCODING_UTF8,
+<a name="l00168"></a>00168     TIXML_ENCODING_LEGACY
+<a name="l00169"></a>00169 };
+<a name="l00170"></a>00170 
+<a name="l00171"></a>00171 <span class="keyword">const</span> TiXmlEncoding TIXML_DEFAULT_ENCODING = TIXML_ENCODING_UNKNOWN;
+<a name="l00172"></a>00172 
+<a name="l00195"></a><a class="code" href="classTiXmlBase.html">00195</a> <span class="keyword">class </span><a class="code" href="classTiXmlBase.html">TiXmlBase</a>
+<a name="l00196"></a>00196 {
+<a name="l00197"></a>00197     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTiXmlNode.html">TiXmlNode</a>;
+<a name="l00198"></a>00198     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTiXmlElement.html">TiXmlElement</a>;
+<a name="l00199"></a>00199     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>;
+<a name="l00200"></a>00200 
+<a name="l00201"></a>00201 <span class="keyword">public</span>:
+<a name="l00202"></a>00202     <a class="code" href="classTiXmlBase.html">TiXmlBase</a>() :   <a class="code" href="classTiXmlBase.html#b242c01590191f644569fa89a080d97c">userData</a>(0)     {}
+<a name="l00203"></a>00203     <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlBase.html">TiXmlBase</a>()            {}
+<a name="l00204"></a>00204 
+<a name="l00214"></a>00214     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlBase.html#0de56b3f2ef14c65091a3b916437b512">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth ) <span class="keyword">const </span>= 0;
+<a name="l00215"></a>00215 
+<a name="l00222"></a><a class="code" href="classTiXmlBase.html#0f799ec645bfb8d8a969e83478f379c1">00222</a>     <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlBase.html#0f799ec645bfb8d8a969e83478f379c1">SetCondenseWhiteSpace</a>( <span class="keywordtype">bool</span> condense )      { condenseWhiteSpace = condense; }
+<a name="l00223"></a>00223 
+<a name="l00225"></a><a class="code" href="classTiXmlBase.html#d4b1472531c647a25b1840a87ae42438">00225</a>     <span class="keyword">static</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlBase.html#d4b1472531c647a25b1840a87ae42438">IsWhiteSpaceCondensed</a>()                     { <span class="keywordflow">return</span> condenseWhiteSpace; }
+<a name="l00226"></a>00226 
+<a name="l00245"></a><a class="code" href="classTiXmlBase.html#024bceb070188df92c2a8d8852dd0853">00245</a>     <span class="keywordtype">int</span> <a class="code" href="classTiXmlBase.html#024bceb070188df92c2a8d8852dd0853">Row</a>()<span class="keyword"> const         </span>{ <span class="keywordflow">return</span> location.row + 1; }
+<a name="l00246"></a><a class="code" href="classTiXmlBase.html#b54bfb9b70fe6dd276e7b279cab7f003">00246</a>     <span class="keywordtype">int</span> <a class="code" href="classTiXmlBase.html#b54bfb9b70fe6dd276e7b279cab7f003">Column</a>()<span class="keyword"> const      </span>{ <span class="keywordflow">return</span> location.col + 1; }    
+<a name="l00247"></a>00247 
+<a name="l00248"></a><a class="code" href="classTiXmlBase.html#c6b3e0f790930d4970ec30764e937b5d">00248</a>     <span class="keywordtype">void</span>  <a class="code" href="classTiXmlBase.html#c6b3e0f790930d4970ec30764e937b5d">SetUserData</a>( <span class="keywordtype">void</span>* user )         { <a class="code" href="classTiXmlBase.html#b242c01590191f644569fa89a080d97c">userData</a> = user; }    
+<a name="l00249"></a><a class="code" href="classTiXmlBase.html#6559a530ca6763fc301a14d77ed28c17">00249</a>     <span class="keywordtype">void</span>* <a class="code" href="classTiXmlBase.html#6559a530ca6763fc301a14d77ed28c17">GetUserData</a>()                     { <span class="keywordflow">return</span> <a class="code" href="classTiXmlBase.html#b242c01590191f644569fa89a080d97c">userData</a>; }    
+<a name="l00250"></a><a class="code" href="classTiXmlBase.html#d0120210e4680ef2088601753ce0ede4">00250</a>     <span class="keyword">const</span> <span class="keywordtype">void</span>* <a class="code" href="classTiXmlBase.html#6559a530ca6763fc301a14d77ed28c17">GetUserData</a>()<span class="keyword"> const         </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlBase.html#b242c01590191f644569fa89a080d97c">userData</a>; }    
+<a name="l00251"></a>00251 
+<a name="l00252"></a>00252     <span class="comment">// Table that returs, for a given lead byte, the total number of bytes</span>
+<a name="l00253"></a>00253     <span class="comment">// in the UTF-8 sequence.</span>
+<a name="l00254"></a>00254     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">int</span> utf8ByteTable[256];
+<a name="l00255"></a>00255 
+<a name="l00256"></a>00256     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlDocument.html#17ebabe36926ef398e78dec0d0ad0378">Parse</a>(  <span class="keyword">const</span> <span class="keywordtype">char</span>* p, 
+<a name="l00257"></a>00257                                 TiXmlParsingData* data, 
+<a name="l00258"></a>00258                                 TiXmlEncoding encoding <span class="comment">/*= TIXML_ENCODING_UNKNOWN */</span> ) = 0;
+<a name="l00259"></a>00259 
+<a name="l00263"></a>00263     <span class="keyword">static</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlBase.html#6bd8c315c1acb09e34107b8736505948">EncodeString</a>( <span class="keyword">const</span> TIXML_STRING&amp; str, TIXML_STRING* out );
+<a name="l00264"></a>00264 
+<a name="l00265"></a>00265     <span class="keyword">enum</span>
+<a name="l00266"></a>00266     {
+<a name="l00267"></a>00267         TIXML_NO_ERROR = 0,
+<a name="l00268"></a>00268         TIXML_ERROR,
+<a name="l00269"></a>00269         TIXML_ERROR_OPENING_FILE,
+<a name="l00270"></a>00270         TIXML_ERROR_OUT_OF_MEMORY,
+<a name="l00271"></a>00271         TIXML_ERROR_PARSING_ELEMENT,
+<a name="l00272"></a>00272         TIXML_ERROR_FAILED_TO_READ_ELEMENT_NAME,
+<a name="l00273"></a>00273         TIXML_ERROR_READING_ELEMENT_VALUE,
+<a name="l00274"></a>00274         TIXML_ERROR_READING_ATTRIBUTES,
+<a name="l00275"></a>00275         TIXML_ERROR_PARSING_EMPTY,
+<a name="l00276"></a>00276         TIXML_ERROR_READING_END_TAG,
+<a name="l00277"></a>00277         TIXML_ERROR_PARSING_UNKNOWN,
+<a name="l00278"></a>00278         TIXML_ERROR_PARSING_COMMENT,
+<a name="l00279"></a>00279         TIXML_ERROR_PARSING_DECLARATION,
+<a name="l00280"></a>00280         TIXML_ERROR_DOCUMENT_EMPTY,
+<a name="l00281"></a>00281         TIXML_ERROR_EMBEDDED_NULL,
+<a name="l00282"></a>00282         TIXML_ERROR_PARSING_CDATA,
+<a name="l00283"></a>00283         TIXML_ERROR_DOCUMENT_TOP_ONLY,
+<a name="l00284"></a>00284 
+<a name="l00285"></a>00285         TIXML_ERROR_STRING_COUNT
+<a name="l00286"></a>00286     };
+<a name="l00287"></a>00287 
+<a name="l00288"></a>00288 <span class="keyword">protected</span>:
+<a name="l00289"></a>00289 
+<a name="l00290"></a>00290     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* SkipWhiteSpace( <span class="keyword">const</span> <span class="keywordtype">char</span>*, TiXmlEncoding encoding );
+<a name="l00291"></a>00291     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">bool</span> IsWhiteSpace( <span class="keywordtype">char</span> c )       
+<a name="l00292"></a>00292     { 
+<a name="l00293"></a>00293         <span class="keywordflow">return</span> ( isspace( (<span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>) c ) || c == <span class="charliteral">'\n'</span> || c == <span class="charliteral">'\r'</span> ); 
+<a name="l00294"></a>00294     }
+<a name="l00295"></a>00295     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">bool</span> IsWhiteSpace( <span class="keywordtype">int</span> c )
+<a name="l00296"></a>00296     {
+<a name="l00297"></a>00297         <span class="keywordflow">if</span> ( c &lt; 256 )
+<a name="l00298"></a>00298             <span class="keywordflow">return</span> IsWhiteSpace( (<span class="keywordtype">char</span>) c );
+<a name="l00299"></a>00299         <span class="keywordflow">return</span> <span class="keyword">false</span>;   <span class="comment">// Again, only truly correct for English/Latin...but usually works.</span>
+<a name="l00300"></a>00300     }
+<a name="l00301"></a>00301 
+<a name="l00302"></a>00302 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l00303"></a>00303 <span class="preprocessor"></span>    <span class="keyword">static</span> <span class="keywordtype">bool</span> StreamWhiteSpace( std::istream * in, TIXML_STRING * tag );
+<a name="l00304"></a>00304     <span class="keyword">static</span> <span class="keywordtype">bool</span> StreamTo( std::istream * in, <span class="keywordtype">int</span> character, TIXML_STRING * tag );
+<a name="l00305"></a>00305 <span class="preprocessor">    #endif</span>
+<a name="l00306"></a>00306 <span class="preprocessor"></span>
+<a name="l00307"></a>00307     <span class="comment">/*  Reads an XML name into the string provided. Returns</span>
+<a name="l00308"></a>00308 <span class="comment">        a pointer just past the last character of the name,</span>
+<a name="l00309"></a>00309 <span class="comment">        or 0 if the function has an error.</span>
+<a name="l00310"></a>00310 <span class="comment">    */</span>
+<a name="l00311"></a>00311     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* ReadName( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TIXML_STRING* name, TiXmlEncoding encoding );
+<a name="l00312"></a>00312 
+<a name="l00313"></a>00313     <span class="comment">/*  Reads text. Returns a pointer past the given end tag.</span>
+<a name="l00314"></a>00314 <span class="comment">        Wickedly complex options, but it keeps the (sensitive) code in one place.</span>
+<a name="l00315"></a>00315 <span class="comment">    */</span>
+<a name="l00316"></a>00316     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* ReadText(    <span class="keyword">const</span> <span class="keywordtype">char</span>* in,             <span class="comment">// where to start</span>
+<a name="l00317"></a>00317                                     TIXML_STRING* text,         <span class="comment">// the string read</span>
+<a name="l00318"></a>00318                                     <span class="keywordtype">bool</span> ignoreWhiteSpace,      <span class="comment">// whether to keep the white space</span>
+<a name="l00319"></a>00319                                     <span class="keyword">const</span> <span class="keywordtype">char</span>* endTag,         <span class="comment">// what ends this text</span>
+<a name="l00320"></a>00320                                     <span class="keywordtype">bool</span> ignoreCase,            <span class="comment">// whether to ignore case in the end tag</span>
+<a name="l00321"></a>00321                                     TiXmlEncoding encoding );   <span class="comment">// the current encoding</span>
+<a name="l00322"></a>00322 
+<a name="l00323"></a>00323     <span class="comment">// If an entity has been found, transform it into a character.</span>
+<a name="l00324"></a>00324     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* GetEntity( <span class="keyword">const</span> <span class="keywordtype">char</span>* in, <span class="keywordtype">char</span>* value, <span class="keywordtype">int</span>* length, TiXmlEncoding encoding );
+<a name="l00325"></a>00325 
+<a name="l00326"></a>00326     <span class="comment">// Get a character, while interpreting entities.</span>
+<a name="l00327"></a>00327     <span class="comment">// The length can be from 0 to 4 bytes.</span>
+<a name="l00328"></a>00328     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* GetChar( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, <span class="keywordtype">char</span>* _value, <span class="keywordtype">int</span>* length, TiXmlEncoding encoding )
+<a name="l00329"></a>00329     {
+<a name="l00330"></a>00330         assert( p );
+<a name="l00331"></a>00331         <span class="keywordflow">if</span> ( encoding == TIXML_ENCODING_UTF8 )
+<a name="l00332"></a>00332         {
+<a name="l00333"></a>00333             *length = utf8ByteTable[ *((<span class="keyword">const</span> <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span>*)p) ];
+<a name="l00334"></a>00334             assert( *length &gt;= 0 &amp;&amp; *length &lt; 5 );
+<a name="l00335"></a>00335         }
+<a name="l00336"></a>00336         <span class="keywordflow">else</span>
+<a name="l00337"></a>00337         {
+<a name="l00338"></a>00338             *length = 1;
+<a name="l00339"></a>00339         }
+<a name="l00340"></a>00340 
+<a name="l00341"></a>00341         <span class="keywordflow">if</span> ( *length == 1 )
+<a name="l00342"></a>00342         {
+<a name="l00343"></a>00343             <span class="keywordflow">if</span> ( *p == <span class="charliteral">'&amp;'</span> )
+<a name="l00344"></a>00344                 <span class="keywordflow">return</span> GetEntity( p, _value, length, encoding );
+<a name="l00345"></a>00345             *_value = *p;
+<a name="l00346"></a>00346             <span class="keywordflow">return</span> p+1;
+<a name="l00347"></a>00347         }
+<a name="l00348"></a>00348         <span class="keywordflow">else</span> <span class="keywordflow">if</span> ( *length )
+<a name="l00349"></a>00349         {
+<a name="l00350"></a>00350             <span class="comment">//strncpy( _value, p, *length );    // lots of compilers don't like this function (unsafe),</span>
+<a name="l00351"></a>00351                                                 <span class="comment">// and the null terminator isn't needed</span>
+<a name="l00352"></a>00352             <span class="keywordflow">for</span>( <span class="keywordtype">int</span> i=0; p[i] &amp;&amp; i&lt;*length; ++i ) {
+<a name="l00353"></a>00353                 _value[i] = p[i];
+<a name="l00354"></a>00354             }
+<a name="l00355"></a>00355             <span class="keywordflow">return</span> p + (*length);
+<a name="l00356"></a>00356         }
+<a name="l00357"></a>00357         <span class="keywordflow">else</span>
+<a name="l00358"></a>00358         {
+<a name="l00359"></a>00359             <span class="comment">// Not valid text.</span>
+<a name="l00360"></a>00360             <span class="keywordflow">return</span> 0;
+<a name="l00361"></a>00361         }
+<a name="l00362"></a>00362     }
+<a name="l00363"></a>00363 
+<a name="l00364"></a>00364     <span class="comment">// Return true if the next characters in the stream are any of the endTag sequences.</span>
+<a name="l00365"></a>00365     <span class="comment">// Ignore case only works for english, and should only be relied on when comparing</span>
+<a name="l00366"></a>00366     <span class="comment">// to English words: StringEqual( p, "version", true ) is fine.</span>
+<a name="l00367"></a>00367     <span class="keyword">static</span> <span class="keywordtype">bool</span> StringEqual(    <span class="keyword">const</span> <span class="keywordtype">char</span>* p,
+<a name="l00368"></a>00368                                 <span class="keyword">const</span> <span class="keywordtype">char</span>* endTag,
+<a name="l00369"></a>00369                                 <span class="keywordtype">bool</span> ignoreCase,
+<a name="l00370"></a>00370                                 TiXmlEncoding encoding );
+<a name="l00371"></a>00371 
+<a name="l00372"></a>00372     <span class="keyword">static</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* errorString[ TIXML_ERROR_STRING_COUNT ];
+<a name="l00373"></a>00373 
+<a name="l00374"></a>00374     TiXmlCursor location;
+<a name="l00375"></a>00375 
+<a name="l00377"></a><a class="code" href="classTiXmlBase.html#b242c01590191f644569fa89a080d97c">00377</a>     <span class="keywordtype">void</span>*           <a class="code" href="classTiXmlBase.html#b242c01590191f644569fa89a080d97c">userData</a>;
+<a name="l00378"></a>00378     
+<a name="l00379"></a>00379     <span class="comment">// None of these methods are reliable for any language except English.</span>
+<a name="l00380"></a>00380     <span class="comment">// Good for approximation, not great for accuracy.</span>
+<a name="l00381"></a>00381     <span class="keyword">static</span> <span class="keywordtype">int</span> IsAlpha( <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> anyByte, TiXmlEncoding encoding );
+<a name="l00382"></a>00382     <span class="keyword">static</span> <span class="keywordtype">int</span> IsAlphaNum( <span class="keywordtype">unsigned</span> <span class="keywordtype">char</span> anyByte, TiXmlEncoding encoding );
+<a name="l00383"></a>00383     <span class="keyword">inline</span> <span class="keyword">static</span> <span class="keywordtype">int</span> ToLower( <span class="keywordtype">int</span> v, TiXmlEncoding encoding )
+<a name="l00384"></a>00384     {
+<a name="l00385"></a>00385         <span class="keywordflow">if</span> ( encoding == TIXML_ENCODING_UTF8 )
+<a name="l00386"></a>00386         {
+<a name="l00387"></a>00387             <span class="keywordflow">if</span> ( v &lt; 128 ) <span class="keywordflow">return</span> tolower( v );
+<a name="l00388"></a>00388             <span class="keywordflow">return</span> v;
+<a name="l00389"></a>00389         }
+<a name="l00390"></a>00390         <span class="keywordflow">else</span>
+<a name="l00391"></a>00391         {
+<a name="l00392"></a>00392             <span class="keywordflow">return</span> tolower( v );
+<a name="l00393"></a>00393         }
+<a name="l00394"></a>00394     }
+<a name="l00395"></a>00395     <span class="keyword">static</span> <span class="keywordtype">void</span> ConvertUTF32ToUTF8( <span class="keywordtype">unsigned</span> <span class="keywordtype">long</span> input, <span class="keywordtype">char</span>* output, <span class="keywordtype">int</span>* length );
+<a name="l00396"></a>00396 
+<a name="l00397"></a>00397 <span class="keyword">private</span>:
+<a name="l00398"></a>00398     <a class="code" href="classTiXmlBase.html">TiXmlBase</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlBase.html">TiXmlBase</a>&amp; );              <span class="comment">// not implemented.</span>
+<a name="l00399"></a>00399     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlBase.html">TiXmlBase</a>&amp; base );    <span class="comment">// not allowed.</span>
+<a name="l00400"></a>00400 
+<a name="l00401"></a>00401     <span class="keyword">struct </span>Entity
+<a name="l00402"></a>00402     {
+<a name="l00403"></a>00403         <span class="keyword">const</span> <span class="keywordtype">char</span>*     str;
+<a name="l00404"></a>00404         <span class="keywordtype">unsigned</span> <span class="keywordtype">int</span>    strLength;
+<a name="l00405"></a>00405         <span class="keywordtype">char</span>            chr;
+<a name="l00406"></a>00406     };
+<a name="l00407"></a>00407     <span class="keyword">enum</span>
+<a name="l00408"></a>00408     {
+<a name="l00409"></a>00409         NUM_ENTITY = 5,
+<a name="l00410"></a>00410         MAX_ENTITY_LENGTH = 6
+<a name="l00411"></a>00411 
+<a name="l00412"></a>00412     };
+<a name="l00413"></a>00413     <span class="keyword">static</span> Entity entity[ NUM_ENTITY ];
+<a name="l00414"></a>00414     <span class="keyword">static</span> <span class="keywordtype">bool</span> condenseWhiteSpace;
+<a name="l00415"></a>00415 };
+<a name="l00416"></a>00416 
+<a name="l00417"></a>00417 
+<a name="l00424"></a><a class="code" href="classTiXmlNode.html">00424</a> <span class="keyword">class </span><a class="code" href="classTiXmlNode.html">TiXmlNode</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlBase.html">TiXmlBase</a>
+<a name="l00425"></a>00425 {
+<a name="l00426"></a>00426     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>;
+<a name="l00427"></a>00427     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTiXmlElement.html">TiXmlElement</a>;
+<a name="l00428"></a>00428 
+<a name="l00429"></a>00429 <span class="keyword">public</span>:
+<a name="l00430"></a>00430 <span class="preprocessor">    #ifdef TIXML_USE_STL    </span>
+<a name="l00431"></a>00431 <span class="preprocessor"></span>
+<a name="l00435"></a>00435         <span class="keyword">friend</span> std::istream&amp; <a class="code" href="classTiXmlNode.html#b57bd426563c926844f65a78412e18b9">operator &gt;&gt; </a>(std::istream&amp; in, <a class="code" href="classTiXmlNode.html">TiXmlNode</a>&amp; base);
+<a name="l00436"></a>00436 
+<a name="l00453"></a>00453         <span class="keyword">friend</span> std::ostream&amp; <a class="code" href="classTiXmlNode.html#86cd49cfb17a844c0010b3136ac966c7">operator&lt;&lt; </a>(std::ostream&amp; out, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>&amp; base);
+<a name="l00454"></a>00454 
+<a name="l00456"></a>00456         <span class="keyword">friend</span> std::string&amp; <a class="code" href="classTiXmlNode.html#86cd49cfb17a844c0010b3136ac966c7">operator&lt;&lt; </a>(std::string&amp; out, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>&amp; base );
+<a name="l00457"></a>00457 
+<a name="l00458"></a>00458 <span class="preprocessor">    #endif</span>
+<a name="l00459"></a>00459 <span class="preprocessor"></span>
+<a name="l00463"></a><a class="code" href="classTiXmlNode.html#836eded4920ab9e9ef28496f48cd95a2">00463</a>     <span class="keyword">enum</span> <a class="code" href="classTiXmlNode.html#836eded4920ab9e9ef28496f48cd95a2">NodeType</a>
+<a name="l00464"></a>00464     {
+<a name="l00465"></a>00465         DOCUMENT,
+<a name="l00466"></a>00466         ELEMENT,
+<a name="l00467"></a>00467         COMMENT,
+<a name="l00468"></a>00468         UNKNOWN,
+<a name="l00469"></a>00469         TEXT,
+<a name="l00470"></a>00470         DECLARATION,
+<a name="l00471"></a>00471         TYPECOUNT
+<a name="l00472"></a>00472     };
+<a name="l00473"></a>00473 
+<a name="l00474"></a>00474     <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlNode.html">TiXmlNode</a>();
+<a name="l00475"></a>00475 
+<a name="l00488"></a><a class="code" href="classTiXmlNode.html#77943eb90d12c2892b1337a9f5918b41">00488</a>     <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classTiXmlNode.html#77943eb90d12c2892b1337a9f5918b41">Value</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> value.c_str (); }
+<a name="l00489"></a>00489 
+<a name="l00490"></a>00490 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l00491"></a>00491 <span class="preprocessor"></span>
+<a name="l00495"></a><a class="code" href="classTiXmlNode.html#6d9e505619d39bf50bfd9609c9169ea5">00495</a>     <span class="keyword">const</span> std::string&amp; <a class="code" href="classTiXmlNode.html#6d9e505619d39bf50bfd9609c9169ea5">ValueStr</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> value; }
+<a name="l00496"></a>00496 <span class="preprocessor">    #endif</span>
+<a name="l00497"></a>00497 <span class="preprocessor"></span>
+<a name="l00498"></a>00498     <span class="keyword">const</span> TIXML_STRING&amp; ValueTStr()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> value; }
+<a name="l00499"></a>00499 
+<a name="l00509"></a><a class="code" href="classTiXmlNode.html#2a38329ca5d3f28f98ce932b8299ae90">00509</a>     <span class="keywordtype">void</span> <a class="code" href="classTiXmlNode.html#2a38329ca5d3f28f98ce932b8299ae90">SetValue</a>(<span class="keyword">const</span> <span class="keywordtype">char</span> * _value) { value = _value;}
+<a name="l00510"></a>00510 
+<a name="l00511"></a>00511 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l00513"></a><a class="code" href="classTiXmlNode.html#2598d5f448042c1abbeae4503dd45ff2">00513</a> <span class="preprocessor">    void SetValue( const std::string&amp; _value )  { value = _value; }</span>
+<a name="l00514"></a>00514 <span class="preprocessor"></span><span class="preprocessor">    #endif</span>
+<a name="l00515"></a>00515 <span class="preprocessor"></span>
+<a name="l00517"></a>00517     <span class="keywordtype">void</span> <a class="code" href="classTiXmlNode.html#708e7f953df61d4d2d12f73171550a4b">Clear</a>();
+<a name="l00518"></a>00518 
+<a name="l00520"></a><a class="code" href="classTiXmlNode.html#b643043132ffd794f8602685d34a982e">00520</a>     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#b643043132ffd794f8602685d34a982e">Parent</a>()                         { <span class="keywordflow">return</span> parent; }
+<a name="l00521"></a>00521     <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#b643043132ffd794f8602685d34a982e">Parent</a>()<span class="keyword"> const             </span>{ <span class="keywordflow">return</span> parent; }
+<a name="l00522"></a>00522 
+<a name="l00523"></a><a class="code" href="classTiXmlNode.html#44c8eee26bbe2d1b2762038df9dde2f0">00523</a>     <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#44c8eee26bbe2d1b2762038df9dde2f0">FirstChild</a>()<span class="keyword">   const       </span>{ <span class="keywordflow">return</span> firstChild; }  
+<a name="l00524"></a>00524     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#44c8eee26bbe2d1b2762038df9dde2f0">FirstChild</a>()                     { <span class="keywordflow">return</span> firstChild; }
+<a name="l00525"></a>00525     <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#44c8eee26bbe2d1b2762038df9dde2f0">FirstChild</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * value ) <span class="keyword">const</span>;            
+<a name="l00526"></a>00526 
+<a name="l00527"></a><a class="code" href="classTiXmlNode.html#bc8bf32be6419ec453a731868de19554">00527</a>     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#44c8eee26bbe2d1b2762038df9dde2f0">FirstChild</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * _value ) {
+<a name="l00528"></a>00528         <span class="comment">// Call through to the const version - safe since nothing is changed. Exiting syntax: cast this to a const (always safe)</span>
+<a name="l00529"></a>00529         <span class="comment">// call the method, cast the return back to non-const.</span>
+<a name="l00530"></a>00530         <span class="keywordflow">return</span> const_cast&lt; TiXmlNode* &gt; ((const_cast&lt; const TiXmlNode* &gt;(<span class="keyword">this</span>))-&gt;FirstChild( _value ));
+<a name="l00531"></a>00531     }
+<a name="l00532"></a>00532     <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* LastChild()<span class="keyword"> const  </span>{ <span class="keywordflow">return</span> lastChild; }       
+<a name="l00533"></a><a class="code" href="classTiXmlNode.html#6432d2b2495f6caf9cb4278df706a031">00533</a>     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* LastChild()  { <span class="keywordflow">return</span> lastChild; }
+<a name="l00534"></a>00534     
+<a name="l00535"></a>00535     <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* LastChild( <span class="keyword">const</span> <span class="keywordtype">char</span> * value ) <span class="keyword">const</span>;         
+<a name="l00536"></a><a class="code" href="classTiXmlNode.html#bad5bf1059c48127b958711ef89e8e5d">00536</a>     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* LastChild( <span class="keyword">const</span> <span class="keywordtype">char</span> * _value ) {
+<a name="l00537"></a>00537         <span class="keywordflow">return</span> const_cast&lt; TiXmlNode* &gt; ((const_cast&lt; const TiXmlNode* &gt;(<span class="keyword">this</span>))-&gt;LastChild( _value ));
+<a name="l00538"></a>00538     }
+<a name="l00539"></a>00539 
+<a name="l00540"></a>00540 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l00541"></a><a class="code" href="classTiXmlNode.html#07f6200a5956c723c5b52d70f29c46f6">00541</a> <span class="preprocessor"></span>    <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#44c8eee26bbe2d1b2762038df9dde2f0">FirstChild</a>( <span class="keyword">const</span> std::string&amp; _value )<span class="keyword"> const  </span>{   <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#44c8eee26bbe2d1b2762038df9dde2f0">FirstChild</a> (_value.c_str ());    }   
+<a name="l00542"></a><a class="code" href="classTiXmlNode.html#10d2669ccb5e29e02fcb0e4408685ef6">00542</a>     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#44c8eee26bbe2d1b2762038df9dde2f0">FirstChild</a>( <span class="keyword">const</span> std::string&amp; _value )              {   <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#44c8eee26bbe2d1b2762038df9dde2f0">FirstChild</a> (_value.c_str ());    }   
+<a name="l00543"></a><a class="code" href="classTiXmlNode.html#256d0cdbfcfeccae83f3a1c9747a8b63">00543</a>     <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* LastChild( <span class="keyword">const</span> std::string&amp; _value )<span class="keyword"> const   </span>{   <span class="keywordflow">return</span> LastChild (_value.c_str ()); }   
+<a name="l00544"></a><a class="code" href="classTiXmlNode.html#69772c9202f70553f940b15c06b07be3">00544</a>     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* LastChild( <span class="keyword">const</span> std::string&amp; _value )               {   <span class="keywordflow">return</span> LastChild (_value.c_str ()); }   
+<a name="l00545"></a>00545 <span class="preprocessor">    #endif</span>
+<a name="l00546"></a>00546 <span class="preprocessor"></span>
+<a name="l00563"></a>00563     <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#8621196ba3705fa226bef4a761cc51b6">IterateChildren</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* previous ) <span class="keyword">const</span>;
+<a name="l00564"></a>00564     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#8621196ba3705fa226bef4a761cc51b6">IterateChildren</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* previous ) {
+<a name="l00565"></a>00565         <span class="keywordflow">return</span> const_cast&lt; TiXmlNode* &gt;( (const_cast&lt; const TiXmlNode* &gt;(<span class="keyword">this</span>))-&gt;IterateChildren( previous ) );
+<a name="l00566"></a>00566     }
+<a name="l00567"></a>00567 
+<a name="l00569"></a>00569     <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#8621196ba3705fa226bef4a761cc51b6">IterateChildren</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * value, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* previous ) <span class="keyword">const</span>;
+<a name="l00570"></a>00570     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#8621196ba3705fa226bef4a761cc51b6">IterateChildren</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * _value, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* previous ) {
+<a name="l00571"></a>00571         <span class="keywordflow">return</span> const_cast&lt; TiXmlNode* &gt;( (const_cast&lt; const TiXmlNode* &gt;(<span class="keyword">this</span>))-&gt;IterateChildren( _value, previous ) );
+<a name="l00572"></a>00572     }
+<a name="l00573"></a>00573 
+<a name="l00574"></a>00574 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l00575"></a><a class="code" href="classTiXmlNode.html#1cbaaf8e82c09ad763d52616d75724df">00575</a> <span class="preprocessor"></span>    <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#8621196ba3705fa226bef4a761cc51b6">IterateChildren</a>( <span class="keyword">const</span> std::string&amp; _value, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* previous )<span class="keyword"> const  </span>{   <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#8621196ba3705fa226bef4a761cc51b6">IterateChildren</a> (_value.c_str (), previous); }   
+<a name="l00576"></a><a class="code" href="classTiXmlNode.html#16e9ad53e2f5445b14bf325c90aa862c">00576</a>     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#8621196ba3705fa226bef4a761cc51b6">IterateChildren</a>( <span class="keyword">const</span> std::string&amp; _value, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* previous ) {    <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#8621196ba3705fa226bef4a761cc51b6">IterateChildren</a> (_value.c_str (), previous); }   
+<a name="l00577"></a>00577 <span class="preprocessor">    #endif</span>
+<a name="l00578"></a>00578 <span class="preprocessor"></span>
+<a name="l00582"></a>00582     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#d7d4630e1a2a916edda16be22448a8ba">InsertEndChild</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>&amp; addThis );
+<a name="l00583"></a>00583 
+<a name="l00584"></a>00584 
+<a name="l00594"></a>00594     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#5d29442ae46de6d0168429156197bfc6">LinkEndChild</a>( <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* addThis );
+<a name="l00595"></a>00595 
+<a name="l00599"></a>00599     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#0c146fa2fff0157b681594102f48cbc7">InsertBeforeChild</a>( <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* beforeThis, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>&amp; addThis );
+<a name="l00600"></a>00600 
+<a name="l00604"></a>00604     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#d9b75e54ec19301c8b4d5ff583d0b3d5">InsertAfterChild</a>(  <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* afterThis, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>&amp; addThis );
+<a name="l00605"></a>00605 
+<a name="l00609"></a>00609     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#0c49e739a17b9938050c22cd89617fbd">ReplaceChild</a>( <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* replaceThis, <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>&amp; withThis );
+<a name="l00610"></a>00610 
+<a name="l00612"></a>00612     <span class="keywordtype">bool</span> <a class="code" href="classTiXmlNode.html#e19d8510efc90596552f4feeac9a8fbf">RemoveChild</a>( <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* removeThis );
+<a name="l00613"></a>00613 
+<a name="l00615"></a><a class="code" href="classTiXmlNode.html#c2cd892768726270e511b2ab32de4d10">00615</a>     <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#c2cd892768726270e511b2ab32de4d10">PreviousSibling</a>()<span class="keyword"> const            </span>{ <span class="keywordflow">return</span> prev; }
+<a name="l00616"></a>00616     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#c2cd892768726270e511b2ab32de4d10">PreviousSibling</a>()                        { <span class="keywordflow">return</span> prev; }
+<a name="l00617"></a>00617 
+<a name="l00619"></a>00619     <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#c2cd892768726270e511b2ab32de4d10">PreviousSibling</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * ) <span class="keyword">const</span>;
+<a name="l00620"></a>00620     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#c2cd892768726270e511b2ab32de4d10">PreviousSibling</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> *_prev ) {
+<a name="l00621"></a>00621         <span class="keywordflow">return</span> const_cast&lt; TiXmlNode* &gt;( (const_cast&lt; const TiXmlNode* &gt;(<span class="keyword">this</span>))-&gt;PreviousSibling( _prev ) );
+<a name="l00622"></a>00622     }
+<a name="l00623"></a>00623 
+<a name="l00624"></a>00624 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l00625"></a><a class="code" href="classTiXmlNode.html#658276f57d35d5d4256d1dc1a2c398ab">00625</a> <span class="preprocessor"></span>    <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#c2cd892768726270e511b2ab32de4d10">PreviousSibling</a>( <span class="keyword">const</span> std::string&amp; _value )<span class="keyword"> const </span>{   <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#c2cd892768726270e511b2ab32de4d10">PreviousSibling</a> (_value.c_str ());   }   
+<a name="l00626"></a><a class="code" href="classTiXmlNode.html#cc8a0434c7f401d4a3b6dee77c1a5912">00626</a>     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#c2cd892768726270e511b2ab32de4d10">PreviousSibling</a>( <span class="keyword">const</span> std::string&amp; _value )             {   <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#c2cd892768726270e511b2ab32de4d10">PreviousSibling</a> (_value.c_str ());   }   
+<a name="l00627"></a><a class="code" href="classTiXmlNode.html#1b94d2f7fa7ab25a5a8e8d4340c449c9">00627</a>     <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#f854baeba384f5fe9859f5aee03b548e">NextSibling</a>( <span class="keyword">const</span> std::string&amp; _value)<span class="keyword"> const      </span>{   <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#f854baeba384f5fe9859f5aee03b548e">NextSibling</a> (_value.c_str ());   }   
+<a name="l00628"></a><a class="code" href="classTiXmlNode.html#1757c1f4d01e8c9596ffdbd561c76aea">00628</a>     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#f854baeba384f5fe9859f5aee03b548e">NextSibling</a>( <span class="keyword">const</span> std::string&amp; _value)                  {   <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#f854baeba384f5fe9859f5aee03b548e">NextSibling</a> (_value.c_str ());   }   
+<a name="l00629"></a>00629 <span class="preprocessor">    #endif</span>
+<a name="l00630"></a>00630 <span class="preprocessor"></span>
+<a name="l00632"></a><a class="code" href="classTiXmlNode.html#f854baeba384f5fe9859f5aee03b548e">00632</a>     <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#f854baeba384f5fe9859f5aee03b548e">NextSibling</a>()<span class="keyword"> const                </span>{ <span class="keywordflow">return</span> next; }
+<a name="l00633"></a>00633     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#f854baeba384f5fe9859f5aee03b548e">NextSibling</a>()                            { <span class="keywordflow">return</span> next; }
+<a name="l00634"></a>00634 
+<a name="l00636"></a>00636     <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#f854baeba384f5fe9859f5aee03b548e">NextSibling</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * ) <span class="keyword">const</span>;
+<a name="l00637"></a>00637     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#f854baeba384f5fe9859f5aee03b548e">NextSibling</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* _next ) {
+<a name="l00638"></a>00638         <span class="keywordflow">return</span> const_cast&lt; TiXmlNode* &gt;( (const_cast&lt; const TiXmlNode* &gt;(<span class="keyword">this</span>))-&gt;NextSibling( _next ) );
+<a name="l00639"></a>00639     }
+<a name="l00640"></a>00640 
+<a name="l00645"></a>00645     <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#73acf929d49d10bd0e5fb3d31b0372d1">NextSiblingElement</a>() <span class="keyword">const</span>;
+<a name="l00646"></a>00646     <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#73acf929d49d10bd0e5fb3d31b0372d1">NextSiblingElement</a>() {
+<a name="l00647"></a>00647         <span class="keywordflow">return</span> const_cast&lt; TiXmlElement* &gt;( (const_cast&lt; const TiXmlNode* &gt;(<span class="keyword">this</span>))-&gt;NextSiblingElement() );
+<a name="l00648"></a>00648     }
+<a name="l00649"></a>00649 
+<a name="l00654"></a>00654     <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#73acf929d49d10bd0e5fb3d31b0372d1">NextSiblingElement</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * ) <span class="keyword">const</span>;
+<a name="l00655"></a>00655     <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#73acf929d49d10bd0e5fb3d31b0372d1">NextSiblingElement</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> *_next ) {
+<a name="l00656"></a>00656         <span class="keywordflow">return</span> const_cast&lt; TiXmlElement* &gt;( (const_cast&lt; const TiXmlNode* &gt;(<span class="keyword">this</span>))-&gt;NextSiblingElement( _next ) );
+<a name="l00657"></a>00657     }
+<a name="l00658"></a>00658 
+<a name="l00659"></a>00659 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l00660"></a><a class="code" href="classTiXmlNode.html#7572d0af9d1e696ee3f05d8bb5ebb463">00660</a> <span class="preprocessor"></span>    <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#73acf929d49d10bd0e5fb3d31b0372d1">NextSiblingElement</a>( <span class="keyword">const</span> std::string&amp; _value)<span class="keyword"> const    </span>{   <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#73acf929d49d10bd0e5fb3d31b0372d1">NextSiblingElement</a> (_value.c_str ());    }   
+<a name="l00661"></a><a class="code" href="classTiXmlNode.html#506958e34406729a4e4c5326ea39d081">00661</a>     <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#73acf929d49d10bd0e5fb3d31b0372d1">NextSiblingElement</a>( <span class="keyword">const</span> std::string&amp; _value)                {   <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#73acf929d49d10bd0e5fb3d31b0372d1">NextSiblingElement</a> (_value.c_str ());    }   
+<a name="l00662"></a>00662 <span class="preprocessor">    #endif</span>
+<a name="l00663"></a>00663 <span class="preprocessor"></span>
+<a name="l00665"></a>00665     <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#f4fb652f6bd79ae0d5ce7d0f7d3c0fba">FirstChildElement</a>() <span class="keyword">const</span>;
+<a name="l00666"></a>00666     <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#f4fb652f6bd79ae0d5ce7d0f7d3c0fba">FirstChildElement</a>() {
+<a name="l00667"></a>00667         <span class="keywordflow">return</span> const_cast&lt; TiXmlElement* &gt;( (const_cast&lt; const TiXmlNode* &gt;(<span class="keyword">this</span>))-&gt;FirstChildElement() );
+<a name="l00668"></a>00668     }
+<a name="l00669"></a>00669 
+<a name="l00671"></a>00671     <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#f4fb652f6bd79ae0d5ce7d0f7d3c0fba">FirstChildElement</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * _value ) <span class="keyword">const</span>;
+<a name="l00672"></a>00672     <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#f4fb652f6bd79ae0d5ce7d0f7d3c0fba">FirstChildElement</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * _value ) {
+<a name="l00673"></a>00673         <span class="keywordflow">return</span> const_cast&lt; TiXmlElement* &gt;( (const_cast&lt; const TiXmlNode* &gt;(<span class="keyword">this</span>))-&gt;FirstChildElement( _value ) );
+<a name="l00674"></a>00674     }
+<a name="l00675"></a>00675 
+<a name="l00676"></a>00676 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l00677"></a><a class="code" href="classTiXmlNode.html#327ad4bbd90073c5dfc931b07314f5f7">00677</a> <span class="preprocessor"></span>    <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#f4fb652f6bd79ae0d5ce7d0f7d3c0fba">FirstChildElement</a>( <span class="keyword">const</span> std::string&amp; _value )<span class="keyword"> const    </span>{   <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#f4fb652f6bd79ae0d5ce7d0f7d3c0fba">FirstChildElement</a> (_value.c_str ()); }   
+<a name="l00678"></a><a class="code" href="classTiXmlNode.html#7f1d7291880534c1e5cdeb392d8c1f45">00678</a>     <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlNode.html#f4fb652f6bd79ae0d5ce7d0f7d3c0fba">FirstChildElement</a>( <span class="keyword">const</span> std::string&amp; _value )                {   <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#f4fb652f6bd79ae0d5ce7d0f7d3c0fba">FirstChildElement</a> (_value.c_str ()); }   
+<a name="l00679"></a>00679 <span class="preprocessor">    #endif</span>
+<a name="l00680"></a>00680 <span class="preprocessor"></span>
+<a name="l00685"></a><a class="code" href="classTiXmlNode.html#57b99d5c97d67a42b9752f5210a1ba5e">00685</a>     <span class="keywordtype">int</span> <a class="code" href="classTiXmlNode.html#57b99d5c97d67a42b9752f5210a1ba5e">Type</a>()<span class="keyword"> const    </span>{ <span class="keywordflow">return</span> type; }
+<a name="l00686"></a>00686 
+<a name="l00690"></a>00690     <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>* <a class="code" href="classTiXmlNode.html#80e397fa973cf5323e33b07154b024f3">GetDocument</a>() <span class="keyword">const</span>;
+<a name="l00691"></a>00691     <a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>* <a class="code" href="classTiXmlNode.html#80e397fa973cf5323e33b07154b024f3">GetDocument</a>() {
+<a name="l00692"></a>00692         <span class="keywordflow">return</span> const_cast&lt; TiXmlDocument* &gt;( (const_cast&lt; const TiXmlNode* &gt;(<span class="keyword">this</span>))-&gt;GetDocument() );
+<a name="l00693"></a>00693     }
+<a name="l00694"></a>00694 
+<a name="l00696"></a><a class="code" href="classTiXmlNode.html#eed21ad30630ef6e7faf096127edc9f3">00696</a>     <span class="keywordtype">bool</span> <a class="code" href="classTiXmlNode.html#eed21ad30630ef6e7faf096127edc9f3">NoChildren</a>()<span class="keyword"> const                     </span>{ <span class="keywordflow">return</span> !firstChild; }
+<a name="l00697"></a>00697 
+<a name="l00698"></a><a class="code" href="classTiXmlNode.html#8a4cda4b15c29f64cff419309aebed08">00698</a>     <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>*    <a class="code" href="classTiXmlNode.html#8a4cda4b15c29f64cff419309aebed08">ToDocument</a>()<span class="keyword">    const </span>{ <span class="keywordflow">return</span> 0; } 
+<a name="l00699"></a><a class="code" href="classTiXmlNode.html#72abed96dc9667ab9e0a2a275301bb1c">00699</a>     <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>*     <a class="code" href="classTiXmlNode.html#72abed96dc9667ab9e0a2a275301bb1c">ToElement</a>()<span class="keyword">     const </span>{ <span class="keywordflow">return</span> 0; } 
+<a name="l00700"></a><a class="code" href="classTiXmlNode.html#a0a5086f9eaee910bbfdc7f975e26574">00700</a>     <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlComment.html">TiXmlComment</a>*     <a class="code" href="classTiXmlNode.html#a0a5086f9eaee910bbfdc7f975e26574">ToComment</a>()<span class="keyword">     const </span>{ <span class="keywordflow">return</span> 0; } 
+<a name="l00701"></a><a class="code" href="classTiXmlNode.html#fd7205cf31d7a376929f8a36930627a2">00701</a>     <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>*     <a class="code" href="classTiXmlNode.html#fd7205cf31d7a376929f8a36930627a2">ToUnknown</a>()<span class="keyword">     const </span>{ <span class="keywordflow">return</span> 0; } 
+<a name="l00702"></a><a class="code" href="classTiXmlNode.html#95a46a52c525992d6b4ee08beb14cd69">00702</a>     <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlText.html">TiXmlText</a>*        <a class="code" href="classTiXmlNode.html#95a46a52c525992d6b4ee08beb14cd69">ToText</a>()<span class="keyword">        const </span>{ <span class="keywordflow">return</span> 0; } 
+<a name="l00703"></a><a class="code" href="classTiXmlNode.html#9f43e6984fc7d4afd6eb32714c6b7b72">00703</a>     <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlDeclaration.html">TiXmlDeclaration</a>* <a class="code" href="classTiXmlNode.html#9f43e6984fc7d4afd6eb32714c6b7b72">ToDeclaration</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> 0; } 
+<a name="l00704"></a>00704 
+<a name="l00705"></a><a class="code" href="classTiXmlNode.html#6a4c8ac28ee7a745d059db6691e03bae">00705</a>     <span class="keyword">virtual</span> <a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>*          <a class="code" href="classTiXmlNode.html#8a4cda4b15c29f64cff419309aebed08">ToDocument</a>()    { <span class="keywordflow">return</span> 0; } 
+<a name="l00706"></a><a class="code" href="classTiXmlNode.html#a65d000223187d22a4dcebd7479e9ebc">00706</a>     <span class="keyword">virtual</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>*           <a class="code" href="classTiXmlNode.html#72abed96dc9667ab9e0a2a275301bb1c">ToElement</a>()     { <span class="keywordflow">return</span> 0; } 
+<a name="l00707"></a><a class="code" href="classTiXmlNode.html#383e06a0787f7063953934867990f849">00707</a>     <span class="keyword">virtual</span> <a class="code" href="classTiXmlComment.html">TiXmlComment</a>*           <a class="code" href="classTiXmlNode.html#a0a5086f9eaee910bbfdc7f975e26574">ToComment</a>()     { <span class="keywordflow">return</span> 0; } 
+<a name="l00708"></a><a class="code" href="classTiXmlNode.html#06de5af852668c7e4af0d09c205f0b0d">00708</a>     <span class="keyword">virtual</span> <a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>*           <a class="code" href="classTiXmlNode.html#fd7205cf31d7a376929f8a36930627a2">ToUnknown</a>()     { <span class="keywordflow">return</span> 0; } 
+<a name="l00709"></a><a class="code" href="classTiXmlNode.html#3ddfbcac78fbea041fad57e5c6d60a03">00709</a>     <span class="keyword">virtual</span> <a class="code" href="classTiXmlText.html">TiXmlText</a>*              <a class="code" href="classTiXmlNode.html#95a46a52c525992d6b4ee08beb14cd69">ToText</a>()        { <span class="keywordflow">return</span> 0; } 
+<a name="l00710"></a><a class="code" href="classTiXmlNode.html#4027136ca820ff4a636b607231b6a6df">00710</a>     <span class="keyword">virtual</span> <a class="code" href="classTiXmlDeclaration.html">TiXmlDeclaration</a>*       <a class="code" href="classTiXmlNode.html#9f43e6984fc7d4afd6eb32714c6b7b72">ToDeclaration</a>() { <span class="keywordflow">return</span> 0; } 
+<a name="l00711"></a>00711 
+<a name="l00715"></a>00715     <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlNode.html#4508cc3a2d7a98e96a54cc09c37a78a4">Clone</a>() <span class="keyword">const </span>= 0;
+<a name="l00716"></a>00716 
+<a name="l00739"></a>00739     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlNode.html#cc0f88b7462c6cb73809d410a4f5bb86">Accept</a>( <a class="code" href="classTiXmlVisitor.html">TiXmlVisitor</a>* visitor ) <span class="keyword">const </span>= 0;
+<a name="l00740"></a>00740 
+<a name="l00741"></a>00741 <span class="keyword">protected</span>:
+<a name="l00742"></a>00742     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>( <a class="code" href="classTiXmlNode.html#836eded4920ab9e9ef28496f48cd95a2">NodeType</a> _type );
+<a name="l00743"></a>00743 
+<a name="l00744"></a>00744     <span class="comment">// Copy to the allocated object. Shared functionality between Clone, Copy constructor,</span>
+<a name="l00745"></a>00745     <span class="comment">// and the assignment operator.</span>
+<a name="l00746"></a>00746     <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* target ) <span class="keyword">const</span>;
+<a name="l00747"></a>00747 
+<a name="l00748"></a>00748 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l00749"></a>00749 <span class="preprocessor"></span>        <span class="comment">// The real work of the input operator.</span>
+<a name="l00750"></a>00750     <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream* in, TIXML_STRING* tag ) = 0;
+<a name="l00751"></a>00751 <span class="preprocessor">    #endif</span>
+<a name="l00752"></a>00752 <span class="preprocessor"></span>
+<a name="l00753"></a>00753     <span class="comment">// Figure out what is at *p, and parse it. Returns null if it is not an xml node.</span>
+<a name="l00754"></a>00754     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* Identify( <span class="keyword">const</span> <span class="keywordtype">char</span>* start, TiXmlEncoding encoding );
+<a name="l00755"></a>00755 
+<a name="l00756"></a>00756     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>*      parent;
+<a name="l00757"></a>00757     <a class="code" href="classTiXmlNode.html#836eded4920ab9e9ef28496f48cd95a2">NodeType</a>        type;
+<a name="l00758"></a>00758 
+<a name="l00759"></a>00759     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>*      firstChild;
+<a name="l00760"></a>00760     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>*      lastChild;
+<a name="l00761"></a>00761 
+<a name="l00762"></a>00762     TIXML_STRING    value;
+<a name="l00763"></a>00763 
+<a name="l00764"></a>00764     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>*      prev;
+<a name="l00765"></a>00765     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>*      next;
+<a name="l00766"></a>00766 
+<a name="l00767"></a>00767 <span class="keyword">private</span>:
+<a name="l00768"></a>00768     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>&amp; );              <span class="comment">// not implemented.</span>
+<a name="l00769"></a>00769     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>&amp; base );    <span class="comment">// not allowed.</span>
+<a name="l00770"></a>00770 };
+<a name="l00771"></a>00771 
+<a name="l00772"></a>00772 
+<a name="l00780"></a><a class="code" href="classTiXmlAttribute.html">00780</a> <span class="keyword">class </span><a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlBase.html">TiXmlBase</a>
+<a name="l00781"></a>00781 {
+<a name="l00782"></a>00782     <span class="keyword">friend</span> <span class="keyword">class </span>TiXmlAttributeSet;
+<a name="l00783"></a>00783 
+<a name="l00784"></a>00784 <span class="keyword">public</span>:
+<a name="l00786"></a><a class="code" href="classTiXmlAttribute.html#9cfa3c8179873fd485d83003b114f8e1">00786</a>     <a class="code" href="classTiXmlAttribute.html#9cfa3c8179873fd485d83003b114f8e1">TiXmlAttribute</a>() : <a class="code" href="classTiXmlBase.html">TiXmlBase</a>()
+<a name="l00787"></a>00787     {
+<a name="l00788"></a>00788         document = 0;
+<a name="l00789"></a>00789         prev = next = 0;
+<a name="l00790"></a>00790     }
+<a name="l00791"></a>00791 
+<a name="l00792"></a>00792 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l00794"></a><a class="code" href="classTiXmlAttribute.html#052213522caac3979960e0714063861d">00794</a> <span class="preprocessor">    TiXmlAttribute( const std::string&amp; _name, const std::string&amp; _value )</span>
+<a name="l00795"></a>00795 <span class="preprocessor"></span>    {
+<a name="l00796"></a>00796         name = _name;
+<a name="l00797"></a>00797         value = _value;
+<a name="l00798"></a>00798         document = 0;
+<a name="l00799"></a>00799         prev = next = 0;
+<a name="l00800"></a>00800     }
+<a name="l00801"></a>00801 <span class="preprocessor">    #endif</span>
+<a name="l00802"></a>00802 <span class="preprocessor"></span>
+<a name="l00804"></a><a class="code" href="classTiXmlAttribute.html#759d0b76fb8fcf765ecab243bc14f05e">00804</a>     <a class="code" href="classTiXmlAttribute.html#9cfa3c8179873fd485d83003b114f8e1">TiXmlAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * _name, <span class="keyword">const</span> <span class="keywordtype">char</span> * _value )
+<a name="l00805"></a>00805     {
+<a name="l00806"></a>00806         name = _name;
+<a name="l00807"></a>00807         value = _value;
+<a name="l00808"></a>00808         document = 0;
+<a name="l00809"></a>00809         prev = next = 0;
+<a name="l00810"></a>00810     }
+<a name="l00811"></a>00811 
+<a name="l00812"></a><a class="code" href="classTiXmlAttribute.html#298a57287d305904ba6bd96ae6f78d3d">00812</a>     <span class="keyword">const</span> <span class="keywordtype">char</span>*     <a class="code" href="classTiXmlAttribute.html#298a57287d305904ba6bd96ae6f78d3d">Name</a>()<span class="keyword">  const       </span>{ <span class="keywordflow">return</span> name.c_str(); }        
+<a name="l00813"></a><a class="code" href="classTiXmlAttribute.html#0f874490eac8ca00ee0070765d0e97e3">00813</a>     <span class="keyword">const</span> <span class="keywordtype">char</span>*     <a class="code" href="classTiXmlAttribute.html#0f874490eac8ca00ee0070765d0e97e3">Value</a>()<span class="keyword"> const       </span>{ <span class="keywordflow">return</span> value.c_str(); }       
+<a name="l00814"></a>00814 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l00815"></a><a class="code" href="classTiXmlAttribute.html#87705c3ccf9ee9417beb4f7cbacd4d33">00815</a> <span class="preprocessor"></span>    <span class="keyword">const</span> std::string&amp; <a class="code" href="classTiXmlAttribute.html#87705c3ccf9ee9417beb4f7cbacd4d33">ValueStr</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> value; }               
+<a name="l00816"></a>00816 <span class="preprocessor">    #endif</span>
+<a name="l00817"></a>00817 <span class="preprocessor"></span>    <span class="keywordtype">int</span>             <a class="code" href="classTiXmlAttribute.html#a1a20ad59dc7e89a0ab265396360d50f">IntValue</a>() <span class="keyword">const</span>;                                   
+<a name="l00818"></a>00818     <span class="keywordtype">double</span>          <a class="code" href="classTiXmlAttribute.html#2880ddef53fc7522c99535273954d230">DoubleValue</a>() <span class="keyword">const</span>;                                
+<a name="l00819"></a>00819 
+<a name="l00820"></a>00820     <span class="comment">// Get the tinyxml string representation</span>
+<a name="l00821"></a>00821     <span class="keyword">const</span> TIXML_STRING&amp; NameTStr()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> name; }
+<a name="l00822"></a>00822 
+<a name="l00832"></a>00832     <span class="keywordtype">int</span> <a class="code" href="classTiXmlAttribute.html#d6c93088ee21af41a107931223339344">QueryIntValue</a>( <span class="keywordtype">int</span>* _value ) <span class="keyword">const</span>;
+<a name="l00834"></a>00834     <span class="keywordtype">int</span> <a class="code" href="classTiXmlAttribute.html#c87b2a8489906a5d7aa2875f20be3513">QueryDoubleValue</a>( <span class="keywordtype">double</span>* _value ) <span class="keyword">const</span>;
+<a name="l00835"></a>00835 
+<a name="l00836"></a><a class="code" href="classTiXmlAttribute.html#b7fa3d21ff8d7c5764cf9af15b667a99">00836</a>     <span class="keywordtype">void</span> <a class="code" href="classTiXmlAttribute.html#b7fa3d21ff8d7c5764cf9af15b667a99">SetName</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* _name )   { name = _name; }               
+<a name="l00837"></a><a class="code" href="classTiXmlAttribute.html#2dae44178f668b3cb48101be4f2236a0">00837</a>     <span class="keywordtype">void</span> <a class="code" href="classTiXmlAttribute.html#2dae44178f668b3cb48101be4f2236a0">SetValue</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* _value ) { value = _value; }             
+<a name="l00838"></a>00838 
+<a name="l00839"></a>00839     <span class="keywordtype">void</span> <a class="code" href="classTiXmlAttribute.html#7e065df640116a62ea4f4b7da5449cc8">SetIntValue</a>( <span class="keywordtype">int</span> _value );                                     
+<a name="l00840"></a>00840     <span class="keywordtype">void</span> <a class="code" href="classTiXmlAttribute.html#0316da31373496c4368ad549bf711394">SetDoubleValue</a>( <span class="keywordtype">double</span> _value );                               
+<a name="l00841"></a>00841 
+<a name="l00842"></a>00842 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l00844"></a><a class="code" href="classTiXmlAttribute.html#b296ff0c9a8c701055cd257a8a976e57">00844</a> <span class="preprocessor">    void SetName( const std::string&amp; _name )    { name = _name; }   </span>
+<a name="l00846"></a><a class="code" href="classTiXmlAttribute.html#b43f67a0cc3ec1d80e62606500f0925f">00846</a> <span class="preprocessor">    void SetValue( const std::string&amp; _value )  { value = _value; }</span>
+<a name="l00847"></a>00847 <span class="preprocessor"></span><span class="preprocessor">    #endif</span>
+<a name="l00848"></a>00848 <span class="preprocessor"></span>
+<a name="l00850"></a>00850     <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* <a class="code" href="classTiXmlAttribute.html#1c78e92e223a40843f644ba48ef69f67">Next</a>() <span class="keyword">const</span>;
+<a name="l00851"></a>00851     <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* <a class="code" href="classTiXmlAttribute.html#1c78e92e223a40843f644ba48ef69f67">Next</a>() {
+<a name="l00852"></a>00852         <span class="keywordflow">return</span> const_cast&lt; TiXmlAttribute* &gt;( (const_cast&lt; const TiXmlAttribute* &gt;(<span class="keyword">this</span>))-&gt;Next() ); 
+<a name="l00853"></a>00853     }
+<a name="l00854"></a>00854 
+<a name="l00856"></a>00856     <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* <a class="code" href="classTiXmlAttribute.html#6ebbfe333fe76cd834bd6cbcca3130cf">Previous</a>() <span class="keyword">const</span>;
+<a name="l00857"></a>00857     <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* <a class="code" href="classTiXmlAttribute.html#6ebbfe333fe76cd834bd6cbcca3130cf">Previous</a>() {
+<a name="l00858"></a>00858         <span class="keywordflow">return</span> const_cast&lt; TiXmlAttribute* &gt;( (const_cast&lt; const TiXmlAttribute* &gt;(<span class="keyword">this</span>))-&gt;Previous() ); 
+<a name="l00859"></a>00859     }
+<a name="l00860"></a>00860 
+<a name="l00861"></a>00861     <span class="keywordtype">bool</span> operator==( <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>&amp; rhs )<span class="keyword"> const </span>{ <span class="keywordflow">return</span> rhs.<a class="code" href="classTiXmlAttribute.html#fcbe165f33f08cf9b24daa33f0ee951a">name</a> == name; }
+<a name="l00862"></a>00862     <span class="keywordtype">bool</span> operator&lt;( <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>&amp; rhs )<span class="keyword">  const </span>{ <span class="keywordflow">return</span> name &lt; rhs.<a class="code" href="classTiXmlAttribute.html#fcbe165f33f08cf9b24daa33f0ee951a">name</a>; }
+<a name="l00863"></a>00863     <span class="keywordtype">bool</span> operator&gt;( <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>&amp; rhs )<span class="keyword">  const </span>{ <span class="keywordflow">return</span> name &gt; rhs.<a class="code" href="classTiXmlAttribute.html#fcbe165f33f08cf9b24daa33f0ee951a">name</a>; }
+<a name="l00864"></a>00864 
+<a name="l00865"></a>00865     <span class="comment">/*  Attribute parsing starts: first letter of the name</span>
+<a name="l00866"></a>00866 <span class="comment">                         returns: the next char after the value end quote</span>
+<a name="l00867"></a>00867 <span class="comment">    */</span>
+<a name="l00868"></a>00868     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding );
+<a name="l00869"></a>00869 
+<a name="l00870"></a>00870     <span class="comment">// Prints this Attribute to a FILE stream.</span>
+<a name="l00871"></a><a class="code" href="classTiXmlAttribute.html#cc04956c1d5c4c31fe74f7a7528d109a">00871</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlAttribute.html#cc04956c1d5c4c31fe74f7a7528d109a">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth )<span class="keyword"> const </span>{
+<a name="l00872"></a>00872         <a class="code" href="classTiXmlAttribute.html#cc04956c1d5c4c31fe74f7a7528d109a">Print</a>( cfile, depth, 0 );
+<a name="l00873"></a>00873     }
+<a name="l00874"></a>00874     <span class="keywordtype">void</span> <a class="code" href="classTiXmlAttribute.html#cc04956c1d5c4c31fe74f7a7528d109a">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth, TIXML_STRING* str ) <span class="keyword">const</span>;
+<a name="l00875"></a>00875 
+<a name="l00876"></a>00876     <span class="comment">// [internal use]</span>
+<a name="l00877"></a>00877     <span class="comment">// Set the document pointer so the attribute can report errors.</span>
+<a name="l00878"></a>00878     <span class="keywordtype">void</span> SetDocument( <a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>* doc )  { document = doc; }
+<a name="l00879"></a>00879 
+<a name="l00880"></a>00880 <span class="keyword">private</span>:
+<a name="l00881"></a>00881     <a class="code" href="classTiXmlAttribute.html#9cfa3c8179873fd485d83003b114f8e1">TiXmlAttribute</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>&amp; );                <span class="comment">// not implemented.</span>
+<a name="l00882"></a>00882     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>&amp; base );   <span class="comment">// not allowed.</span>
+<a name="l00883"></a>00883 
+<a name="l00884"></a>00884     <a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>*  document;   <span class="comment">// A pointer back to a document, for error reporting.</span>
+<a name="l00885"></a>00885     TIXML_STRING name;
+<a name="l00886"></a>00886     TIXML_STRING value;
+<a name="l00887"></a>00887     <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* prev;
+<a name="l00888"></a>00888     <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* next;
+<a name="l00889"></a>00889 };
+<a name="l00890"></a>00890 
+<a name="l00891"></a>00891 
+<a name="l00892"></a>00892 <span class="comment">/*  A class used to manage a group of attributes.</span>
+<a name="l00893"></a>00893 <span class="comment">    It is only used internally, both by the ELEMENT and the DECLARATION.</span>
+<a name="l00894"></a>00894 <span class="comment">    </span>
+<a name="l00895"></a>00895 <span class="comment">    The set can be changed transparent to the Element and Declaration</span>
+<a name="l00896"></a>00896 <span class="comment">    classes that use it, but NOT transparent to the Attribute</span>
+<a name="l00897"></a>00897 <span class="comment">    which has to implement a next() and previous() method. Which makes</span>
+<a name="l00898"></a>00898 <span class="comment">    it a bit problematic and prevents the use of STL.</span>
+<a name="l00899"></a>00899 <span class="comment"></span>
+<a name="l00900"></a>00900 <span class="comment">    This version is implemented with circular lists because:</span>
+<a name="l00901"></a>00901 <span class="comment">        - I like circular lists</span>
+<a name="l00902"></a>00902 <span class="comment">        - it demonstrates some independence from the (typical) doubly linked list.</span>
+<a name="l00903"></a>00903 <span class="comment">*/</span>
+<a name="l00904"></a>00904 <span class="keyword">class </span>TiXmlAttributeSet
+<a name="l00905"></a>00905 {
+<a name="l00906"></a>00906 <span class="keyword">public</span>:
+<a name="l00907"></a>00907     TiXmlAttributeSet();
+<a name="l00908"></a>00908     ~TiXmlAttributeSet();
+<a name="l00909"></a>00909 
+<a name="l00910"></a>00910     <span class="keywordtype">void</span> Add( <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* attribute );
+<a name="l00911"></a>00911     <span class="keywordtype">void</span> Remove( <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* attribute );
+<a name="l00912"></a>00912 
+<a name="l00913"></a>00913     <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* First()<span class="keyword">   const   </span>{ <span class="keywordflow">return</span> ( sentinel.next == &amp;sentinel ) ? 0 : sentinel.next; }
+<a name="l00914"></a>00914     <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* First()                 { <span class="keywordflow">return</span> ( sentinel.next == &amp;sentinel ) ? 0 : sentinel.next; }
+<a name="l00915"></a>00915     <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* Last()<span class="keyword"> const      </span>{ <span class="keywordflow">return</span> ( sentinel.prev == &amp;sentinel ) ? 0 : sentinel.prev; }
+<a name="l00916"></a>00916     <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* Last()                  { <span class="keywordflow">return</span> ( sentinel.prev == &amp;sentinel ) ? 0 : sentinel.prev; }
+<a name="l00917"></a>00917 
+<a name="l00918"></a>00918     <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>*   Find( <span class="keyword">const</span> <span class="keywordtype">char</span>* _name ) <span class="keyword">const</span>;
+<a name="l00919"></a>00919     <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* Find( <span class="keyword">const</span> <span class="keywordtype">char</span>* _name ) {
+<a name="l00920"></a>00920         <span class="keywordflow">return</span> const_cast&lt; TiXmlAttribute* &gt;( (const_cast&lt; const TiXmlAttributeSet* &gt;(<span class="keyword">this</span>))-&gt;Find( _name ) );
+<a name="l00921"></a>00921     }
+<a name="l00922"></a>00922 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l00923"></a>00923 <span class="preprocessor"></span>    <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>*   Find( <span class="keyword">const</span> std::string&amp; _name ) <span class="keyword">const</span>;
+<a name="l00924"></a>00924     <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* Find( <span class="keyword">const</span> std::string&amp; _name ) {
+<a name="l00925"></a>00925         <span class="keywordflow">return</span> const_cast&lt; TiXmlAttribute* &gt;( (const_cast&lt; const TiXmlAttributeSet* &gt;(<span class="keyword">this</span>))-&gt;Find( _name ) );
+<a name="l00926"></a>00926     }
+<a name="l00927"></a>00927 
+<a name="l00928"></a>00928 <span class="preprocessor">    #endif</span>
+<a name="l00929"></a>00929 <span class="preprocessor"></span>
+<a name="l00930"></a>00930 <span class="keyword">private</span>:
+<a name="l00931"></a>00931     <span class="comment">//*ME:  Because of hidden/disabled copy-construktor in TiXmlAttribute (sentinel-element),</span>
+<a name="l00932"></a>00932     <span class="comment">//*ME:  this class must be also use a hidden/disabled copy-constructor !!!</span>
+<a name="l00933"></a>00933     TiXmlAttributeSet( <span class="keyword">const</span> TiXmlAttributeSet&amp; );  <span class="comment">// not allowed</span>
+<a name="l00934"></a>00934     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> TiXmlAttributeSet&amp; ); <span class="comment">// not allowed (as TiXmlAttribute)</span>
+<a name="l00935"></a>00935 
+<a name="l00936"></a>00936     <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a> sentinel;
+<a name="l00937"></a>00937 };
+<a name="l00938"></a>00938 
+<a name="l00939"></a>00939 
+<a name="l00944"></a><a class="code" href="classTiXmlElement.html">00944</a> <span class="keyword">class </span><a class="code" href="classTiXmlElement.html">TiXmlElement</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>
+<a name="l00945"></a>00945 {
+<a name="l00946"></a>00946 <span class="keyword">public</span>:
+<a name="l00948"></a>00948     <a class="code" href="classTiXmlElement.html#01bc3ab372d35da08efcbbe65ad90c60">TiXmlElement</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> * in_value);
+<a name="l00949"></a>00949 
+<a name="l00950"></a>00950 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l00952"></a>00952 <span class="preprocessor">    TiXmlElement( const std::string&amp; _value );</span>
+<a name="l00953"></a>00953 <span class="preprocessor"></span><span class="preprocessor">    #endif</span>
+<a name="l00954"></a>00954 <span class="preprocessor"></span>
+<a name="l00955"></a>00955     <a class="code" href="classTiXmlElement.html#01bc3ab372d35da08efcbbe65ad90c60">TiXmlElement</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>&amp; );
+<a name="l00956"></a>00956 
+<a name="l00957"></a>00957     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>&amp; base );
+<a name="l00958"></a>00958 
+<a name="l00959"></a>00959     <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlElement.html">TiXmlElement</a>();
+<a name="l00960"></a>00960 
+<a name="l00964"></a>00964     <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlElement.html#e419a442a9701a62b0c3d8fd1cbdd12d">Attribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name ) <span class="keyword">const</span>;
+<a name="l00965"></a>00965 
+<a name="l00972"></a>00972     <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlElement.html#e419a442a9701a62b0c3d8fd1cbdd12d">Attribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keywordtype">int</span>* i ) <span class="keyword">const</span>;
+<a name="l00973"></a>00973 
+<a name="l00980"></a>00980     <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlElement.html#e419a442a9701a62b0c3d8fd1cbdd12d">Attribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keywordtype">double</span>* d ) <span class="keyword">const</span>;
+<a name="l00981"></a>00981 
+<a name="l00989"></a>00989     <span class="keywordtype">int</span> <a class="code" href="classTiXmlElement.html#ea0bfe471380f281c5945770ddbf52b9">QueryIntAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keywordtype">int</span>* _value ) <span class="keyword">const</span>;
+<a name="l00991"></a>00991     <span class="keywordtype">int</span> <a class="code" href="classTiXmlElement.html#898d7730ecc341f0bffc7a9dadbf1ce7">QueryDoubleAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keywordtype">double</span>* _value ) <span class="keyword">const</span>;
+<a name="l00993"></a><a class="code" href="classTiXmlElement.html#a04d3af11601ef5a5f88295203a843be">00993</a>     <span class="keywordtype">int</span> <a class="code" href="classTiXmlElement.html#a04d3af11601ef5a5f88295203a843be">QueryFloatAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keywordtype">float</span>* _value )<span class="keyword"> const </span>{
+<a name="l00994"></a>00994         <span class="keywordtype">double</span> d;
+<a name="l00995"></a>00995         <span class="keywordtype">int</span> result = <a class="code" href="classTiXmlElement.html#898d7730ecc341f0bffc7a9dadbf1ce7">QueryDoubleAttribute</a>( name, &amp;d );
+<a name="l00996"></a>00996         <span class="keywordflow">if</span> ( result == TIXML_SUCCESS ) {
+<a name="l00997"></a>00997             *_value = (float)d;
+<a name="l00998"></a>00998         }
+<a name="l00999"></a>00999         <span class="keywordflow">return</span> result;
+<a name="l01000"></a>01000     }
+<a name="l01001"></a>01001 
+<a name="l01002"></a>01002 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l01003"></a>01003 <span class="preprocessor"></span>
+<a name="l01011"></a><a class="code" href="classTiXmlElement.html#e3b9a03b0a56663a40801c7256683576">01011</a>     <span class="keyword">template</span>&lt; <span class="keyword">typename</span> T &gt; <span class="keywordtype">int</span> <a class="code" href="classTiXmlElement.html#e3b9a03b0a56663a40801c7256683576">QueryValueAttribute</a>( <span class="keyword">const</span> std::string&amp; name, T* outValue )<span class="keyword"> const</span>
+<a name="l01012"></a>01012 <span class="keyword">    </span>{
+<a name="l01013"></a>01013         <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* node = attributeSet.Find( name );
+<a name="l01014"></a>01014         <span class="keywordflow">if</span> ( !node )
+<a name="l01015"></a>01015             <span class="keywordflow">return</span> TIXML_NO_ATTRIBUTE;
+<a name="l01016"></a>01016 
+<a name="l01017"></a>01017         std::stringstream sstream( node-&gt;<a class="code" href="classTiXmlAttribute.html#87705c3ccf9ee9417beb4f7cbacd4d33">ValueStr</a>() );
+<a name="l01018"></a>01018         sstream &gt;&gt; *outValue;
+<a name="l01019"></a>01019         <span class="keywordflow">if</span> ( !sstream.fail() )
+<a name="l01020"></a>01020             <span class="keywordflow">return</span> TIXML_SUCCESS;
+<a name="l01021"></a>01021         <span class="keywordflow">return</span> TIXML_WRONG_TYPE;
+<a name="l01022"></a>01022     }
+<a name="l01023"></a>01023     <span class="comment">/*</span>
+<a name="l01024"></a>01024 <span class="comment">     This is - in theory - a bug fix for "QueryValueAtribute returns truncated std::string"</span>
+<a name="l01025"></a>01025 <span class="comment">     but template specialization is hard to get working cross-compiler. Leaving the bug for now.</span>
+<a name="l01026"></a>01026 <span class="comment">     </span>
+<a name="l01027"></a>01027 <span class="comment">    // The above will fail for std::string because the space character is used as a seperator.</span>
+<a name="l01028"></a>01028 <span class="comment">    // Specialize for strings. Bug [ 1695429 ] QueryValueAtribute returns truncated std::string</span>
+<a name="l01029"></a>01029 <span class="comment">    template&lt;&gt; int QueryValueAttribute( const std::string&amp; name, std::string* outValue ) const</span>
+<a name="l01030"></a>01030 <span class="comment">    {</span>
+<a name="l01031"></a>01031 <span class="comment">        const TiXmlAttribute* node = attributeSet.Find( name );</span>
+<a name="l01032"></a>01032 <span class="comment">        if ( !node )</span>
+<a name="l01033"></a>01033 <span class="comment">            return TIXML_NO_ATTRIBUTE;</span>
+<a name="l01034"></a>01034 <span class="comment">        *outValue = node-&gt;ValueStr();</span>
+<a name="l01035"></a>01035 <span class="comment">        return TIXML_SUCCESS;</span>
+<a name="l01036"></a>01036 <span class="comment">    }</span>
+<a name="l01037"></a>01037 <span class="comment">    */</span>
+<a name="l01038"></a>01038 <span class="preprocessor">    #endif</span>
+<a name="l01039"></a>01039 <span class="preprocessor"></span>
+<a name="l01043"></a>01043     <span class="keywordtype">void</span> <a class="code" href="classTiXmlElement.html#bf0b3bd7f0e4c746a89ec6e7f101fc32">SetAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* name, <span class="keyword">const</span> <span class="keywordtype">char</span> * _value );
+<a name="l01044"></a>01044 
+<a name="l01045"></a>01045 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l01046"></a>01046 <span class="preprocessor"></span>    <span class="keyword">const</span> std::string* <a class="code" href="classTiXmlElement.html#e419a442a9701a62b0c3d8fd1cbdd12d">Attribute</a>( <span class="keyword">const</span> std::string&amp; name ) <span class="keyword">const</span>;
+<a name="l01047"></a>01047     <span class="keyword">const</span> std::string* <a class="code" href="classTiXmlElement.html#e419a442a9701a62b0c3d8fd1cbdd12d">Attribute</a>( <span class="keyword">const</span> std::string&amp; name, <span class="keywordtype">int</span>* i ) <span class="keyword">const</span>;
+<a name="l01048"></a>01048     <span class="keyword">const</span> std::string* <a class="code" href="classTiXmlElement.html#e419a442a9701a62b0c3d8fd1cbdd12d">Attribute</a>( <span class="keyword">const</span> std::string&amp; name, <span class="keywordtype">double</span>* d ) <span class="keyword">const</span>;
+<a name="l01049"></a>01049     <span class="keywordtype">int</span> <a class="code" href="classTiXmlElement.html#ea0bfe471380f281c5945770ddbf52b9">QueryIntAttribute</a>( <span class="keyword">const</span> std::string&amp; name, <span class="keywordtype">int</span>* _value ) <span class="keyword">const</span>;
+<a name="l01050"></a>01050     <span class="keywordtype">int</span> <a class="code" href="classTiXmlElement.html#898d7730ecc341f0bffc7a9dadbf1ce7">QueryDoubleAttribute</a>( <span class="keyword">const</span> std::string&amp; name, <span class="keywordtype">double</span>* _value ) <span class="keyword">const</span>;
+<a name="l01051"></a>01051 
+<a name="l01053"></a>01053     <span class="keywordtype">void</span> <a class="code" href="classTiXmlElement.html#bf0b3bd7f0e4c746a89ec6e7f101fc32">SetAttribute</a>( <span class="keyword">const</span> std::string&amp; name, <span class="keyword">const</span> std::string&amp; _value );
+<a name="l01055"></a>01055     <span class="keywordtype">void</span> <a class="code" href="classTiXmlElement.html#bf0b3bd7f0e4c746a89ec6e7f101fc32">SetAttribute</a>( <span class="keyword">const</span> std::string&amp; name, <span class="keywordtype">int</span> _value );
+<a name="l01056"></a>01056 <span class="preprocessor">    #endif</span>
+<a name="l01057"></a>01057 <span class="preprocessor"></span>
+<a name="l01061"></a>01061     <span class="keywordtype">void</span> <a class="code" href="classTiXmlElement.html#bf0b3bd7f0e4c746a89ec6e7f101fc32">SetAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * name, <span class="keywordtype">int</span> value );
+<a name="l01062"></a>01062 
+<a name="l01066"></a>01066     <span class="keywordtype">void</span> <a class="code" href="classTiXmlElement.html#0d1dd975d75496778177e35abfe0ec0b">SetDoubleAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * name, <span class="keywordtype">double</span> value );
+<a name="l01067"></a>01067 
+<a name="l01070"></a>01070     <span class="keywordtype">void</span> <a class="code" href="classTiXmlElement.html#56979767deca794376b1dfa69a525b2a">RemoveAttribute</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * name );
+<a name="l01071"></a>01071 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l01072"></a><a class="code" href="classTiXmlElement.html#1afa6aea716511326a608e4c05df4f3a">01072</a> <span class="preprocessor"></span>    <span class="keywordtype">void</span> <a class="code" href="classTiXmlElement.html#56979767deca794376b1dfa69a525b2a">RemoveAttribute</a>( <span class="keyword">const</span> std::string&amp; name ) {   <a class="code" href="classTiXmlElement.html#56979767deca794376b1dfa69a525b2a">RemoveAttribute</a> (name.c_str ());    }   
+<a name="l01073"></a>01073 <span class="preprocessor">    #endif</span>
+<a name="l01074"></a>01074 <span class="preprocessor"></span>
+<a name="l01075"></a><a class="code" href="classTiXmlElement.html#516054c9073647d6cb29b6abe9fa0592">01075</a>     <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* <a class="code" href="classTiXmlElement.html#516054c9073647d6cb29b6abe9fa0592">FirstAttribute</a>()<span class="keyword"> const    </span>{ <span class="keywordflow">return</span> attributeSet.First(); }        
+<a name="l01076"></a>01076     <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* <a class="code" href="classTiXmlElement.html#516054c9073647d6cb29b6abe9fa0592">FirstAttribute</a>()                { <span class="keywordflow">return</span> attributeSet.First(); }
+<a name="l01077"></a><a class="code" href="classTiXmlElement.html#86191b49f9177be132b85b14655f1381">01077</a>     <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* <a class="code" href="classTiXmlElement.html#86191b49f9177be132b85b14655f1381">LastAttribute</a>()<span class="keyword">   const   </span>{ <span class="keywordflow">return</span> attributeSet.Last(); }     
+<a name="l01078"></a>01078     <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* <a class="code" href="classTiXmlElement.html#86191b49f9177be132b85b14655f1381">LastAttribute</a>()                 { <span class="keywordflow">return</span> attributeSet.Last(); }
+<a name="l01079"></a>01079 
+<a name="l01112"></a>01112     <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlElement.html#f3282294986cdb216646ea1f67af2c87">GetText</a>() <span class="keyword">const</span>;
+<a name="l01113"></a>01113 
+<a name="l01115"></a>01115     <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlElement.html#a464535ea1994db337cb6a8ce4b588b5">Clone</a>() <span class="keyword">const</span>;
+<a name="l01116"></a>01116     <span class="comment">// Print the Element to a FILE stream.</span>
+<a name="l01117"></a>01117     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlElement.html#fbf52736e70fc91ec9d760721d6f4fd2">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth ) <span class="keyword">const</span>;
+<a name="l01118"></a>01118 
+<a name="l01119"></a>01119     <span class="comment">/*  Attribtue parsing starts: next char past '&lt;'</span>
+<a name="l01120"></a>01120 <span class="comment">                         returns: next char past '&gt;'</span>
+<a name="l01121"></a>01121 <span class="comment">    */</span>
+<a name="l01122"></a>01122     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding );
+<a name="l01123"></a>01123 
+<a name="l01124"></a><a class="code" href="classTiXmlElement.html#c5b8d0e25fa23fd9acbb6d146082901c">01124</a>     <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>*     <a class="code" href="classTiXmlElement.html#c5b8d0e25fa23fd9acbb6d146082901c">ToElement</a>()<span class="keyword">     const </span>{ <span class="keywordflow">return</span> <span class="keyword">this</span>; } 
+<a name="l01125"></a><a class="code" href="classTiXmlElement.html#9def86337ea7a755eb41cac980f60c7a">01125</a>     <span class="keyword">virtual</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>*           <a class="code" href="classTiXmlElement.html#c5b8d0e25fa23fd9acbb6d146082901c">ToElement</a>()           { <span class="keywordflow">return</span> <span class="keyword">this</span>; } 
+<a name="l01126"></a>01126 
+<a name="l01129"></a>01129     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlElement.html#71a81b2afb0d42be1543d1c404dee6f5">Accept</a>( <a class="code" href="classTiXmlVisitor.html">TiXmlVisitor</a>* visitor ) <span class="keyword">const</span>;
+<a name="l01130"></a>01130 
+<a name="l01131"></a>01131 <span class="keyword">protected</span>:
+<a name="l01132"></a>01132 
+<a name="l01133"></a>01133     <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* target ) <span class="keyword">const</span>;
+<a name="l01134"></a>01134     <span class="keywordtype">void</span> ClearThis();   <span class="comment">// like clear, but initializes 'this' object as well</span>
+<a name="l01135"></a>01135 
+<a name="l01136"></a>01136     <span class="comment">// Used to be public [internal use]</span>
+<a name="l01137"></a>01137 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l01138"></a>01138 <span class="preprocessor"></span>    <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream * in, TIXML_STRING * tag );
+<a name="l01139"></a>01139 <span class="preprocessor">    #endif</span>
+<a name="l01140"></a>01140 <span class="preprocessor"></span>    <span class="comment">/*  [internal use]</span>
+<a name="l01141"></a>01141 <span class="comment">        Reads the "value" of the element -- another element, or text.</span>
+<a name="l01142"></a>01142 <span class="comment">        This should terminate with the current end tag.</span>
+<a name="l01143"></a>01143 <span class="comment">    */</span>
+<a name="l01144"></a>01144     <span class="keyword">const</span> <span class="keywordtype">char</span>* ReadValue( <span class="keyword">const</span> <span class="keywordtype">char</span>* in, TiXmlParsingData* prevData, TiXmlEncoding encoding );
+<a name="l01145"></a>01145 
+<a name="l01146"></a>01146 <span class="keyword">private</span>:
+<a name="l01147"></a>01147 
+<a name="l01148"></a>01148     TiXmlAttributeSet attributeSet;
+<a name="l01149"></a>01149 };
+<a name="l01150"></a>01150 
+<a name="l01151"></a>01151 
+<a name="l01154"></a><a class="code" href="classTiXmlComment.html">01154</a> <span class="keyword">class </span><a class="code" href="classTiXmlComment.html">TiXmlComment</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>
+<a name="l01155"></a>01155 {
+<a name="l01156"></a>01156 <span class="keyword">public</span>:
+<a name="l01158"></a><a class="code" href="classTiXmlComment.html#aa3252031d3e8bd3a2bf51a1c61201b7">01158</a>     <a class="code" href="classTiXmlComment.html#aa3252031d3e8bd3a2bf51a1c61201b7">TiXmlComment</a>() : <a class="code" href="classTiXmlNode.html">TiXmlNode</a>( <a class="code" href="classTiXmlNode.html">TiXmlNode</a>::COMMENT ) {}
+<a name="l01160"></a><a class="code" href="classTiXmlComment.html#37e7802ef17bc03ebe5ae79bf0713d47">01160</a>     <a class="code" href="classTiXmlComment.html#aa3252031d3e8bd3a2bf51a1c61201b7">TiXmlComment</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* _value ) : <a class="code" href="classTiXmlNode.html">TiXmlNode</a>( <a class="code" href="classTiXmlNode.html">TiXmlNode</a>::COMMENT ) {
+<a name="l01161"></a>01161         <a class="code" href="classTiXmlNode.html#2a38329ca5d3f28f98ce932b8299ae90">SetValue</a>( _value );
+<a name="l01162"></a>01162     }
+<a name="l01163"></a>01163     <a class="code" href="classTiXmlComment.html#aa3252031d3e8bd3a2bf51a1c61201b7">TiXmlComment</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlComment.html">TiXmlComment</a>&amp; );
+<a name="l01164"></a>01164     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlComment.html">TiXmlComment</a>&amp; base );
+<a name="l01165"></a>01165 
+<a name="l01166"></a>01166     <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlComment.html">TiXmlComment</a>() {}
+<a name="l01167"></a>01167 
+<a name="l01169"></a>01169     <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlComment.html#0d6662bdc52488b9e12b3c7a0453d028">Clone</a>() <span class="keyword">const</span>;
+<a name="l01170"></a>01170     <span class="comment">// Write this Comment to a FILE stream.</span>
+<a name="l01171"></a>01171     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlComment.html#6b316527aaa8da0370cd68c22a5a0f5f">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth ) <span class="keyword">const</span>;
+<a name="l01172"></a>01172 
+<a name="l01173"></a>01173     <span class="comment">/*  Attribtue parsing starts: at the ! of the !--</span>
+<a name="l01174"></a>01174 <span class="comment">                         returns: next char past '&gt;'</span>
+<a name="l01175"></a>01175 <span class="comment">    */</span>
+<a name="l01176"></a>01176     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding );
+<a name="l01177"></a>01177 
+<a name="l01178"></a><a class="code" href="classTiXmlComment.html#00fb4215c20a2399ea05ac9b9e7e68a0">01178</a>     <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlComment.html">TiXmlComment</a>*  <a class="code" href="classTiXmlComment.html#00fb4215c20a2399ea05ac9b9e7e68a0">ToComment</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">this</span>; } 
+<a name="l01179"></a><a class="code" href="classTiXmlComment.html#cc7c7e07e13c23f17797d642981511df">01179</a>     <span class="keyword">virtual</span> <a class="code" href="classTiXmlComment.html">TiXmlComment</a>*  <a class="code" href="classTiXmlComment.html#00fb4215c20a2399ea05ac9b9e7e68a0">ToComment</a>() { <span class="keywordflow">return</span> <span class="keyword">this</span>; } 
+<a name="l01180"></a>01180 
+<a name="l01183"></a>01183     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlComment.html#f3ac1b99fbbe9ea4fb6e14146156e43e">Accept</a>( <a class="code" href="classTiXmlVisitor.html">TiXmlVisitor</a>* visitor ) <span class="keyword">const</span>;
+<a name="l01184"></a>01184 
+<a name="l01185"></a>01185 <span class="keyword">protected</span>:
+<a name="l01186"></a>01186     <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlComment.html">TiXmlComment</a>* target ) <span class="keyword">const</span>;
+<a name="l01187"></a>01187 
+<a name="l01188"></a>01188     <span class="comment">// used to be public</span>
+<a name="l01189"></a>01189 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l01190"></a>01190 <span class="preprocessor"></span>    <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream * in, TIXML_STRING * tag );
+<a name="l01191"></a>01191 <span class="preprocessor">    #endif</span>
+<a name="l01192"></a>01192 <span class="preprocessor"></span><span class="comment">//  virtual void StreamOut( TIXML_OSTREAM * out ) const;</span>
+<a name="l01193"></a>01193 
+<a name="l01194"></a>01194 <span class="keyword">private</span>:
+<a name="l01195"></a>01195 
+<a name="l01196"></a>01196 };
+<a name="l01197"></a>01197 
+<a name="l01198"></a>01198 
+<a name="l01204"></a><a class="code" href="classTiXmlText.html">01204</a> <span class="keyword">class </span><a class="code" href="classTiXmlText.html">TiXmlText</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>
+<a name="l01205"></a>01205 {
+<a name="l01206"></a>01206     <span class="keyword">friend</span> <span class="keyword">class </span><a class="code" href="classTiXmlElement.html">TiXmlElement</a>;
+<a name="l01207"></a>01207 <span class="keyword">public</span>:
+<a name="l01212"></a><a class="code" href="classTiXmlText.html#f659e77c6b87d684827f35a8f4895960">01212</a>     <a class="code" href="classTiXmlText.html#f659e77c6b87d684827f35a8f4895960">TiXmlText</a> (<span class="keyword">const</span> <span class="keywordtype">char</span> * initValue ) : <a class="code" href="classTiXmlNode.html">TiXmlNode</a> (<a class="code" href="classTiXmlNode.html">TiXmlNode</a>::TEXT)
+<a name="l01213"></a>01213     {
+<a name="l01214"></a>01214         <a class="code" href="classTiXmlNode.html#2a38329ca5d3f28f98ce932b8299ae90">SetValue</a>( initValue );
+<a name="l01215"></a>01215         cdata = <span class="keyword">false</span>;
+<a name="l01216"></a>01216     }
+<a name="l01217"></a>01217     <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlText.html">TiXmlText</a>() {}
+<a name="l01218"></a>01218 
+<a name="l01219"></a>01219 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l01221"></a><a class="code" href="classTiXmlText.html#439792f6183a3d3fb6f2bc2b16fa5691">01221</a> <span class="preprocessor">    TiXmlText( const std::string&amp; initValue ) : TiXmlNode (TiXmlNode::TEXT)</span>
+<a name="l01222"></a>01222 <span class="preprocessor"></span>    {
+<a name="l01223"></a>01223         <a class="code" href="classTiXmlNode.html#2a38329ca5d3f28f98ce932b8299ae90">SetValue</a>( initValue );
+<a name="l01224"></a>01224         cdata = <span class="keyword">false</span>;
+<a name="l01225"></a>01225     }
+<a name="l01226"></a>01226 <span class="preprocessor">    #endif</span>
+<a name="l01227"></a>01227 <span class="preprocessor"></span>
+<a name="l01228"></a>01228     <a class="code" href="classTiXmlText.html#f659e77c6b87d684827f35a8f4895960">TiXmlText</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlText.html">TiXmlText</a>&amp; copy ) : <a class="code" href="classTiXmlNode.html">TiXmlNode</a>( <a class="code" href="classTiXmlNode.html">TiXmlNode</a>::TEXT )   { copy.<a class="code" href="classTiXmlText.html#dcec7d9b6fccfc5777452bb97e6031c1">CopyTo</a>( <span class="keyword">this</span> ); }
+<a name="l01229"></a>01229     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlText.html">TiXmlText</a>&amp; base )                             { base.<a class="code" href="classTiXmlText.html#dcec7d9b6fccfc5777452bb97e6031c1">CopyTo</a>( <span class="keyword">this</span> ); }
+<a name="l01230"></a>01230 
+<a name="l01231"></a>01231     <span class="comment">// Write this text object to a FILE stream.</span>
+<a name="l01232"></a>01232     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlText.html#0cafbf6f236c7f02d12b2bffc2b7976b">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth ) <span class="keyword">const</span>;
+<a name="l01233"></a>01233 
+<a name="l01235"></a><a class="code" href="classTiXmlText.html#d1a6a6b83fa2271022dd97c072a2b586">01235</a>     <span class="keywordtype">bool</span> <a class="code" href="classTiXmlText.html#d1a6a6b83fa2271022dd97c072a2b586">CDATA</a>()<span class="keyword"> const              </span>{ <span class="keywordflow">return</span> cdata; }
+<a name="l01237"></a><a class="code" href="classTiXmlText.html#cb17ff7c5d09b2c839393445a3de5ea9">01237</a>     <span class="keywordtype">void</span> <a class="code" href="classTiXmlText.html#cb17ff7c5d09b2c839393445a3de5ea9">SetCDATA</a>( <span class="keywordtype">bool</span> _cdata )    { cdata = _cdata; }
+<a name="l01238"></a>01238 
+<a name="l01239"></a>01239     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding );
+<a name="l01240"></a>01240 
+<a name="l01241"></a><a class="code" href="classTiXmlText.html#895bf34ffad17f7439ab2a52b9651648">01241</a>     <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlText.html">TiXmlText</a>* <a class="code" href="classTiXmlText.html#895bf34ffad17f7439ab2a52b9651648">ToText</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">this</span>; } 
+<a name="l01242"></a><a class="code" href="classTiXmlText.html#e7c3a8fd3e4dbf6c0c4363a943d72f5b">01242</a>     <span class="keyword">virtual</span> <a class="code" href="classTiXmlText.html">TiXmlText</a>*       <a class="code" href="classTiXmlText.html#895bf34ffad17f7439ab2a52b9651648">ToText</a>()       { <span class="keywordflow">return</span> <span class="keyword">this</span>; } 
+<a name="l01243"></a>01243 
+<a name="l01246"></a>01246     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlText.html#8483d4415ce9de6c4fa8f63d067d5de6">Accept</a>( <a class="code" href="classTiXmlVisitor.html">TiXmlVisitor</a>* content ) <span class="keyword">const</span>;
+<a name="l01247"></a>01247 
+<a name="l01248"></a>01248 <span class="keyword">protected</span> :
+<a name="l01250"></a>01250     <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlText.html#0c411e93a27537369479d034cc82da3b">Clone</a>() <span class="keyword">const</span>;
+<a name="l01251"></a>01251     <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlText.html">TiXmlText</a>* target ) <span class="keyword">const</span>;
+<a name="l01252"></a>01252 
+<a name="l01253"></a>01253     <span class="keywordtype">bool</span> Blank() <span class="keyword">const</span>; <span class="comment">// returns true if all white space and new lines</span>
+<a name="l01254"></a>01254     <span class="comment">// [internal use]</span>
+<a name="l01255"></a>01255 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l01256"></a>01256 <span class="preprocessor"></span>    <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream * in, TIXML_STRING * tag );
+<a name="l01257"></a>01257 <span class="preprocessor">    #endif</span>
+<a name="l01258"></a>01258 <span class="preprocessor"></span>
+<a name="l01259"></a>01259 <span class="keyword">private</span>:
+<a name="l01260"></a>01260     <span class="keywordtype">bool</span> cdata;         <span class="comment">// true if this should be input and output as a CDATA style text element</span>
+<a name="l01261"></a>01261 };
+<a name="l01262"></a>01262 
+<a name="l01263"></a>01263 
+<a name="l01277"></a><a class="code" href="classTiXmlDeclaration.html">01277</a> <span class="keyword">class </span><a class="code" href="classTiXmlDeclaration.html">TiXmlDeclaration</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>
+<a name="l01278"></a>01278 {
+<a name="l01279"></a>01279 <span class="keyword">public</span>:
+<a name="l01281"></a><a class="code" href="classTiXmlDeclaration.html#a0484d059bea0ea1acb47c9094382d79">01281</a>     <a class="code" href="classTiXmlDeclaration.html#a0484d059bea0ea1acb47c9094382d79">TiXmlDeclaration</a>()   : <a class="code" href="classTiXmlNode.html">TiXmlNode</a>( <a class="code" href="classTiXmlNode.html">TiXmlNode</a>::DECLARATION ) {}
+<a name="l01282"></a>01282 
+<a name="l01283"></a>01283 <span class="preprocessor">#ifdef TIXML_USE_STL</span>
+<a name="l01285"></a>01285 <span class="preprocessor">    TiXmlDeclaration(   const std::string&amp; _version,</span>
+<a name="l01286"></a>01286 <span class="preprocessor"></span>                        <span class="keyword">const</span> std::string&amp; _encoding,
+<a name="l01287"></a>01287                         <span class="keyword">const</span> std::string&amp; _standalone );
+<a name="l01288"></a>01288 <span class="preprocessor">#endif</span>
+<a name="l01289"></a>01289 <span class="preprocessor"></span>
+<a name="l01291"></a>01291     <a class="code" href="classTiXmlDeclaration.html#a0484d059bea0ea1acb47c9094382d79">TiXmlDeclaration</a>(   <span class="keyword">const</span> <span class="keywordtype">char</span>* _version,
+<a name="l01292"></a>01292                         <span class="keyword">const</span> <span class="keywordtype">char</span>* _encoding,
+<a name="l01293"></a>01293                         <span class="keyword">const</span> <span class="keywordtype">char</span>* _standalone );
+<a name="l01294"></a>01294 
+<a name="l01295"></a>01295     <a class="code" href="classTiXmlDeclaration.html#a0484d059bea0ea1acb47c9094382d79">TiXmlDeclaration</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDeclaration.html">TiXmlDeclaration</a>&amp; copy );
+<a name="l01296"></a>01296     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlDeclaration.html">TiXmlDeclaration</a>&amp; copy );
+<a name="l01297"></a>01297 
+<a name="l01298"></a>01298     <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlDeclaration.html">TiXmlDeclaration</a>() {}
+<a name="l01299"></a>01299 
+<a name="l01301"></a><a class="code" href="classTiXmlDeclaration.html#02ee557b1a4545c3219ed377c103ec76">01301</a>     <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classTiXmlDeclaration.html#02ee557b1a4545c3219ed377c103ec76">Version</a>()<span class="keyword"> const         </span>{ <span class="keywordflow">return</span> version.c_str (); }
+<a name="l01303"></a><a class="code" href="classTiXmlDeclaration.html#5d974231f9e9a2f0542f15f3a46cdb76">01303</a>     <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classTiXmlDeclaration.html#5d974231f9e9a2f0542f15f3a46cdb76">Encoding</a>()<span class="keyword"> const        </span>{ <span class="keywordflow">return</span> encoding.c_str (); }
+<a name="l01305"></a><a class="code" href="classTiXmlDeclaration.html#9ff06afc033d7ef730ec7c6825b97ad9">01305</a>     <span class="keyword">const</span> <span class="keywordtype">char</span> *<a class="code" href="classTiXmlDeclaration.html#9ff06afc033d7ef730ec7c6825b97ad9">Standalone</a>()<span class="keyword"> const      </span>{ <span class="keywordflow">return</span> standalone.c_str (); }
+<a name="l01306"></a>01306 
+<a name="l01308"></a>01308     <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlDeclaration.html#7cf459186040141cda7a180a6585ce2e">Clone</a>() <span class="keyword">const</span>;
+<a name="l01309"></a>01309     <span class="comment">// Print this declaration to a FILE stream.</span>
+<a name="l01310"></a>01310     <span class="keyword">virtual</span> <span class="keywordtype">void</span> Print( FILE* cfile, <span class="keywordtype">int</span> depth, TIXML_STRING* str ) <span class="keyword">const</span>;
+<a name="l01311"></a><a class="code" href="classTiXmlDeclaration.html#bf6303db4bd05b5be554036817ff1cb4">01311</a>     <span class="keyword">virtual</span> <span class="keywordtype">void</span> Print( FILE* cfile, <span class="keywordtype">int</span> depth )<span class="keyword"> const </span>{
+<a name="l01312"></a>01312         Print( cfile, depth, 0 );
+<a name="l01313"></a>01313     }
+<a name="l01314"></a>01314 
+<a name="l01315"></a>01315     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding );
+<a name="l01316"></a>01316 
+<a name="l01317"></a><a class="code" href="classTiXmlDeclaration.html#1e085d3fefd1dbf5ccdbff729931a967">01317</a>     <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlDeclaration.html">TiXmlDeclaration</a>* <a class="code" href="classTiXmlDeclaration.html#1e085d3fefd1dbf5ccdbff729931a967">ToDeclaration</a>()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> <span class="keyword">this</span>; } 
+<a name="l01318"></a><a class="code" href="classTiXmlDeclaration.html#6bd3d1daddcaeb9543c24bfd090969ce">01318</a>     <span class="keyword">virtual</span> <a class="code" href="classTiXmlDeclaration.html">TiXmlDeclaration</a>*       <a class="code" href="classTiXmlDeclaration.html#1e085d3fefd1dbf5ccdbff729931a967">ToDeclaration</a>()       { <span class="keywordflow">return</span> <span class="keyword">this</span>; } 
+<a name="l01319"></a>01319 
+<a name="l01322"></a>01322     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDeclaration.html#22315a535983b86535cdba3458669e3e">Accept</a>( <a class="code" href="classTiXmlVisitor.html">TiXmlVisitor</a>* visitor ) <span class="keyword">const</span>;
+<a name="l01323"></a>01323 
+<a name="l01324"></a>01324 <span class="keyword">protected</span>:
+<a name="l01325"></a>01325     <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlDeclaration.html">TiXmlDeclaration</a>* target ) <span class="keyword">const</span>;
+<a name="l01326"></a>01326     <span class="comment">// used to be public</span>
+<a name="l01327"></a>01327 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l01328"></a>01328 <span class="preprocessor"></span>    <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream * in, TIXML_STRING * tag );
+<a name="l01329"></a>01329 <span class="preprocessor">    #endif</span>
+<a name="l01330"></a>01330 <span class="preprocessor"></span>
+<a name="l01331"></a>01331 <span class="keyword">private</span>:
+<a name="l01332"></a>01332 
+<a name="l01333"></a>01333     TIXML_STRING version;
+<a name="l01334"></a>01334     TIXML_STRING encoding;
+<a name="l01335"></a>01335     TIXML_STRING standalone;
+<a name="l01336"></a>01336 };
+<a name="l01337"></a>01337 
+<a name="l01338"></a>01338 
+<a name="l01346"></a><a class="code" href="classTiXmlUnknown.html">01346</a> <span class="keyword">class </span><a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>
+<a name="l01347"></a>01347 {
+<a name="l01348"></a>01348 <span class="keyword">public</span>:
+<a name="l01349"></a>01349     <a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>() : <a class="code" href="classTiXmlNode.html">TiXmlNode</a>( TiXmlNode::UNKNOWN )    {}
+<a name="l01350"></a>01350     <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>() {}
+<a name="l01351"></a>01351 
+<a name="l01352"></a>01352     <a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>&amp; copy ) : <a class="code" href="classTiXmlNode.html">TiXmlNode</a>( TiXmlNode::UNKNOWN )      { copy.<a class="code" href="classTiXmlUnknown.html#08ca7b225a2bcb604d3c72e199d33408">CopyTo</a>( <span class="keyword">this</span> ); }
+<a name="l01353"></a>01353     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>&amp; copy )                                      { copy.<a class="code" href="classTiXmlUnknown.html#08ca7b225a2bcb604d3c72e199d33408">CopyTo</a>( <span class="keyword">this</span> ); }
+<a name="l01354"></a>01354 
+<a name="l01356"></a>01356     <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlUnknown.html#0960bb7428b3f341da46244229604d73">Clone</a>() <span class="keyword">const</span>;
+<a name="l01357"></a>01357     <span class="comment">// Print this Unknown to a FILE stream.</span>
+<a name="l01358"></a>01358     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlUnknown.html#31ba089a40fb5a1869750fce09b0bacb">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth ) <span class="keyword">const</span>;
+<a name="l01359"></a>01359 
+<a name="l01360"></a>01360     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* Parse( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data, TiXmlEncoding encoding );
+<a name="l01361"></a>01361 
+<a name="l01362"></a><a class="code" href="classTiXmlUnknown.html#b0313e5fe77987d746ac1a97a254419d">01362</a>     <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>*     <a class="code" href="classTiXmlUnknown.html#b0313e5fe77987d746ac1a97a254419d">ToUnknown</a>()<span class="keyword">     const </span>{ <span class="keywordflow">return</span> <span class="keyword">this</span>; } 
+<a name="l01363"></a><a class="code" href="classTiXmlUnknown.html#67c9fd22940e8c47f706a72cdd2e332c">01363</a>     <span class="keyword">virtual</span> <a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>*           <a class="code" href="classTiXmlUnknown.html#b0313e5fe77987d746ac1a97a254419d">ToUnknown</a>()     { <span class="keywordflow">return</span> <span class="keyword">this</span>; } 
+<a name="l01364"></a>01364 
+<a name="l01367"></a>01367     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlUnknown.html#d7122e5135581b3c832a1a3217760a93">Accept</a>( <a class="code" href="classTiXmlVisitor.html">TiXmlVisitor</a>* content ) <span class="keyword">const</span>;
+<a name="l01368"></a>01368 
+<a name="l01369"></a>01369 <span class="keyword">protected</span>:
+<a name="l01370"></a>01370     <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>* target ) <span class="keyword">const</span>;
+<a name="l01371"></a>01371 
+<a name="l01372"></a>01372 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l01373"></a>01373 <span class="preprocessor"></span>    <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream * in, TIXML_STRING * tag );
+<a name="l01374"></a>01374 <span class="preprocessor">    #endif</span>
+<a name="l01375"></a>01375 <span class="preprocessor"></span>
+<a name="l01376"></a>01376 <span class="keyword">private</span>:
+<a name="l01377"></a>01377 
+<a name="l01378"></a>01378 };
+<a name="l01379"></a>01379 
+<a name="l01380"></a>01380 
+<a name="l01385"></a><a class="code" href="classTiXmlDocument.html">01385</a> <span class="keyword">class </span><a class="code" href="classTiXmlDocument.html">TiXmlDocument</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>
+<a name="l01386"></a>01386 {
+<a name="l01387"></a>01387 <span class="keyword">public</span>:
+<a name="l01389"></a>01389     <a class="code" href="classTiXmlDocument.html#9f5e84335708fde98400230f9f12659c">TiXmlDocument</a>();
+<a name="l01391"></a>01391     <a class="code" href="classTiXmlDocument.html#9f5e84335708fde98400230f9f12659c">TiXmlDocument</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * documentName );
+<a name="l01392"></a>01392 
+<a name="l01393"></a>01393 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l01395"></a>01395 <span class="preprocessor">    TiXmlDocument( const std::string&amp; documentName );</span>
+<a name="l01396"></a>01396 <span class="preprocessor"></span><span class="preprocessor">    #endif</span>
+<a name="l01397"></a>01397 <span class="preprocessor"></span>
+<a name="l01398"></a>01398     <a class="code" href="classTiXmlDocument.html#9f5e84335708fde98400230f9f12659c">TiXmlDocument</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>&amp; copy );
+<a name="l01399"></a>01399     <span class="keywordtype">void</span> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>&amp; copy );
+<a name="l01400"></a>01400 
+<a name="l01401"></a>01401     <span class="keyword">virtual</span> ~<a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>() {}
+<a name="l01402"></a>01402 
+<a name="l01407"></a>01407     <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#4c852a889c02cf251117fd1d9fe1845f">LoadFile</a>( TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
+<a name="l01409"></a>01409     <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#21c0aeb0d0a720169ad4ac89523ebe93">SaveFile</a>() <span class="keyword">const</span>;
+<a name="l01411"></a>01411     <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#4c852a889c02cf251117fd1d9fe1845f">LoadFile</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
+<a name="l01413"></a>01413     <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#21c0aeb0d0a720169ad4ac89523ebe93">SaveFile</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * filename ) <span class="keyword">const</span>;
+<a name="l01419"></a>01419     <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#4c852a889c02cf251117fd1d9fe1845f">LoadFile</a>( FILE*, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
+<a name="l01421"></a>01421     <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#21c0aeb0d0a720169ad4ac89523ebe93">SaveFile</a>( FILE* ) <span class="keyword">const</span>;
+<a name="l01422"></a>01422 
+<a name="l01423"></a>01423 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l01424"></a><a class="code" href="classTiXmlDocument.html#18ae6ed34fed7991ebc220862dfac884">01424</a> <span class="preprocessor"></span>    <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#4c852a889c02cf251117fd1d9fe1845f">LoadFile</a>( <span class="keyword">const</span> std::string&amp; filename, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING )           
+<a name="l01425"></a>01425     {
+<a name="l01426"></a>01426 <span class="comment">//      StringToBuffer f( filename );</span>
+<a name="l01427"></a>01427 <span class="comment">//      return ( f.buffer &amp;&amp; LoadFile( f.buffer, encoding ));</span>
+<a name="l01428"></a>01428         <span class="keywordflow">return</span> <a class="code" href="classTiXmlDocument.html#4c852a889c02cf251117fd1d9fe1845f">LoadFile</a>( filename.c_str(), encoding );
+<a name="l01429"></a>01429     }
+<a name="l01430"></a><a class="code" href="classTiXmlDocument.html#3d4fae0463f3f03679ba0b7cf6f2df52">01430</a>     <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#21c0aeb0d0a720169ad4ac89523ebe93">SaveFile</a>( <span class="keyword">const</span> std::string&amp; filename ) <span class="keyword">const</span>      
+<a name="l01431"></a>01431     {
+<a name="l01432"></a>01432 <span class="comment">//      StringToBuffer f( filename );</span>
+<a name="l01433"></a>01433 <span class="comment">//      return ( f.buffer &amp;&amp; SaveFile( f.buffer ));</span>
+<a name="l01434"></a>01434         <span class="keywordflow">return</span> <a class="code" href="classTiXmlDocument.html#21c0aeb0d0a720169ad4ac89523ebe93">SaveFile</a>( filename.c_str() );
+<a name="l01435"></a>01435     }
+<a name="l01436"></a>01436 <span class="preprocessor">    #endif</span>
+<a name="l01437"></a>01437 <span class="preprocessor"></span>
+<a name="l01442"></a>01442     <span class="keyword">virtual</span> <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlDocument.html#17ebabe36926ef398e78dec0d0ad0378">Parse</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* p, TiXmlParsingData* data = 0, TiXmlEncoding encoding = TIXML_DEFAULT_ENCODING );
+<a name="l01443"></a>01443 
+<a name="l01448"></a><a class="code" href="classTiXmlDocument.html#d09d17927f908f40efb406af2fb873be">01448</a>     <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlDocument.html#d09d17927f908f40efb406af2fb873be">RootElement</a>()<span class="keyword"> const     </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#f4fb652f6bd79ae0d5ce7d0f7d3c0fba">FirstChildElement</a>(); }
+<a name="l01449"></a>01449     <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlDocument.html#d09d17927f908f40efb406af2fb873be">RootElement</a>()                 { <span class="keywordflow">return</span> <a class="code" href="classTiXmlNode.html#f4fb652f6bd79ae0d5ce7d0f7d3c0fba">FirstChildElement</a>(); }
+<a name="l01450"></a>01450 
+<a name="l01456"></a><a class="code" href="classTiXmlDocument.html#6dfc01a6e5d58e56acd537dfd3bdeb29">01456</a>     <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#6dfc01a6e5d58e56acd537dfd3bdeb29">Error</a>()<span class="keyword"> const                      </span>{ <span class="keywordflow">return</span> error; }
+<a name="l01457"></a>01457 
+<a name="l01459"></a><a class="code" href="classTiXmlDocument.html#9d0f689f6e09ea494ea547be8d79c25e">01459</a>     <span class="keyword">const</span> <span class="keywordtype">char</span> * <a class="code" href="classTiXmlDocument.html#9d0f689f6e09ea494ea547be8d79c25e">ErrorDesc</a>()<span class="keyword"> const  </span>{ <span class="keywordflow">return</span> errorDesc.c_str (); }
+<a name="l01460"></a>01460 
+<a name="l01464"></a><a class="code" href="classTiXmlDocument.html#f96fc2f3f9ec6422782bfe916c9e778f">01464</a>     <span class="keywordtype">int</span> <a class="code" href="classTiXmlDocument.html#f96fc2f3f9ec6422782bfe916c9e778f">ErrorId</a>()<span class="keyword">   const               </span>{ <span class="keywordflow">return</span> errorId; }
+<a name="l01465"></a>01465 
+<a name="l01473"></a><a class="code" href="classTiXmlDocument.html#f30efc75e804aa2e92fb8be3a8cb676e">01473</a>     <span class="keywordtype">int</span> <a class="code" href="classTiXmlDocument.html#f30efc75e804aa2e92fb8be3a8cb676e">ErrorRow</a>()<span class="keyword"> const    </span>{ <span class="keywordflow">return</span> errorLocation.row+1; }
+<a name="l01474"></a><a class="code" href="classTiXmlDocument.html#a90bc630ee5203c6109ca5fad3323649">01474</a>     <span class="keywordtype">int</span> <a class="code" href="classTiXmlDocument.html#a90bc630ee5203c6109ca5fad3323649">ErrorCol</a>()<span class="keyword"> const    </span>{ <span class="keywordflow">return</span> errorLocation.col+1; } 
+<a name="l01475"></a>01475 
+<a name="l01500"></a><a class="code" href="classTiXmlDocument.html#51dac56316f89b35bdb7d0d433ba988e">01500</a>     <span class="keywordtype">void</span> <a class="code" href="classTiXmlDocument.html#51dac56316f89b35bdb7d0d433ba988e">SetTabSize</a>( <span class="keywordtype">int</span> _tabsize )     { tabsize = _tabsize; }
+<a name="l01501"></a>01501 
+<a name="l01502"></a>01502     <span class="keywordtype">int</span> TabSize()<span class="keyword"> const </span>{ <span class="keywordflow">return</span> tabsize; }
+<a name="l01503"></a>01503 
+<a name="l01507"></a><a class="code" href="classTiXmlDocument.html#c66b8c28db86363315712a3574e87c35">01507</a>     <span class="keywordtype">void</span> <a class="code" href="classTiXmlDocument.html#c66b8c28db86363315712a3574e87c35">ClearError</a>()                       {   error = <span class="keyword">false</span>; 
+<a name="l01508"></a>01508                                                 errorId = 0; 
+<a name="l01509"></a>01509                                                 errorDesc = <span class="stringliteral">""</span>; 
+<a name="l01510"></a>01510                                                 errorLocation.row = errorLocation.col = 0; 
+<a name="l01511"></a>01511                                                 <span class="comment">//errorLocation.last = 0; </span>
+<a name="l01512"></a>01512                                             }
+<a name="l01513"></a>01513 
+<a name="l01515"></a><a class="code" href="classTiXmlDocument.html#f08389ec70ee9b2de7f800e206a18510">01515</a>     <span class="keywordtype">void</span> <a class="code" href="classTiXmlDocument.html#f08389ec70ee9b2de7f800e206a18510">Print</a>()<span class="keyword"> const                      </span>{ <a class="code" href="classTiXmlDocument.html#f08389ec70ee9b2de7f800e206a18510">Print</a>( stdout, 0 ); }
+<a name="l01516"></a>01516 
+<a name="l01517"></a>01517     <span class="comment">/* Write the document to a string using formatted printing ("pretty print"). This</span>
+<a name="l01518"></a>01518 <span class="comment">        will allocate a character array (new char[]) and return it as a pointer. The</span>
+<a name="l01519"></a>01519 <span class="comment">        calling code pust call delete[] on the return char* to avoid a memory leak.</span>
+<a name="l01520"></a>01520 <span class="comment">    */</span>
+<a name="l01521"></a>01521     <span class="comment">//char* PrintToMemory() const; </span>
+<a name="l01522"></a>01522 
+<a name="l01524"></a>01524     <span class="keyword">virtual</span> <span class="keywordtype">void</span> <a class="code" href="classTiXmlDocument.html#f08389ec70ee9b2de7f800e206a18510">Print</a>( FILE* cfile, <span class="keywordtype">int</span> depth = 0 ) <span class="keyword">const</span>;
+<a name="l01525"></a>01525     <span class="comment">// [internal use]</span>
+<a name="l01526"></a>01526     <span class="keywordtype">void</span> SetError( <span class="keywordtype">int</span> err, <span class="keyword">const</span> <span class="keywordtype">char</span>* errorLocation, TiXmlParsingData* prevData, TiXmlEncoding encoding );
+<a name="l01527"></a>01527 
+<a name="l01528"></a><a class="code" href="classTiXmlDocument.html#1dc977bde3e4fe85a8eb9d88a35ef5a4">01528</a>     <span class="keyword">virtual</span> <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>*    <a class="code" href="classTiXmlDocument.html#1dc977bde3e4fe85a8eb9d88a35ef5a4">ToDocument</a>()<span class="keyword">    const </span>{ <span class="keywordflow">return</span> <span class="keyword">this</span>; } 
+<a name="l01529"></a><a class="code" href="classTiXmlDocument.html#1025d942a1f328fd742d545e37efdd42">01529</a>     <span class="keyword">virtual</span> <a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>*          <a class="code" href="classTiXmlDocument.html#1dc977bde3e4fe85a8eb9d88a35ef5a4">ToDocument</a>()          { <span class="keywordflow">return</span> <span class="keyword">this</span>; } 
+<a name="l01530"></a>01530 
+<a name="l01533"></a>01533     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlDocument.html#a545aae325d9752ad64120bc4ecf939a">Accept</a>( <a class="code" href="classTiXmlVisitor.html">TiXmlVisitor</a>* content ) <span class="keyword">const</span>;
+<a name="l01534"></a>01534 
+<a name="l01535"></a>01535 <span class="keyword">protected</span> :
+<a name="l01536"></a>01536     <span class="comment">// [internal use]</span>
+<a name="l01537"></a>01537     <span class="keyword">virtual</span> <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlDocument.html#4968661cab4a1f44a23329c6f8db1907">Clone</a>() <span class="keyword">const</span>;
+<a name="l01538"></a>01538 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l01539"></a>01539 <span class="preprocessor"></span>    <span class="keyword">virtual</span> <span class="keywordtype">void</span> StreamIn( std::istream * in, TIXML_STRING * tag );
+<a name="l01540"></a>01540 <span class="preprocessor">    #endif</span>
+<a name="l01541"></a>01541 <span class="preprocessor"></span>
+<a name="l01542"></a>01542 <span class="keyword">private</span>:
+<a name="l01543"></a>01543     <span class="keywordtype">void</span> CopyTo( <a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>* target ) <span class="keyword">const</span>;
+<a name="l01544"></a>01544 
+<a name="l01545"></a>01545     <span class="keywordtype">bool</span> error;
+<a name="l01546"></a>01546     <span class="keywordtype">int</span>  errorId;
+<a name="l01547"></a>01547     TIXML_STRING errorDesc;
+<a name="l01548"></a>01548     <span class="keywordtype">int</span> tabsize;
+<a name="l01549"></a>01549     TiXmlCursor errorLocation;
+<a name="l01550"></a>01550     <span class="keywordtype">bool</span> useMicrosoftBOM;       <span class="comment">// the UTF-8 BOM were found when read. Note this, and try to write.</span>
+<a name="l01551"></a>01551 };
+<a name="l01552"></a>01552 
+<a name="l01553"></a>01553 
+<a name="l01634"></a><a class="code" href="classTiXmlHandle.html">01634</a> <span class="keyword">class </span><a class="code" href="classTiXmlHandle.html">TiXmlHandle</a>
+<a name="l01635"></a>01635 {
+<a name="l01636"></a>01636 <span class="keyword">public</span>:
+<a name="l01638"></a><a class="code" href="classTiXmlHandle.html#ba18fd7bdefb942ecdea4bf4b8e29ec8">01638</a>     <a class="code" href="classTiXmlHandle.html#ba18fd7bdefb942ecdea4bf4b8e29ec8">TiXmlHandle</a>( <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* _node )                 { this-&gt;node = _node; }
+<a name="l01640"></a><a class="code" href="classTiXmlHandle.html#236d7855e1e56ccc7b980630c48c7fd7">01640</a>     <a class="code" href="classTiXmlHandle.html#ba18fd7bdefb942ecdea4bf4b8e29ec8">TiXmlHandle</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a>&amp; ref )           { this-&gt;node = ref.<a class="code" href="classTiXmlHandle.html#c5429de14bb78b16288bac5bf33c6858">node</a>; }
+<a name="l01641"></a>01641     <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a> operator=( <span class="keyword">const</span> <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a>&amp; ref ) { this-&gt;node = ref.<a class="code" href="classTiXmlHandle.html#c5429de14bb78b16288bac5bf33c6858">node</a>; <span class="keywordflow">return</span> *<span class="keyword">this</span>; }
+<a name="l01642"></a>01642 
+<a name="l01644"></a>01644     <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#cdb1faaf88a700b40ca2c8d9aee21139">FirstChild</a>() <span class="keyword">const</span>;
+<a name="l01646"></a>01646     <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#cdb1faaf88a700b40ca2c8d9aee21139">FirstChild</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * value ) <span class="keyword">const</span>;
+<a name="l01648"></a>01648     <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#24d1112e995e937e4dddb202d4113d4a">FirstChildElement</a>() <span class="keyword">const</span>;
+<a name="l01650"></a>01650     <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#24d1112e995e937e4dddb202d4113d4a">FirstChildElement</a>( <span class="keyword">const</span> <span class="keywordtype">char</span> * value ) <span class="keyword">const</span>;
+<a name="l01651"></a>01651 
+<a name="l01655"></a>01655     <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#072492b4be1acdb0db2d03cd8f71ccc4">Child</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* value, <span class="keywordtype">int</span> index ) <span class="keyword">const</span>;
+<a name="l01659"></a>01659     <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#072492b4be1acdb0db2d03cd8f71ccc4">Child</a>( <span class="keywordtype">int</span> index ) <span class="keyword">const</span>;
+<a name="l01664"></a>01664     <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#979a3f850984a176ee884e394c7eed2d">ChildElement</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* value, <span class="keywordtype">int</span> index ) <span class="keyword">const</span>;
+<a name="l01669"></a>01669     <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#979a3f850984a176ee884e394c7eed2d">ChildElement</a>( <span class="keywordtype">int</span> index ) <span class="keyword">const</span>;
+<a name="l01670"></a>01670 
+<a name="l01671"></a>01671 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l01672"></a>01672 <span class="preprocessor"></span>    <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#cdb1faaf88a700b40ca2c8d9aee21139">FirstChild</a>( <span class="keyword">const</span> std::string&amp; _value )<span class="keyword"> const               </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#cdb1faaf88a700b40ca2c8d9aee21139">FirstChild</a>( _value.c_str() ); }
+<a name="l01673"></a>01673     <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#24d1112e995e937e4dddb202d4113d4a">FirstChildElement</a>( <span class="keyword">const</span> std::string&amp; _value )<span class="keyword"> const        </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#24d1112e995e937e4dddb202d4113d4a">FirstChildElement</a>( _value.c_str() ); }
+<a name="l01674"></a>01674 
+<a name="l01675"></a>01675     <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#072492b4be1acdb0db2d03cd8f71ccc4">Child</a>( <span class="keyword">const</span> std::string&amp; _value, <span class="keywordtype">int</span> index )<span class="keyword"> const         </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#072492b4be1acdb0db2d03cd8f71ccc4">Child</a>( _value.c_str(), index ); }
+<a name="l01676"></a>01676     <a class="code" href="classTiXmlHandle.html">TiXmlHandle</a> <a class="code" href="classTiXmlHandle.html#979a3f850984a176ee884e394c7eed2d">ChildElement</a>( <span class="keyword">const</span> std::string&amp; _value, <span class="keywordtype">int</span> index )<span class="keyword"> const  </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#979a3f850984a176ee884e394c7eed2d">ChildElement</a>( _value.c_str(), index ); }
+<a name="l01677"></a>01677 <span class="preprocessor">    #endif</span>
+<a name="l01678"></a>01678 <span class="preprocessor"></span>
+<a name="l01681"></a><a class="code" href="classTiXmlHandle.html#f678e5088e83be67baf76f699756f2c3">01681</a>     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlHandle.html#f678e5088e83be67baf76f699756f2c3">ToNode</a>()<span class="keyword"> const           </span>{ <span class="keywordflow">return</span> node; } 
+<a name="l01684"></a><a class="code" href="classTiXmlHandle.html#bc6e7ed383a5fe1e52b0c0004b457b9e">01684</a>     <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlHandle.html#bc6e7ed383a5fe1e52b0c0004b457b9e">ToElement</a>()<span class="keyword"> const     </span>{ <span class="keywordflow">return</span> ( ( node &amp;&amp; node-&gt;<a class="code" href="classTiXmlNode.html#72abed96dc9667ab9e0a2a275301bb1c">ToElement</a>() ) ? node-&gt;<a class="code" href="classTiXmlNode.html#72abed96dc9667ab9e0a2a275301bb1c">ToElement</a>() : 0 ); }
+<a name="l01687"></a><a class="code" href="classTiXmlHandle.html#4ac53a652296203a5b5e13854d923586">01687</a>     <a class="code" href="classTiXmlText.html">TiXmlText</a>* <a class="code" href="classTiXmlHandle.html#4ac53a652296203a5b5e13854d923586">ToText</a>()<span class="keyword"> const           </span>{ <span class="keywordflow">return</span> ( ( node &amp;&amp; node-&gt;<a class="code" href="classTiXmlNode.html#95a46a52c525992d6b4ee08beb14cd69">ToText</a>() ) ? node-&gt;<a class="code" href="classTiXmlNode.html#95a46a52c525992d6b4ee08beb14cd69">ToText</a>() : 0 ); }
+<a name="l01690"></a><a class="code" href="classTiXmlHandle.html#1381c17507a130767b1e23afc93b3674">01690</a>     <a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>* <a class="code" href="classTiXmlHandle.html#1381c17507a130767b1e23afc93b3674">ToUnknown</a>()<span class="keyword"> const     </span>{ <span class="keywordflow">return</span> ( ( node &amp;&amp; node-&gt;<a class="code" href="classTiXmlNode.html#fd7205cf31d7a376929f8a36930627a2">ToUnknown</a>() ) ? node-&gt;<a class="code" href="classTiXmlNode.html#fd7205cf31d7a376929f8a36930627a2">ToUnknown</a>() : 0 ); }
+<a name="l01691"></a>01691 
+<a name="l01695"></a><a class="code" href="classTiXmlHandle.html#b44b723a8dc9af72838a303c079d0376">01695</a>     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* <a class="code" href="classTiXmlHandle.html#b44b723a8dc9af72838a303c079d0376">Node</a>()<span class="keyword"> const         </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#f678e5088e83be67baf76f699756f2c3">ToNode</a>(); } 
+<a name="l01699"></a><a class="code" href="classTiXmlHandle.html#cb5fe8388a526289ea65e817a51e05e7">01699</a>     <a class="code" href="classTiXmlElement.html">TiXmlElement</a>* <a class="code" href="classTiXmlHandle.html#cb5fe8388a526289ea65e817a51e05e7">Element</a>()<span class="keyword"> const   </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#bc6e7ed383a5fe1e52b0c0004b457b9e">ToElement</a>(); }
+<a name="l01703"></a><a class="code" href="classTiXmlHandle.html#9fc739c8a18d160006f82572fc143d13">01703</a>     <a class="code" href="classTiXmlText.html">TiXmlText</a>* <a class="code" href="classTiXmlHandle.html#9fc739c8a18d160006f82572fc143d13">Text</a>()<span class="keyword"> const         </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#4ac53a652296203a5b5e13854d923586">ToText</a>(); }
+<a name="l01707"></a><a class="code" href="classTiXmlHandle.html#49675b74357ba2aae124657a9a1ef465">01707</a>     <a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>* <a class="code" href="classTiXmlHandle.html#49675b74357ba2aae124657a9a1ef465">Unknown</a>()<span class="keyword"> const   </span>{ <span class="keywordflow">return</span> <a class="code" href="classTiXmlHandle.html#1381c17507a130767b1e23afc93b3674">ToUnknown</a>(); }
+<a name="l01708"></a>01708 
+<a name="l01709"></a>01709 <span class="keyword">private</span>:
+<a name="l01710"></a>01710     <a class="code" href="classTiXmlNode.html">TiXmlNode</a>* node;
+<a name="l01711"></a>01711 };
+<a name="l01712"></a>01712 
+<a name="l01713"></a>01713 
+<a name="l01733"></a><a class="code" href="classTiXmlPrinter.html">01733</a> <span class="keyword">class </span><a class="code" href="classTiXmlPrinter.html">TiXmlPrinter</a> : <span class="keyword">public</span> <a class="code" href="classTiXmlVisitor.html">TiXmlVisitor</a>
+<a name="l01734"></a>01734 {
+<a name="l01735"></a>01735 <span class="keyword">public</span>:
+<a name="l01736"></a>01736     <a class="code" href="classTiXmlPrinter.html">TiXmlPrinter</a>() : depth( 0 ), simpleTextPrint( <span class="keyword">false</span> ),
+<a name="l01737"></a>01737                      buffer(), indent( <span class="stringliteral">"    "</span> ), lineBreak( <span class="stringliteral">"\n"</span> ) {}
+<a name="l01738"></a>01738 
+<a name="l01739"></a>01739     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#799f4f0388570cbb54c0d3c345fef7c1">VisitEnter</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>&amp; doc );
+<a name="l01740"></a>01740     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#66b33edd76c538b462f789b797a4fdf2">VisitExit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDocument.html">TiXmlDocument</a>&amp; doc );
+<a name="l01741"></a>01741 
+<a name="l01742"></a>01742     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#799f4f0388570cbb54c0d3c345fef7c1">VisitEnter</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>&amp; element, <span class="keyword">const</span> <a class="code" href="classTiXmlAttribute.html">TiXmlAttribute</a>* firstAttribute );
+<a name="l01743"></a>01743     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#66b33edd76c538b462f789b797a4fdf2">VisitExit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlElement.html">TiXmlElement</a>&amp; element );
+<a name="l01744"></a>01744 
+<a name="l01745"></a>01745     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#ce1b14d33eede2575c0743e2350f6a38">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlDeclaration.html">TiXmlDeclaration</a>&amp; declaration );
+<a name="l01746"></a>01746     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#ce1b14d33eede2575c0743e2350f6a38">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlText.html">TiXmlText</a>&amp; text );
+<a name="l01747"></a>01747     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#ce1b14d33eede2575c0743e2350f6a38">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlComment.html">TiXmlComment</a>&amp; comment );
+<a name="l01748"></a>01748     <span class="keyword">virtual</span> <span class="keywordtype">bool</span> <a class="code" href="classTiXmlPrinter.html#ce1b14d33eede2575c0743e2350f6a38">Visit</a>( <span class="keyword">const</span> <a class="code" href="classTiXmlUnknown.html">TiXmlUnknown</a>&amp; unknown );
+<a name="l01749"></a>01749 
+<a name="l01753"></a><a class="code" href="classTiXmlPrinter.html#213377a4070c7e625bae59716b089e5e">01753</a>     <span class="keywordtype">void</span> <a class="code" href="classTiXmlPrinter.html#213377a4070c7e625bae59716b089e5e">SetIndent</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* _indent )           { indent = _indent ? _indent : <span class="stringliteral">""</span> ; }
+<a name="l01755"></a><a class="code" href="classTiXmlPrinter.html#bb33ec7d4bad6aaeb57f4304394b133d">01755</a>     <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlPrinter.html#bb33ec7d4bad6aaeb57f4304394b133d">Indent</a>()                            { <span class="keywordflow">return</span> indent.c_str(); }
+<a name="l01760"></a><a class="code" href="classTiXmlPrinter.html#4be1e37e69e3858c59635aa947174fe6">01760</a>     <span class="keywordtype">void</span> <a class="code" href="classTiXmlPrinter.html#4be1e37e69e3858c59635aa947174fe6">SetLineBreak</a>( <span class="keyword">const</span> <span class="keywordtype">char</span>* _lineBreak )     { lineBreak = _lineBreak ? _lineBreak : <span class="stringliteral">""</span>; }
+<a name="l01762"></a><a class="code" href="classTiXmlPrinter.html#11f1b4804a460b175ec244eb5724d96d">01762</a>     <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlPrinter.html#11f1b4804a460b175ec244eb5724d96d">LineBreak</a>()                         { <span class="keywordflow">return</span> lineBreak.c_str(); }
+<a name="l01763"></a>01763 
+<a name="l01767"></a><a class="code" href="classTiXmlPrinter.html#b23a90629e374cb1cadca090468bbd19">01767</a>     <span class="keywordtype">void</span> <a class="code" href="classTiXmlPrinter.html#b23a90629e374cb1cadca090468bbd19">SetStreamPrinting</a>()                        { indent = <span class="stringliteral">""</span>;
+<a name="l01768"></a>01768                                                       lineBreak = <span class="stringliteral">""</span>;
+<a name="l01769"></a>01769                                                     }   
+<a name="l01771"></a><a class="code" href="classTiXmlPrinter.html#859eede9597d3e0355b77757be48735e">01771</a>     <span class="keyword">const</span> <span class="keywordtype">char</span>* <a class="code" href="classTiXmlPrinter.html#859eede9597d3e0355b77757be48735e">CStr</a>()                              { <span class="keywordflow">return</span> buffer.c_str(); }
+<a name="l01773"></a><a class="code" href="classTiXmlPrinter.html#d01375ae9199bd2f48252eaddce3039d">01773</a>     size_t <a class="code" href="classTiXmlPrinter.html#d01375ae9199bd2f48252eaddce3039d">Size</a>()                                   { <span class="keywordflow">return</span> buffer.size(); }
+<a name="l01774"></a>01774 
+<a name="l01775"></a>01775 <span class="preprocessor">    #ifdef TIXML_USE_STL</span>
+<a name="l01777"></a><a class="code" href="classTiXmlPrinter.html#3bd4daf44309b41f5813a833caa0d1c9">01777</a> <span class="preprocessor">    const std::string&amp; Str()                        { return buffer; }</span>
+<a name="l01778"></a>01778 <span class="preprocessor"></span><span class="preprocessor">    #endif</span>
+<a name="l01779"></a>01779 <span class="preprocessor"></span>
+<a name="l01780"></a>01780 <span class="keyword">private</span>:
+<a name="l01781"></a>01781     <span class="keywordtype">void</span> DoIndent() {
+<a name="l01782"></a>01782         <span class="keywordflow">for</span>( <span class="keywordtype">int</span> i=0; i&lt;depth; ++i )
+<a name="l01783"></a>01783             buffer += indent;
+<a name="l01784"></a>01784     }
+<a name="l01785"></a>01785     <span class="keywordtype">void</span> DoLineBreak() {
+<a name="l01786"></a>01786         buffer += lineBreak;
+<a name="l01787"></a>01787     }
+<a name="l01788"></a>01788 
+<a name="l01789"></a>01789     <span class="keywordtype">int</span> depth;
+<a name="l01790"></a>01790     <span class="keywordtype">bool</span> simpleTextPrint;
+<a name="l01791"></a>01791     TIXML_STRING buffer;
+<a name="l01792"></a>01792     TIXML_STRING indent;
+<a name="l01793"></a>01793     TIXML_STRING lineBreak;
+<a name="l01794"></a>01794 };
+<a name="l01795"></a>01795 
+<a name="l01796"></a>01796 
+<a name="l01797"></a>01797 <span class="preprocessor">#ifdef _MSC_VER</span>
+<a name="l01798"></a>01798 <span class="preprocessor"></span><span class="preprocessor">#pragma warning( pop )</span>
+<a name="l01799"></a>01799 <span class="preprocessor"></span><span class="preprocessor">#endif</span>
+<a name="l01800"></a>01800 <span class="preprocessor"></span>
+<a name="l01801"></a>01801 <span class="preprocessor">#endif</span>
+<a name="l01802"></a>01802 <span class="preprocessor"></span>
+</pre></div><hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/docs/tutorial0.html	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,721 @@
+<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
+<html><head><meta http-equiv="Content-Type" content="text/html;charset=iso-8859-1">
+<title>TinyXml: TinyXML Tutorial</title>
+<link href="doxygen.css" rel="stylesheet" type="text/css">
+<link href="tabs.css" rel="stylesheet" type="text/css">
+</head><body>
+<!-- Generated by Doxygen 1.4.7 -->
+<div class="tabs">
+  <ul>
+    <li><a href="index.html"><span>Main&nbsp;Page</span></a></li>
+    <li><a href="annotated.html"><span>Classes</span></a></li>
+    <li><a href="files.html"><span>Files</span></a></li>
+    <li><a href="pages.html"><span>Related&nbsp;Pages</span></a></li>
+  </ul></div>
+<div class="nav">
+<a class="el" href="index.html">index</a></div>
+<h1><a class="anchor" name="tutorial0">TinyXML Tutorial</a></h1><h1>What is this? </h1>
+<p>
+This tutorial has a few tips and suggestions on how to use TinyXML effectively.<p>
+I've also tried to include some C++ tips like how to convert strings to integers and vice versa. This isn't anything to do with TinyXML itself, but it may helpful for your project so I've put it in anyway.<p>
+If you don't know basic C++ concepts this tutorial won't be useful. Likewise if you don't know what a DOM is, look elsewhere first.<p>
+<h1>Before we start </h1>
+<p>
+Some example XML datasets/files will be used.<p>
+example1.xml:<p>
+<div class="fragment"><pre class="fragment">&lt;?xml version="1.0" ?&gt;
+&lt;Hello&gt;World&lt;/Hello&gt;
+</pre></div><p>
+example2.xml:<p>
+<div class="fragment"><pre class="fragment">&lt;?xml version="1.0" ?&gt;
+&lt;poetry&gt;
+	&lt;verse&gt;
+		Alas
+		  Great World
+			Alas (again)
+	&lt;/verse&gt;
+&lt;/poetry&gt;
+</pre></div><p>
+example3.xml:<p>
+<div class="fragment"><pre class="fragment">&lt;?xml version="1.0" ?&gt;
+&lt;shapes&gt;
+	&lt;circle name="int-based" x="20" y="30" r="50" /&gt;
+	&lt;point name="float-based" x="3.5" y="52.1" /&gt;
+&lt;/shapes&gt;
+</pre></div><p>
+example4.xml<p>
+<div class="fragment"><pre class="fragment">&lt;?xml version="1.0" ?&gt;
+&lt;MyApp&gt;
+    &lt;!-- Settings for MyApp --&gt;
+    &lt;Messages&gt;
+        &lt;Welcome&gt;Welcome to MyApp&lt;/Welcome&gt;
+        &lt;Farewell&gt;Thank you for using MyApp&lt;/Farewell&gt;
+    &lt;/Messages&gt;
+    &lt;Windows&gt;
+        &lt;Window name="MainFrame" x="5" y="15" w="400" h="250" /&gt;
+    &lt;/Windows&gt;
+    &lt;Connection ip="192.168.0.1" timeout="123.456000" /&gt;
+&lt;/MyApp&gt;
+</pre></div><p>
+<h1>Getting Started </h1>
+<p>
+<h2>Load XML from a file </h2>
+<p>
+The simplest way to load a file into a TinyXML DOM is:<p>
+<div class="fragment"><pre class="fragment">TiXmlDocument doc( "demo.xml" );
+doc.LoadFile();
+</pre></div><p>
+A more real-world usage is shown below. This will load the file and display the contents to STDOUT:<p>
+<div class="fragment"><pre class="fragment">// load the named file and dump its structure to STDOUT
+void dump_to_stdout(const char* pFilename)
+{
+	TiXmlDocument doc(pFilename);
+	bool loadOkay = doc.LoadFile();
+	if (loadOkay)
+	{
+		printf("\n%s:\n", pFilename);
+		dump_to_stdout( &amp;doc ); // defined later in the tutorial
+	}
+	else
+	{
+		printf("Failed to load file \"%s\"\n", pFilename);
+	}
+}
+</pre></div><p>
+A simple demonstration of this function is to use a main like this:<p>
+<div class="fragment"><pre class="fragment">int main(void)
+{
+	dump_to_stdout("example1.xml");
+	return 0;
+}
+</pre></div><p>
+Recall that Example 1 XML is:<p>
+<div class="fragment"><pre class="fragment">&lt;?xml version="1.0" ?&gt;
+&lt;Hello&gt;World&lt;/Hello&gt;
+</pre></div><p>
+Running the program with this XML will display this in the console/DOS window:<p>
+<div class="fragment"><pre class="fragment">DOCUMENT
++ DECLARATION
++ ELEMENT Hello
+  + TEXT[World]
+</pre></div><p>
+The ``dump_to_stdout`` function is defined later in this tutorial and is useful if you want to understand recursive traversal of a DOM.<p>
+<h2>Building Documents Programatically </h2>
+<p>
+This is how to build Example 1 pragmatically:<p>
+<div class="fragment"><pre class="fragment">void build_simple_doc( )
+{
+	// Make xml: &lt;?xml ..&gt;&lt;Hello&gt;World&lt;/Hello&gt;
+	TiXmlDocument doc;
+	TiXmlDeclaration * decl = new TiXmlDeclaration( "1.0", "", "" );
+	TiXmlElement * element = new TiXmlElement( "Hello" );
+	TiXmlText * text = new TiXmlText( "World" );
+	element-&gt;LinkEndChild( text );
+	doc.LinkEndChild( decl );
+	doc.LinkEndChild( element );
+	doc.SaveFile( "madeByHand.xml" );
+}
+</pre></div><p>
+This can be loaded and displayed on the console with:<p>
+<div class="fragment"><pre class="fragment">dump_to_stdout("madeByHand.xml"); // this func defined later in the tutorial
+</pre></div><p>
+and you'll see it is identical to Example 1:<p>
+<div class="fragment"><pre class="fragment">madeByHand.xml:
+Document
++ Declaration
++ Element [Hello]
+  + Text: [World]
+</pre></div><p>
+This code produces exactly the same XML DOM but it shows a different ordering to node creation and linking:<p>
+<div class="fragment"><pre class="fragment">void write_simple_doc2( )
+{
+	// same as write_simple_doc1 but add each node
+	// as early as possible into the tree.
+
+	TiXmlDocument doc;
+	TiXmlDeclaration * decl = new TiXmlDeclaration( "1.0", "", "" );
+	doc.LinkEndChild( decl );
+	
+	TiXmlElement * element = new TiXmlElement( "Hello" );
+	doc.LinkEndChild( element );
+	
+	TiXmlText * text = new TiXmlText( "World" );
+	element-&gt;LinkEndChild( text );
+	
+	doc.SaveFile( "madeByHand2.xml" );
+}
+</pre></div><p>
+Both of these produce the same XML, namely:<p>
+<div class="fragment"><pre class="fragment">&lt;?xml version="1.0" ?&gt;
+&lt;Hello&gt;World&lt;/Hello&gt;
+</pre></div><p>
+Or in structure form:<p>
+<div class="fragment"><pre class="fragment">DOCUMENT
++ DECLARATION
++ ELEMENT Hello
+  + TEXT[World]
+</pre></div><p>
+<h2>Attributes </h2>
+<p>
+Given an existing node, settings attributes is easy:<p>
+<div class="fragment"><pre class="fragment">window = new TiXmlElement( "Demo" );  
+window-&gt;SetAttribute("name", "Circle");
+window-&gt;SetAttribute("x", 5);
+window-&gt;SetAttribute("y", 15);
+window-&gt;SetDoubleAttribute("radius", 3.14159);
+</pre></div><p>
+You can it also work with the <a class="el" href="classTiXmlAttribute.html">TiXmlAttribute</a> objects if you want.<p>
+The following code shows one way (not the only way) to get all attributes of an element, print the name and string value, and if the value can be converted to an integer or double, print that value too:<p>
+<div class="fragment"><pre class="fragment">// print all attributes of pElement.
+// returns the number of attributes printed
+int dump_attribs_to_stdout(TiXmlElement* pElement, unsigned int indent)
+{
+	if ( !pElement ) return 0;
+
+	TiXmlAttribute* pAttrib=pElement-&gt;FirstAttribute();
+	int i=0;
+	int ival;
+	double dval;
+	const char* pIndent=getIndent(indent);
+	printf("\n");
+	while (pAttrib)
+	{
+		printf( "%s%s: value=[%s]", pIndent, pAttrib-&gt;Name(), pAttrib-&gt;Value());
+
+		if (pAttrib-&gt;QueryIntValue(&amp;ival)==TIXML_SUCCESS)    printf( " int=%d", ival);
+		if (pAttrib-&gt;QueryDoubleValue(&amp;dval)==TIXML_SUCCESS) printf( " d=%1.1f", dval);
+		printf( "\n" );
+		i++;
+		pAttrib=pAttrib-&gt;Next();
+	}
+	return i;
+}
+</pre></div><p>
+<h2>Writing a document to a file </h2>
+<p>
+Writing a pre-built DOM to a file is trivial:<p>
+<div class="fragment"><pre class="fragment">doc.SaveFile( saveFilename );  
+</pre></div><p>
+Recall, for example, example 4:<p>
+<div class="fragment"><pre class="fragment">&lt;?xml version="1.0" ?&gt;
+&lt;MyApp&gt;
+    &lt;!-- Settings for MyApp --&gt;
+    &lt;Messages&gt;
+        &lt;Welcome&gt;Welcome to MyApp&lt;/Welcome&gt;
+        &lt;Farewell&gt;Thank you for using MyApp&lt;/Farewell&gt;
+    &lt;/Messages&gt;
+    &lt;Windows&gt;
+        &lt;Window name="MainFrame" x="5" y="15" w="400" h="250" /&gt;
+    &lt;/Windows&gt;
+    &lt;Connection ip="192.168.0.1" timeout="123.456000" /&gt;
+&lt;/MyApp&gt;
+</pre></div><p>
+The following function builds this DOM and writes the file "appsettings.xml":<p>
+<div class="fragment"><pre class="fragment">void write_app_settings_doc( )  
+{  
+	TiXmlDocument doc;  
+	TiXmlElement* msg;
+ 	TiXmlDeclaration* decl = new TiXmlDeclaration( "1.0", "", "" );  
+	doc.LinkEndChild( decl );  
+ 
+	TiXmlElement * root = new TiXmlElement( "MyApp" );  
+	doc.LinkEndChild( root );  
+
+	TiXmlComment * comment = new TiXmlComment();
+	comment-&gt;SetValue(" Settings for MyApp " );  
+	root-&gt;LinkEndChild( comment );  
+ 
+	TiXmlElement * msgs = new TiXmlElement( "Messages" );  
+	root-&gt;LinkEndChild( msgs );  
+ 
+	msg = new TiXmlElement( "Welcome" );  
+	msg-&gt;LinkEndChild( new TiXmlText( "Welcome to MyApp" ));  
+	msgs-&gt;LinkEndChild( msg );  
+ 
+	msg = new TiXmlElement( "Farewell" );  
+	msg-&gt;LinkEndChild( new TiXmlText( "Thank you for using MyApp" ));  
+	msgs-&gt;LinkEndChild( msg );  
+ 
+	TiXmlElement * windows = new TiXmlElement( "Windows" );  
+	root-&gt;LinkEndChild( windows );  
+
+	TiXmlElement * window;
+	window = new TiXmlElement( "Window" );  
+	windows-&gt;LinkEndChild( window );  
+	window-&gt;SetAttribute("name", "MainFrame");
+	window-&gt;SetAttribute("x", 5);
+	window-&gt;SetAttribute("y", 15);
+	window-&gt;SetAttribute("w", 400);
+	window-&gt;SetAttribute("h", 250);
+
+	TiXmlElement * cxn = new TiXmlElement( "Connection" );  
+	root-&gt;LinkEndChild( cxn );  
+	cxn-&gt;SetAttribute("ip", "192.168.0.1");
+	cxn-&gt;SetDoubleAttribute("timeout", 123.456); // floating point attrib
+	
+	dump_to_stdout( &amp;doc );
+	doc.SaveFile( "appsettings.xml" );  
+} 
+</pre></div><p>
+The dump_to_stdout function will show this structure:<p>
+<div class="fragment"><pre class="fragment">Document
++ Declaration
++ Element [MyApp]
+ (No attributes)
+  + Comment: [ Settings for MyApp ]
+  + Element [Messages]
+ (No attributes)
+    + Element [Welcome]
+ (No attributes)
+      + Text: [Welcome to MyApp]
+    + Element [Farewell]
+ (No attributes)
+      + Text: [Thank you for using MyApp]
+  + Element [Windows]
+ (No attributes)
+    + Element [Window]
+      + name: value=[MainFrame]
+      + x: value=[5] int=5 d=5.0
+      + y: value=[15] int=15 d=15.0
+      + w: value=[400] int=400 d=400.0
+      + h: value=[250] int=250 d=250.0
+      5 attributes
+  + Element [Connection]
+    + ip: value=[192.168.0.1] int=192 d=192.2
+    + timeout: value=[123.456000] int=123 d=123.5
+    2 attributes
+</pre></div><p>
+I was surprised that TinyXml, by default, writes the XML in what other APIs call a "pretty" format - it modifies the whitespace of text of elements that contain other nodes so that writing the tree includes an indication of nesting level.<p>
+I haven't looked yet to see if there is a way to turn off indenting when writing a file - its bound to be easy.<p>
+[Lee: It's easy in STL mode, just use cout &lt;&lt; myDoc. Non-STL mode is always in "pretty" format. Adding a switch would be a nice feature and has been requested.]<p>
+<h1>XML to/from C++ objects </h1>
+<p>
+<h2>Intro </h2>
+<p>
+This example assumes you're loading and saving your app settings in an XML file, e.g. something like example4.xml.<p>
+There are a number of ways to do this. For example, look into the TinyBind project at <a href="http://sourceforge.net/projects/tinybind">http://sourceforge.net/projects/tinybind</a><p>
+This section shows a plain-old approach to loading and saving a basic object structure using XML.<p>
+<h2>Set up your object classes </h2>
+<p>
+Start off with some basic classes like these:<p>
+<div class="fragment"><pre class="fragment">#include &lt;string&gt;
+#include &lt;map&gt;
+using namespace std;
+
+typedef std::map&lt;std::string,std::string&gt; MessageMap;
+
+// a basic window abstraction - demo purposes only
+class WindowSettings
+{
+public:
+	int x,y,w,h;
+	string name;
+
+	WindowSettings()
+		: x(0), y(0), w(100), h(100), name("Untitled")
+	{
+	}
+
+	WindowSettings(int x, int y, int w, int h, const string&amp; name)
+	{
+		this-&gt;x=x;
+		this-&gt;y=y;
+		this-&gt;w=w;
+		this-&gt;h=h;
+		this-&gt;name=name;
+	}
+};
+
+class ConnectionSettings
+{
+public:
+	string ip;
+	double timeout;
+};
+
+class AppSettings
+{
+public:
+	string m_name;
+	MessageMap m_messages;
+	list&lt;WindowSettings&gt; m_windows;
+	ConnectionSettings m_connection;
+
+	AppSettings() {}
+
+	void save(const char* pFilename);
+	void load(const char* pFilename);
+	
+	// just to show how to do it
+	void setDemoValues()
+	{
+		m_name="MyApp";
+		m_messages.clear();
+		m_messages["Welcome"]="Welcome to "+m_name;
+		m_messages["Farewell"]="Thank you for using "+m_name;
+		m_windows.clear();
+		m_windows.push_back(WindowSettings(15,15,400,250,"Main"));
+		m_connection.ip="Unknown";
+		m_connection.timeout=123.456;
+	}
+};
+</pre></div><p>
+This is a basic main() that shows how to create a default settings object tree, save it and load it again:<p>
+<div class="fragment"><pre class="fragment">int main(void)
+{
+	AppSettings settings;
+	
+	settings.save("appsettings2.xml");
+	settings.load("appsettings2.xml");
+	return 0;
+}
+</pre></div><p>
+The following main() shows creation, modification, saving and then loading of a settings structure:<p>
+<div class="fragment"><pre class="fragment">int main(void)
+{
+	// block: customise and save settings
+	{
+		AppSettings settings;
+		settings.m_name="HitchHikerApp";
+		settings.m_messages["Welcome"]="Don't Panic";
+		settings.m_messages["Farewell"]="Thanks for all the fish";
+		settings.m_windows.push_back(WindowSettings(15,25,300,250,"BookFrame"));
+		settings.m_connection.ip="192.168.0.77";
+		settings.m_connection.timeout=42.0;
+
+		settings.save("appsettings2.xml");
+	}
+	
+	// block: load settings
+	{
+		AppSettings settings;
+		settings.load("appsettings2.xml");
+		printf("%s: %s\n", settings.m_name.c_str(), 
+			settings.m_messages["Welcome"].c_str());
+		WindowSettings &amp; w=settings.m_windows.front();
+		printf("%s: Show window '%s' at %d,%d (%d x %d)\n", 
+			settings.m_name.c_str(), w.name.c_str(), w.x, w.y, w.w, w.h);
+		printf("%s: %s\n", settings.m_name.c_str(), settings.m_messages["Farewell"].c_str());
+	}
+	return 0;
+}
+</pre></div><p>
+When the save() and load() are completed (see below), running this main() displays on the console:<p>
+<div class="fragment"><pre class="fragment">HitchHikerApp: Don't Panic
+HitchHikerApp: Show window 'BookFrame' at 15,25 (300 x 100)
+HitchHikerApp: Thanks for all the fish
+</pre></div><p>
+<h2>Encode C++ state as XML </h2>
+<p>
+There are lots of different ways to approach saving this to a file. Here's one:<p>
+<div class="fragment"><pre class="fragment">void AppSettings::save(const char* pFilename)
+{
+	TiXmlDocument doc;  
+	TiXmlElement* msg;
+	TiXmlComment * comment;
+	string s;
+ 	TiXmlDeclaration* decl = new TiXmlDeclaration( "1.0", "", "" );  
+	doc.LinkEndChild( decl ); 
+ 
+	TiXmlElement * root = new TiXmlElement(m_name.c_str());  
+	doc.LinkEndChild( root );  
+
+	comment = new TiXmlComment();
+	s=" Settings for "+m_name+" ";
+	comment-&gt;SetValue(s.c_str());  
+	root-&gt;LinkEndChild( comment );  
+
+	// block: messages
+	{
+		MessageMap::iterator iter;
+
+		TiXmlElement * msgs = new TiXmlElement( "Messages" );  
+		root-&gt;LinkEndChild( msgs );  
+ 
+		for (iter=m_messages.begin(); iter != m_messages.end(); iter++)
+		{
+			const string &amp; key=(*iter).first;
+			const string &amp; value=(*iter).second;
+			msg = new TiXmlElement(key.c_str());  
+			msg-&gt;LinkEndChild( new TiXmlText(value.c_str()));  
+			msgs-&gt;LinkEndChild( msg );  
+		}
+	}
+
+	// block: windows
+	{
+		TiXmlElement * windowsNode = new TiXmlElement( "Windows" );  
+		root-&gt;LinkEndChild( windowsNode );  
+
+		list&lt;WindowSettings&gt;::iterator iter;
+
+		for (iter=m_windows.begin(); iter != m_windows.end(); iter++)
+		{
+			const WindowSettings&amp; w=*iter;
+
+			TiXmlElement * window;
+			window = new TiXmlElement( "Window" );  
+			windowsNode-&gt;LinkEndChild( window );  
+			window-&gt;SetAttribute("name", w.name.c_str());
+			window-&gt;SetAttribute("x", w.x);
+			window-&gt;SetAttribute("y", w.y);
+			window-&gt;SetAttribute("w", w.w);
+			window-&gt;SetAttribute("h", w.h);
+		}
+	}
+
+	// block: connection
+	{
+		TiXmlElement * cxn = new TiXmlElement( "Connection" );  
+		root-&gt;LinkEndChild( cxn );  
+		cxn-&gt;SetAttribute("ip", m_connection.ip.c_str());
+		cxn-&gt;SetDoubleAttribute("timeout", m_connection.timeout); 
+	}
+
+	doc.SaveFile(pFilename);  
+}
+</pre></div><p>
+Running this with the modified main produces this file:<p>
+<div class="fragment"><pre class="fragment">&lt;?xml version="1.0" ?&gt;
+&lt;HitchHikerApp&gt;
+    &lt;!-- Settings for HitchHikerApp --&gt;
+    &lt;Messages&gt;
+        &lt;Farewell&gt;Thanks for all the fish&lt;/Farewell&gt;
+        &lt;Welcome&gt;Don&amp;apos;t Panic&lt;/Welcome&gt;
+    &lt;/Messages&gt;
+    &lt;Windows&gt;
+        &lt;Window name="BookFrame" x="15" y="25" w="300" h="250" /&gt;
+    &lt;/Windows&gt;
+    &lt;Connection ip="192.168.0.77" timeout="42.000000" /&gt;
+&lt;/HitchHikerApp&gt;
+</pre></div><p>
+<h2>Decoding state from XML </h2>
+<p>
+As with encoding objects, there are a number of approaches to decoding XML into your own C++ object structure. The following approach uses TiXmlHandles.<p>
+<div class="fragment"><pre class="fragment">void AppSettings::load(const char* pFilename)
+{
+	TiXmlDocument doc(pFilename);
+	if (!doc.LoadFile()) return;
+
+	TiXmlHandle hDoc(&amp;doc);
+	TiXmlElement* pElem;
+	TiXmlHandle hRoot(0);
+
+	// block: name
+	{
+		pElem=hDoc.FirstChildElement().Element();
+		// should always have a valid root but handle gracefully if it does
+		if (!pElem) return;
+		m_name=pElem-&gt;Value();
+
+		// save this for later
+		hRoot=TiXmlHandle(pElem);
+	}
+
+	// block: string table
+	{
+		m_messages.clear(); // trash existing table
+
+		pElem=hRoot.FirstChild( "Messages" ).FirstChild().Element();
+		for( pElem; pElem; pElem=pElem-&gt;NextSiblingElement())
+		{
+			const char *pKey=pElem-&gt;Value();
+			const char *pText=pElem-&gt;GetText();
+			if (pKey &amp;&amp; pText) 
+			{
+				m_messages[pKey]=pText;
+			}
+		}
+	}
+
+	// block: windows
+	{
+		m_windows.clear(); // trash existing list
+
+		TiXmlElement* pWindowNode=hRoot.FirstChild( "Windows" ).FirstChild().Element();
+		for( pWindowNode; pWindowNode; pWindowNode=pWindowNode-&gt;NextSiblingElement())
+		{
+			WindowSettings w;
+			const char *pName=pWindowNode-&gt;Attribute("name");
+			if (pName) w.name=pName;
+			
+			pWindowNode-&gt;QueryIntAttribute("x", &amp;w.x); // If this fails, original value is left as-is
+			pWindowNode-&gt;QueryIntAttribute("y", &amp;w.y);
+			pWindowNode-&gt;QueryIntAttribute("w", &amp;w.w);
+			pWindowNode-&gt;QueryIntAttribute("hh", &amp;w.h);
+
+			m_windows.push_back(w);
+		}
+	}
+
+	// block: connection
+	{
+		pElem=hRoot.FirstChild("Connection").Element();
+		if (pElem)
+		{
+			m_connection.ip=pElem-&gt;Attribute("ip");
+			pElem-&gt;QueryDoubleAttribute("timeout",&amp;m_connection.timeout);
+		}
+	}
+}
+</pre></div><p>
+<h1>Full listing for dump_to_stdout </h1>
+<p>
+Below is a copy-and-paste demo program for loading arbitrary XML files and dumping the structure to STDOUT using the recursive traversal listed above.<p>
+<div class="fragment"><pre class="fragment">// tutorial demo program
+#include "stdafx.h"
+#include "tinyxml.h"
+
+// ----------------------------------------------------------------------
+// STDOUT dump and indenting utility functions
+// ----------------------------------------------------------------------
+const unsigned int NUM_INDENTS_PER_SPACE=2;
+
+const char * getIndent( unsigned int numIndents )
+{
+	static const char * pINDENT="                                      + ";
+	static const unsigned int LENGTH=strlen( pINDENT );
+	unsigned int n=numIndents*NUM_INDENTS_PER_SPACE;
+	if ( n &gt; LENGTH ) n = LENGTH;
+
+	return &amp;pINDENT[ LENGTH-n ];
+}
+
+// same as getIndent but no "+" at the end
+const char * getIndentAlt( unsigned int numIndents )
+{
+	static const char * pINDENT="                                        ";
+	static const unsigned int LENGTH=strlen( pINDENT );
+	unsigned int n=numIndents*NUM_INDENTS_PER_SPACE;
+	if ( n &gt; LENGTH ) n = LENGTH;
+
+	return &amp;pINDENT[ LENGTH-n ];
+}
+
+int dump_attribs_to_stdout(TiXmlElement* pElement, unsigned int indent)
+{
+	if ( !pElement ) return 0;
+
+	TiXmlAttribute* pAttrib=pElement-&gt;FirstAttribute();
+	int i=0;
+	int ival;
+	double dval;
+	const char* pIndent=getIndent(indent);
+	printf("\n");
+	while (pAttrib)
+	{
+		printf( "%s%s: value=[%s]", pIndent, pAttrib-&gt;Name(), pAttrib-&gt;Value());
+
+		if (pAttrib-&gt;QueryIntValue(&amp;ival)==TIXML_SUCCESS)    printf( " int=%d", ival);
+		if (pAttrib-&gt;QueryDoubleValue(&amp;dval)==TIXML_SUCCESS) printf( " d=%1.1f", dval);
+		printf( "\n" );
+		i++;
+		pAttrib=pAttrib-&gt;Next();
+	}
+	return i;	
+}
+
+void dump_to_stdout( TiXmlNode* pParent, unsigned int indent = 0 )
+{
+	if ( !pParent ) return;
+
+	TiXmlNode* pChild;
+	TiXmlText* pText;
+	int t = pParent-&gt;Type();
+	printf( "%s", getIndent(indent));
+	int num;
+
+	switch ( t )
+	{
+	case TiXmlNode::DOCUMENT:
+		printf( "Document" );
+		break;
+
+	case TiXmlNode::ELEMENT:
+		printf( "Element [%s]", pParent-&gt;Value() );
+		num=dump_attribs_to_stdout(pParent-&gt;ToElement(), indent+1);
+		switch(num)
+		{
+			case 0:  printf( " (No attributes)"); break;
+			case 1:  printf( "%s1 attribute", getIndentAlt(indent)); break;
+			default: printf( "%s%d attributes", getIndentAlt(indent), num); break;
+		}
+		break;
+
+	case TiXmlNode::COMMENT:
+		printf( "Comment: [%s]", pParent-&gt;Value());
+		break;
+
+	case TiXmlNode::UNKNOWN:
+		printf( "Unknown" );
+		break;
+
+	case TiXmlNode::TEXT:
+		pText = pParent-&gt;ToText();
+		printf( "Text: [%s]", pText-&gt;Value() );
+		break;
+
+	case TiXmlNode::DECLARATION:
+		printf( "Declaration" );
+		break;
+	default:
+		break;
+	}
+	printf( "\n" );
+	for ( pChild = pParent-&gt;FirstChild(); pChild != 0; pChild = pChild-&gt;NextSibling()) 
+	{
+		dump_to_stdout( pChild, indent+1 );
+	}
+}
+
+// load the named file and dump its structure to STDOUT
+void dump_to_stdout(const char* pFilename)
+{
+	TiXmlDocument doc(pFilename);
+	bool loadOkay = doc.LoadFile();
+	if (loadOkay)
+	{
+		printf("\n%s:\n", pFilename);
+		dump_to_stdout( &amp;doc ); // defined later in the tutorial
+	}
+	else
+	{
+		printf("Failed to load file \"%s\"\n", pFilename);
+	}
+}
+
+// ----------------------------------------------------------------------
+// main() for printing files named on the command line
+// ----------------------------------------------------------------------
+int main(int argc, char* argv[])
+{
+	for (int i=1; i&lt;argc; i++)
+	{
+		dump_to_stdout(argv[i]);
+	}
+	return 0;
+}
+</pre></div><p>
+Run this from the command line or a DOS window, e.g.:<p>
+<div class="fragment"><pre class="fragment">C:\dev\tinyxml&gt; Debug\tinyxml_1.exe example1.xml
+
+example1.xml:
+Document
++ Declaration
++ Element [Hello]
+ (No attributes)
+  + Text: [World]
+</pre></div><p>
+<em> Authors and Changes <ul>
+<li>
+Written by Ellers, April, May, June 2005  </li>
+<li>
+Minor edits and integration into doc system, Lee Thomason September 2005  </li>
+<li>
+Updated by Ellers, October 2005  </li>
+</ul>
+</em> <hr size="1"><address style="align: right;"><small>Generated on Sun May 6 15:41:23 2007 for TinyXml by&nbsp;
+<a href="http://www.doxygen.org/index.html">
+<img src="doxygen.png" alt="doxygen" align="middle" border="0"></a> 1.4.7 </small></address>
+</body>
+</html>
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/tinystr.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/tinystr.h	Wed Sep 17 11:01:52 2008 +0000
@@ -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
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/tinyxml.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,1888 @@
+/*
+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 <ctype.h>
+
+#ifdef TIXML_USE_STL
+#include <sstream>
+#include <iostream>
+#endif
+
+#include "tinyxml.h"
+
+
+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;
+}
+
+
+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;
+}
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/tinyxml.h	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,1802 @@
+/*
+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_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 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 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
+*/
+class TiXmlBase
+{
+	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,
+		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 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.
+
+	/** 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;
+};
+
+
+/** 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
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/tinyxmlerror.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -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.",
+};
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/src/tinyxml/tinyxmlparser.cpp	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,1638 @@
+/*
+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
+	// - Everthing else is unknown to tinyxml.
+	//
+
+	const char* xmlHeader = { "<?xml" };
+	const char* commentHeader = { "<!--" };
+	const char* dtdHeader = { "<!" };
+	const char* cdataHeader = { "<![CDATA[" };
+
+	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;
+}
+
Binary file translation/de/LC_MESSAGES/sumwars.mo has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/translation/de/LC_MESSAGES/sumwars.po	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,820 @@
+# ITEM - NAMES
+msgid "noitem"
+msgstr "kein Item"
+
+msgid "leather_armor"
+msgstr "Lederruestung"
+
+msgid "tiled_armor"
+msgstr "Plattenruestung"
+
+msgid "heavy_armor"
+msgstr "Schwere Ruestung"
+
+msgid "armor"
+msgstr "Ruestung"
+
+msgid "steel_helmet"
+msgstr "Stahlhelm"
+
+msgid "divine_helmet"
+msgstr "Zauberhelm"
+
+msgid "helmet"
+msgstr "Helm"
+
+msgid "gloves"
+msgstr "Handschuhe"
+
+msgid "short_sword"
+msgstr "Kurzschwert"
+
+msgid "long_sword"
+msgstr "Langschwert"
+
+msgid "wooden_bow"
+msgstr "Holzbogen"
+
+msgid "long_bow"
+msgstr "Langbogen"
+
+msgid "burning_bow"
+msgstr "Feuerbogen"
+
+msgid "battle_axe"
+msgstr "Kriegsaxt"
+
+msgid "holy_flail"
+msgstr "Morgenstern"
+
+msgid "weapon"
+msgstr "Waffe"
+
+msgid "wooden_shield"
+msgstr "Holzschild"
+
+msgid "iron_shield"
+msgstr "Eisenschild"
+
+msgid "shield"
+msgstr "Schild"
+
+msgid "small_heal_potion"
+msgstr "kl. Heiltrank"
+
+msgid "big_heal_potion"
+msgstr "gr. Heiltrank"
+
+msgid "heal_blind_potion"
+msgstr "Medizin"
+
+msgid "instant_unfreeze_potion"
+msgstr "Auftautrank"
+
+msgid "potion"
+msgstr "Zaubertrank"
+
+msgid "ring"
+msgstr "Ring"
+
+msgid "amulet"
+msgstr "Amulett"
+
+msgid "unknown"
+msgstr "unbekannt"
+
+
+
+# ACTION - NAMES
+msgid "noaction"
+msgstr "keine Aktion"
+
+msgid "walk"
+msgstr "Laufen"
+
+msgid "attack"
+msgstr "Angriff"
+
+msgid "range_attack"
+msgstr "Distanz Angriff"
+
+msgid "magic_attack"
+msgstr "Magischer Angriff"
+
+msgid "holy_attack"
+msgstr "Heiliger Angriff"
+
+msgid "bash"
+msgstr "Harter Schlag"
+
+msgid "hammer_bash"
+msgstr "Hammerschlag"
+
+msgid "around_blow"
+msgstr "Rundumschlag"
+
+msgid "whirl_blow"
+msgstr "Wirbelschlag"
+
+msgid "smash"
+msgstr "Schmetterschlag"
+
+msgid "hate_mage"
+msgstr "Zauberhass"
+
+msgid "charge"
+msgstr "Sturmangriff"
+
+msgid "storm_charge"
+msgstr "Sturmsense"
+
+msgid "decoy"
+msgstr "Koeder"
+
+msgid "scare"
+msgstr "Herausforderung"
+
+msgid "firesword"
+msgstr "Feuer und Schwert"
+
+msgid "flamesword"
+msgstr "Flammenpakt"
+
+msgid "flamearmor"
+msgstr "Flammenruestung"
+
+msgid "berserk"
+msgstr "Kampfschrei"
+
+msgid "warcry"
+msgstr "Kriegsschrei"
+
+msgid "regenerate"
+msgstr "Regeneration"
+
+msgid "anger"
+msgstr "Barbarische Wut"
+
+msgid "fury"
+msgstr "Barbarische Kraft"
+
+msgid "steadfast"
+msgstr "Turm in der Schlacht"
+
+msgid "block"
+msgstr "Blocken"
+
+msgid "weaponmaster"
+msgstr "Waffenmeister"
+
+msgid "monster_hunter"
+msgstr "Monsterjaeger"
+
+msgid "monster_slayer"
+msgstr "Monsterschlaechter"
+
+msgid "endurance"
+msgstr "Ausdauer"
+
+msgid "fire_bolt"
+msgstr "Feuerblitz"
+
+msgid "fire_strike"
+msgstr "Feuerschlag"
+
+msgid "fire_wave"
+msgstr "Feuerwelle"
+
+msgid "fire_storm"
+msgstr "Feuersturm"
+
+msgid "fire_ball"
+msgstr "Feuerball"
+
+msgid "inferno_ball"
+msgstr "Infernoball"
+
+msgid "fire_wall"
+msgstr "Feuersaeule"
+
+msgid "inflame"
+msgstr "Entzuenden"
+
+msgid "ice_bolt"
+msgstr "Eiszapfen"
+
+msgid "ice_spike"
+msgstr "Eisspeer"
+
+msgid "snow_storm"
+msgstr "Schneesturm"
+
+msgid "blizzard"
+msgstr "Blizzard"
+
+msgid "ice_ring"
+msgstr "Eisring"
+
+msgid "frost_ring"
+msgstr "Frostring"
+
+msgid "freeze"
+msgstr "Einfrieren"
+
+msgid "chill"
+msgstr "Klirrende Kaelte"
+
+msgid "lightning"
+msgstr "Blitz"
+
+msgid "lightning_strike"
+msgstr "Blitzschlag"
+
+msgid "thunderstorm"
+msgstr "Gewitter"
+
+msgid "thunderstorm2"
+msgstr "Blitzgewitter"
+
+msgid "chain_lightning"
+msgstr "Kettenblitz"
+
+msgid "chain_lightning2"
+msgstr "Kugelblitz"
+
+msgid "static_shield"
+msgstr "Statikschild"
+
+msgid "ionisation"
+msgstr "Ionisierung"
+
+msgid "triple_shot"
+msgstr "1 Vogel mit 3 Steinen"
+
+msgid "guided_triple_shot"
+msgstr "Todesschwarm"
+
+msgid "multishot"
+msgstr "Faecherschuss"
+
+msgid "volley_shot"
+msgstr "Eisenhagel"
+
+msgid "pierce"
+msgstr "Elfenwanderer"
+
+msgid "weak_point"
+msgstr "wunder Punkt"
+
+msgid "blind_rage"
+msgstr "blinde Wut"
+
+msgid "vacuum"
+msgstr "Vakuum"
+
+msgid "death_roulette"
+msgstr "Todesroulette"
+
+msgid "exploding_arrow"
+msgstr "Sprengpfeil"
+
+msgid "exploding_cascade"
+msgstr "Sprengkaskade"
+
+msgid "aimed_shot"
+msgstr "Zielschuss"
+
+msgid "bow_spirit"
+msgstr "Bogenseele"
+
+msgid "ice_arrows"
+msgstr "Eispfeil"
+
+msgid "freezing_arrows"
+msgstr "Frostpfeile"
+
+msgid "wind_arrows"
+msgstr "Windpfeile"
+
+msgid "storm_arrows"
+msgstr "Sturmpfeile"
+
+msgid "wind_walk"
+msgstr "Windwandern"
+
+msgid "evade"
+msgstr "Katzenreflexe"
+
+msgid "critical_strike"
+msgstr "Elfenaugen"
+
+msgid "concentration"
+msgstr "Konzentration"
+
+msgid "mental_wall"
+msgstr "Geistige Wand"
+
+msgid "resist_ice"
+msgstr "Nordwanderer"
+
+msgid "resist_air"
+msgstr "Nordjaeger"
+
+msgid "holy_light"
+msgstr "reinigendes Licht"
+
+msgid "holy_fire"
+msgstr "reinigendes Feuer"
+
+msgid "burning_rage"
+msgstr "brennende Wut"
+
+msgid "cure_blind_mute"
+msgstr "sanftes Leuchten"
+
+msgid "cure_blind_mute_party"
+msgstr "allessehendes Auge"
+
+msgid "blazing_shield"
+msgstr "lodernder Schild"
+
+msgid "light_beam"
+msgstr "gleissendes Licht"
+
+msgid "burning_sun"
+msgstr "blendende Sonne"
+
+msgid "break_binding"
+msgstr "Bindung loesen"
+
+msgid "disrupt_binding"
+msgstr "Bindung sprengen"
+
+msgid "magic_shield"
+msgstr "magischer Schild"
+
+msgid "cure_pois_burn"
+msgstr "Schmerz lindern"
+
+msgid "cure_pois_burn_party"
+msgstr "heilendes Wasser"
+
+msgid "acid"
+msgstr "Saeure"
+
+msgid "heal"
+msgstr "Heilung"
+
+msgid "heal_party"
+msgstr "Grosse Heilung"
+
+msgid "divine_wind"
+msgstr "zorniger Wind"
+
+msgid "divine_storm"
+msgstr "Goettlicher Sturm"
+
+msgid "blade_storm"
+msgstr "Klingensturm"
+
+msgid "cure_conf_bsrk"
+msgstr "Konzentration wiederherstellen"
+
+msgid "cure_conf_bsrk_party"
+msgstr "Seelenschild"
+
+msgid "hypnosis"
+msgstr "Hypnose"
+
+msgid "hypnosis2"
+msgstr "hypnotischer Wirbel"
+
+msgid "keen_mind"
+msgstr "messerscharfer Geist"
+
+
+
+# ACTION - DESCRIPTIONS
+msgid "descr_noaction"
+msgstr ""
+
+msgid "descr_walk"
+msgstr ""
+
+msgid "descr_take_item"
+msgstr ""
+
+msgid "descr_attack"
+msgstr "Normaler Angriff."
+
+msgid "descr_range_attack"
+msgstr "Normaler Distanz-Angriff."
+
+msgid "descr_magic_attack"
+msgstr "Normaler Magischer Angriff."
+
+msgid "descr_holy_attack"
+msgstr "Normaler Heiliger Angriff."
+
+msgid "descr_bash"
+msgstr "Führt einen harten Schlag gegen den Gegner aus."
+
+msgid "descr_hammer_bash"
+msgstr "Trifft mehrere Gegner in der Umgebung durch einen heftigen Schlag."
+
+msgid "descr_around_blow"
+msgstr "Führt einen Angriff gegen alle Gegner in Waffenreichweite aus."
+
+msgid "descr_whirl_blow"
+msgstr "Führt einen Angriff gegen mehrere Gegener in der Umgebung aus."
+
+msgid "descr_smash"
+msgstr "Greift einen Gegner mit einem wuchtigen Schlag an, der selbst die Rüstung durchschlägt."
+
+msgid "descr_hate_mage"
+msgstr "Der Hass des Kriegers verletzt den Gegner."
+
+msgid "descr_charge"
+msgstr "Der Krieger bewegt sich blitzschnell zum Gegner und greift ihn an."
+
+msgid "descr_storm_charge"
+msgstr "Der Krieger bewegt sich blitzschnell zum Gegner und greift ihn mehrfach an."
+
+msgid "descr_decoy"
+msgstr ""
+
+msgid "descr_scare"
+msgstr ""
+
+msgid "descr_firesword"
+msgstr ""
+
+msgid "descr_flamesword"
+msgstr ""
+
+msgid "descr_flamearmor"
+msgstr "Hüllt den Krieger in eine Flammenrüstung, die Gegnern in seiner Nähe Schaden zufügt."
+
+msgid "descr_berserk"
+msgstr ""
+
+msgid "descr_warcry"
+msgstr ""
+
+msgid "descr_regenerate"
+msgstr ""
+
+msgid "descr_anger"
+msgstr ""
+
+msgid "descr_fury"
+msgstr ""
+
+msgid "descr_steadfast"
+msgstr ""
+
+msgid "descr_block"
+msgstr ""
+
+msgid "descr_weaponmaster"
+msgstr ""
+
+msgid "descr_monster_hunter"
+msgstr ""
+
+msgid "descr_monster_slayer"
+msgstr ""
+
+msgid "descr_endurance"
+msgstr ""
+
+msgid "descr_fire_bolt"
+msgstr "Der Gegner wird mit brennenden Kugeln beschossen."
+
+msgid "descr_fire_strike"
+msgstr "Der Gegner wird mit vielen, großen brennenden Kugeln angegriffen."
+
+msgid "descr_fire_wave"
+msgstr "Mehrere Gegner im Umkreis fangen schlagartig an zu brennen."
+
+msgid "descr_fire_storm"
+msgstr "Mehrere Gegner im Umkreis verbrennen in einem rießigen Inferno."
+
+msgid "descr_fire_ball"
+msgstr "Die Gegner werden mit einem großen Feuerball beschossen."
+
+msgid "descr_inferno_ball"
+msgstr "Die Gegner werden mit einer Salve von großen Feuerbällen angegriffen."
+
+msgid "descr_fire_wall"
+msgstr "Die Gegner werden durch eine Feuerwalze überrollt."
+
+msgid "descr_inflame"
+msgstr "Mehrere Gegner werden beschossen und beginnen zu brennen."
+
+msgid "descr_ice_bolt"
+msgstr ""
+
+msgid "descr_ice_spike"
+msgstr ""
+
+msgid "descr_snow_storm"
+msgstr ""
+
+msgid "descr_blizzard"
+msgstr ""
+
+msgid "descr_ice_ring"
+msgstr ""
+
+msgid "descr_frost_ring"
+msgstr ""
+
+msgid "descr_freeze"
+msgstr ""
+
+msgid "descr_chill"
+msgstr ""
+
+msgid "descr_lightning"
+msgstr ""
+
+msgid "descr_lightning_strike"
+msgstr ""
+
+msgid "descr_thunderstorm"
+msgstr ""
+
+msgid "descr_thunderstorm2"
+msgstr ""
+
+msgid "descr_chain_lightning"
+msgstr ""
+
+msgid "descr_chain_lightning2"
+msgstr ""
+
+msgid "descr_static_shield"
+msgstr ""
+
+msgid "descr_ionisation"
+msgstr ""
+
+msgid "descr_triple_shot"
+msgstr "Der Gegner wird mit 3 Pfeilen beschossen."
+
+msgid "descr_guided_triple_shot"
+msgstr "Pfeil durchschlägt Gegner und kann so mehrere treffen, die wiederum wahllos angreifen."
+
+msgid "descr_multishot"
+msgstr "Einige Pfeile werden in die Umgebung geschossen."
+
+msgid "descr_volley_shot"
+msgstr "Sehr viele Pfeile werden in die Umgebung geschossen."
+
+msgid "descr_pierce"
+msgstr "Pfeil durchschlägt Gegner und kann so mehrere treffen."
+
+msgid "descr_weak_point"
+msgstr "Gegner greifen nach dem Treffer wahllos andere an."
+
+msgid "descr_blind_rage"
+msgstr "Gegner greifen nach dem Treffer wahllos andere an."
+
+msgid "descr_vacuum"
+msgstr "Der Gegner wird in ein Vakuum gehüllt."
+
+msgid "descr_death_roulette"
+msgstr "Der Pfeil kann am Gegener abprallen und so mehrere Treffer verursachen."
+
+msgid "descr_exploding_arrow"
+msgstr "Der Pfeil explodiert beim Einschlag und triff so auch Gegner in der Umgebung des Treffers."
+
+msgid "descr_exploding_cascade"
+msgstr "Der Pfeil verursacht beim Einschlag mehrere Explosionen in der Umgebung des Treffers."
+
+msgid "descr_aimed_shot"
+msgstr ""
+
+msgid "descr_bow_spirit"
+msgstr ""
+
+msgid "descr_ice_arrows"
+msgstr ""
+
+msgid "descr_freezing_arrows"
+msgstr ""
+
+msgid "descr_wind_arrows"
+msgstr ""
+
+msgid "descr_storm_arrows"
+msgstr ""
+
+msgid "descr_wind_walk"
+msgstr ""
+
+msgid "descr_evade"
+msgstr ""
+
+msgid "descr_critical_strike"
+msgstr ""
+
+msgid "descr_concentration"
+msgstr ""
+
+msgid "descr_mental_wall"
+msgstr ""
+
+msgid "descr_resist_ice"
+msgstr ""
+
+msgid "descr_resist_air"
+msgstr ""
+
+msgid "descr_holy_light"
+msgstr ""
+
+msgid "descr_holy_fire"
+msgstr ""
+
+msgid "descr_burning_rage"
+msgstr ""
+
+msgid "descr_cure_blind_mute"
+msgstr ""
+
+msgid "descr_cure_blind_mute_party"
+msgstr ""
+
+msgid "descr_blazing_shield"
+msgstr ""
+
+msgid "descr_light_beam"
+msgstr ""
+
+msgid "descr_burning_sun"
+msgstr ""
+
+msgid "descr_break_binding"
+msgstr ""
+
+msgid "descr_disrupt_binding"
+msgstr ""
+
+msgid "descr_magic_shield"
+msgstr ""
+
+msgid "descr_cure_pois_burn"
+msgstr ""
+
+msgid "descr_cure_pois_burn_party"
+msgstr ""
+
+msgid "descr_acid"
+msgstr ""
+
+msgid "descr_heal"
+msgstr ""
+
+msgid "descr_heal_party"
+msgstr ""
+
+msgid "descr_divine_wind"
+msgstr ""
+
+msgid "descr_divine_storm"
+msgstr ""
+
+msgid "descr_blade_storm"
+msgstr ""
+
+msgid "descr_cure_conf_bsrk"
+msgstr ""
+
+msgid "descr_cure_conf_bsrk_party"
+msgstr ""
+
+msgid "descr_hypnosis"
+msgstr ""
+
+msgid "descr_hypnosis2"
+msgstr ""
+
+msgid "descr_keen_mind"
+msgstr ""
+
+
+
+# MAINWINDOW - CHARACTER
+msgid "main_power"
+msgstr "Staerke"
+
+msgid "main_dexterity"
+msgstr "Geschick"
+
+msgid "main_willpower"
+msgstr "Willenskraft"
+
+msgid "main_magic_power"
+msgstr "Zauberkraft"
+
+msgid "main_credits"
+msgstr "Punkte"
+
+msgid "main_experience"
+msgstr "Erfahrung"
+
+msgid "main_healthpoints"
+msgstr "LP"
+
+msgid "main_attack"
+msgstr "Attacke"
+
+msgid "main_attacks_per_second"
+msgstr "Angriffe/s"
+
+msgid "main_range"
+msgstr "Reichweite"
+
+msgid "main_penetration_power"
+msgstr "Durchschlagskraft"
+
+msgid "main_armour"
+msgstr "Ruestung"
+
+msgid "main_block"
+msgstr "Block"
+
+msgid "main_base_damage"
+msgstr "Angriff"
+
+msgid "main_physical_resistance"
+msgstr "Physische Resistenz"
+
+msgid "main_fire_resistance"
+msgstr "Feuer-Resistenz"
+
+msgid "main_air_resistance"
+msgstr "Luft-Resistenz"
+
+msgid "main_ice_resistance"
+msgstr "Eis-Resistenz"
+
+
+
+# MAINWINDOW - SKILLTREE
+msgid "main_firemagic"
+msgstr "Feuermagie"
+
+msgid "main_icemagic"
+msgstr "Eismagie"
+
+msgid "main_airmagic"
+msgstr "Luftmagie"
+
+msgid "main_lightmagic"
+msgstr "Lichtmagie"
+
+msgid "main_watermagic"
+msgstr "Wassermagie"
+
+msgid "main_windmagic"
+msgstr "Windmagie"
+
+
+
+# MAINWINDOW - MAIN
+msgid "main_saveexit"
+msgstr "Speichern/Ende"
+
+msgid "main_options"
+msgstr "Optionen"
+
+msgid "main_warrior"
+msgstr "Krieger"
+
+msgid "main_magician"
+msgstr "Magier"
+
+msgid "main_archer"
+msgstr "Schuetze"
+
+msgid "main_priest"
+msgstr "Priester"
+
+
+
+# DOCUMENT - ABILITY DESCRIPTION
+msgid "doc_description"
+msgstr "Beschreibung: "
+
+msgid "doc_minimum_level"
+msgstr "Mindestlevel: "
+
+msgid "doc_timer"
+msgstr "Timer: "
+
+msgid "doc_timer_runtime"
+msgstr "Timerlaufzeit: "
+
Binary file translation/en/LC_MESSAGES/sumwars.mo has changed
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/translation/en/LC_MESSAGES/sumwars.po	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,199 @@
+# ITEM - NAMES
+msgid "noitem"
+msgstr "No Item"
+
+msgid "leather_armor"
+msgstr "Leather Armor"
+
+msgid "tiled_armor"
+msgstr "Tiled Armor"
+
+msgid "heavy_armor"
+msgstr "Heavy Armor"
+
+msgid "armor"
+msgstr "Armor"
+
+msgid "steel_helmet"
+msgstr "Steel Helmet"
+
+msgid "divine_helmet"
+msgstr "Divine Helmet"
+
+msgid "helmet"
+msgstr "Helmet"
+
+msgid "gloves"
+msgstr "Gloves"
+
+msgid "short_sword"
+msgstr "Short Sword"
+
+msgid "long_sword"
+msgstr "Long Sword"
+
+msgid "wooden_bow"
+msgstr "Wooden Bow"
+
+msgid "long_bow"
+msgstr "Long Bow"
+
+msgid "burning_bow"
+msgstr "Burning Bow"
+
+msgid "battle_axe"
+msgstr "Battle Axe"
+
+msgid "holy_flail"
+msgstr "Holy Flail"
+
+msgid "weapon"
+msgstr "Weapon"
+
+msgid "wooden_shield"
+msgstr "Wooden Shield"
+
+msgid "iron_shield"
+msgstr "Iron Shield"
+
+msgid "shield"
+msgstr "Shield"
+
+msgid "small_heal_potion"
+msgstr "Small Heal Potion"
+
+msgid "big_heal_potion"
+msgstr "Big Heal Potion"
+
+msgid "heal_blind_potion"
+msgstr "Heal Blind Potion"
+
+msgid "instant_unfreeze_potion"
+msgstr "Intant Unfreeze Potion"
+
+msgid "potion"
+msgstr "Potion"
+
+msgid "ring"
+msgstr "Ring"
+
+msgid "amulet"
+msgstr "Amulet"
+
+msgid "unknown"
+msgstr "Unknown"
+
+
+
+# MAINWINDOW - CHARACTER
+msgid "main_power"
+msgstr "Power"
+
+msgid "main_dexterity"
+msgstr "Dexterity"
+
+msgid "main_willpower"
+msgstr "Willpower"
+
+msgid "main_magic_power"
+msgstr "Magic Power"
+
+msgid "main_credits"
+msgstr "Credits"
+
+msgid "main_experience"
+msgstr "Experience"
+
+msgid "main_healthpoints"
+msgstr "HP"
+
+msgid "main_attack"
+msgstr "Attack"
+
+msgid "main_attacks_per_second"
+msgstr "Attacks/s"
+
+msgid "main_range"
+msgstr "Range"
+
+msgid "main_penetration_power"
+msgstr "Penetration Power"
+
+msgid "main_armour"
+msgstr "Armour"
+
+msgid "main_block"
+msgstr "Block"
+
+msgid "main_base_damage"
+msgstr "Base Damage"
+
+msgid "main_physical_resistance"
+msgstr "Physical Resistance"
+
+msgid "main_fire_resistance"
+msgstr "Fire Resistance"
+
+msgid "main_air_resistance"
+msgstr "Air Resistance"
+
+msgid "main_ice_resistance"
+msgstr "Ice Resistance"
+
+
+
+# MAINWINDOW - SKILLTREE
+msgid "main_firemagic"
+msgstr "Firemagic"
+
+msgid "main_icemagic"
+msgstr "Icemagic"
+
+msgid "main_airmagic"
+msgstr "Airmagic"
+
+msgid "main_lightmagic"
+msgstr "Lightmagic"
+
+msgid "main_watermagic"
+msgstr "Watermagic"
+
+msgid "main_windmagic"
+msgstr "Windmagic"
+
+
+
+# MAINWINDOW - MAIN
+msgid "main_saveexit"
+msgstr "Save/Exit"
+
+msgid "main_options"
+msgstr "Options"
+
+msgid "main_warrior"
+msgstr "Warrior"
+
+msgid "main_magician"
+msgstr "Magician"
+
+msgid "main_archer"
+msgstr "Archer"
+
+msgid "main_priest"
+msgstr "Priest"
+
+
+
+# DOCUMENT - ABILITY DESCRIPTION
+msgid "doc_description"
+msgstr "Description: "
+
+msgid "doc_minimum_level"
+msgstr "Minimum Level: "
+
+msgid "doc_timer"
+msgstr "Timer: "
+
+msgid "doc_timer_runtime"
+msgstr "Timer Runtime: "
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/translation/generate_mo.sh	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,8 @@
+#!/bin/bash
+
+# German
+msgfmt -o de/LC_MESSAGES/sumwars.mo de/LC_MESSAGES/sumwars.po
+
+# English
+msgfmt -o en/LC_MESSAGES/sumwars.mo en/LC_MESSAGES/sumwars.po
+
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/translation/sumwars.pot	Wed Sep 17 11:01:52 2008 +0000
@@ -0,0 +1,820 @@
+# ITEM - NAMES
+msgid "noitem"
+msgstr ""
+
+msgid "leather_armor"
+msgstr ""
+
+msgid "tiled_armor"
+msgstr ""
+
+msgid "heavy_armor"
+msgstr ""
+
+msgid "armor"
+msgstr ""
+
+msgid "steel_helmet"
+msgstr ""
+
+msgid "divine_helmet"
+msgstr ""
+
+msgid "helmet"
+msgstr ""
+
+msgid "gloves"
+msgstr ""
+
+msgid "short_sword"
+msgstr ""
+
+msgid "long_sword"
+msgstr ""
+
+msgid "wooden_bow"
+msgstr ""
+
+msgid "long_bow"
+msgstr ""
+
+msgid "burning_bow"
+msgstr ""
+
+msgid "battle_axe"
+msgstr ""
+
+msgid "holy_flail"
+msgstr ""
+
+msgid "weapon"
+msgstr ""
+
+msgid "wooden_shield"
+msgstr ""
+
+msgid "iron_shield"
+msgstr ""
+
+msgid "shield"
+msgstr ""
+
+msgid "small_heal_potion"
+msgstr ""
+
+msgid "big_heal_potion"
+msgstr ""
+
+msgid "heal_blind_potion"
+msgstr ""
+
+msgid "instant_unfreeze_potion"
+msgstr ""
+
+msgid "potion"
+msgstr ""
+
+msgid "ring"
+msgstr ""
+
+msgid "amulet"
+msgstr ""
+
+msgid "unknown"
+msgstr ""
+
+
+
+# ACTION - NAMES
+msgid "noaction"
+msgstr ""
+
+msgid "walk"
+msgstr ""
+
+msgid "attack"
+msgstr ""
+
+msgid "range_attack"
+msgstr ""
+
+msgid "magic_attack"
+msgstr ""
+
+msgid "holy_attack"
+msgstr ""
+
+msgid "bash"
+msgstr ""
+
+msgid "hammer_bash"
+msgstr ""
+
+msgid "around_blow"
+msgstr ""
+
+msgid "whirl_blow"
+msgstr ""
+
+msgid "smash"
+msgstr ""
+
+msgid "hate_mage"
+msgstr ""
+
+msgid "charge"
+msgstr ""
+
+msgid "storm_charge"
+msgstr ""
+
+msgid "decoy"
+msgstr ""
+
+msgid "scare"
+msgstr ""
+
+msgid "firesword"
+msgstr ""
+
+msgid "flamesword"
+msgstr ""
+
+msgid "flamearmor"
+msgstr ""
+
+msgid "berserk"
+msgstr ""
+
+msgid "warcry"
+msgstr ""
+
+msgid "regenerate"
+msgstr ""
+
+msgid "anger"
+msgstr ""
+
+msgid "fury"
+msgstr ""
+
+msgid "steadfast"
+msgstr ""
+
+msgid "block"
+msgstr ""
+
+msgid "weaponmaster"
+msgstr ""
+
+msgid "monster_hunter"
+msgstr ""
+
+msgid "monster_slayer"
+msgstr ""
+
+msgid "endurance"
+msgstr ""
+
+msgid "fire_bolt"
+msgstr ""
+
+msgid "fire_strike"
+msgstr ""
+
+msgid "fire_wave"
+msgstr ""
+
+msgid "fire_storm"
+msgstr ""
+
+msgid "fire_ball"
+msgstr ""
+
+msgid "inferno_ball"
+msgstr ""
+
+msgid "fire_wall"
+msgstr ""
+
+msgid "inflame"
+msgstr ""
+
+msgid "ice_bolt"
+msgstr ""
+
+msgid "ice_spike"
+msgstr ""
+
+msgid "snow_storm"
+msgstr ""
+
+msgid "blizzard"
+msgstr ""
+
+msgid "ice_ring"
+msgstr ""
+
+msgid "frost_ring"
+msgstr ""
+
+msgid "freeze"
+msgstr ""
+
+msgid "chill"
+msgstr ""
+
+msgid "lightning"
+msgstr ""
+
+msgid "lightning_strike"
+msgstr ""
+
+msgid "thunderstorm"
+msgstr ""
+
+msgid "thunderstorm2"
+msgstr ""
+
+msgid "chain_lightning"
+msgstr ""
+
+msgid "chain_lightning2"
+msgstr ""
+
+msgid "static_shield"
+msgstr ""
+
+msgid "ionisation"
+msgstr ""
+
+msgid "triple_shot"
+msgstr ""
+
+msgid "guided_triple_shot"
+msgstr ""
+
+msgid "multishot"
+msgstr ""
+
+msgid "volley_shot"
+msgstr ""
+
+msgid "pierce"
+msgstr ""
+
+msgid "weak_point"
+msgstr ""
+
+msgid "blind_rage"
+msgstr ""
+
+msgid "vacuum"
+msgstr ""
+
+msgid "death_roulette"
+msgstr ""
+
+msgid "exploding_arrow"
+msgstr ""
+
+msgid "exploding_cascade"
+msgstr ""
+
+msgid "aimed_shot"
+msgstr ""
+
+msgid "bow_spirit"
+msgstr ""
+
+msgid "ice_arrows"
+msgstr ""
+
+msgid "freezing_arrows"
+msgstr ""
+
+msgid "wind_arrows"
+msgstr ""
+
+msgid "storm_arrows"
+msgstr ""
+
+msgid "wind_walk"
+msgstr ""
+
+msgid "evade"
+msgstr ""
+
+msgid "critical_strike"
+msgstr ""
+
+msgid "concentration"
+msgstr ""
+
+msgid "mental_wall"
+msgstr ""
+
+msgid "resist_ice"
+msgstr ""
+
+msgid "resist_air"
+msgstr ""
+
+msgid "holy_light"
+msgstr ""
+
+msgid "holy_fire"
+msgstr ""
+
+msgid "burning_rage"
+msgstr ""
+
+msgid "cure_blind_mute"
+msgstr ""
+
+msgid "cure_blind_mute_party"
+msgstr ""
+
+msgid "blazing_shield"
+msgstr ""
+
+msgid "light_beam"
+msgstr ""
+
+msgid "burning_sun"
+msgstr ""
+
+msgid "break_binding"
+msgstr ""
+
+msgid "disrupt_binding"
+msgstr ""
+
+msgid "magic_shield"
+msgstr ""
+
+msgid "cure_pois_burn"
+msgstr ""
+
+msgid "cure_pois_burn_party"
+msgstr ""
+
+msgid "acid"
+msgstr ""
+
+msgid "heal"
+msgstr ""
+
+msgid "heal_party"
+msgstr ""
+
+msgid "divine_wind"
+msgstr ""
+
+msgid "divine_storm"
+msgstr ""
+
+msgid "blade_storm"
+msgstr ""
+
+msgid "cure_conf_bsrk"
+msgstr ""
+
+msgid "cure_conf_bsrk_party"
+msgstr ""
+
+msgid "hypnosis"
+msgstr ""
+
+msgid "hypnosis2"
+msgstr ""
+
+msgid "keen_mind"
+msgstr ""
+
+
+
+# ACTION - DESCRIPTIONS
+msgid "descr_noaction"
+msgstr ""
+
+msgid "descr_walk"
+msgstr ""
+
+msgid "descr_take_item"
+msgstr ""
+
+msgid "descr_attack"
+msgstr ""
+
+msgid "descr_range_attack"
+msgstr ""
+
+msgid "descr_magic_attack"
+msgstr ""
+
+msgid "descr_holy_attack"
+msgstr ""
+
+msgid "descr_bash"
+msgstr ""
+
+msgid "descr_hammer_bash"
+msgstr ""
+
+msgid "descr_around_blow"
+msgstr ""
+
+msgid "descr_whirl_blow"
+msgstr ""
+
+msgid "descr_smash"
+msgstr ""
+
+msgid "descr_hate_mage"
+msgstr ""
+
+msgid "descr_charge"
+msgstr ""
+
+msgid "descr_storm_charge"
+msgstr ""
+
+msgid "descr_decoy"
+msgstr ""
+
+msgid "descr_scare"
+msgstr ""
+
+msgid "descr_firesword"
+msgstr ""
+
+msgid "descr_flamesword"
+msgstr ""
+
+msgid "descr_flamearmor"
+msgstr ""
+
+msgid "descr_berserk"
+msgstr ""
+
+msgid "descr_warcry"
+msgstr ""
+
+msgid "descr_regenerate"
+msgstr ""
+
+msgid "descr_anger"
+msgstr ""
+
+msgid "descr_fury"
+msgstr ""
+
+msgid "descr_steadfast"
+msgstr ""
+
+msgid "descr_block"
+msgstr ""
+
+msgid "descr_weaponmaster"
+msgstr ""
+
+msgid "descr_monster_hunter"
+msgstr ""
+
+msgid "descr_monster_slayer"
+msgstr ""
+
+msgid "descr_endurance"
+msgstr ""
+
+msgid "descr_fire_bolt"
+msgstr ""
+
+msgid "descr_fire_strike"
+msgstr ""
+
+msgid "descr_fire_wave"
+msgstr ""
+
+msgid "descr_fire_storm"
+msgstr ""
+
+msgid "descr_fire_ball"
+msgstr ""
+
+msgid "descr_inferno_ball"
+msgstr ""
+
+msgid "descr_fire_wall"
+msgstr ""
+
+msgid "descr_inflame"
+msgstr ""
+
+msgid "descr_ice_bolt"
+msgstr ""
+
+msgid "descr_ice_spike"
+msgstr ""
+
+msgid "descr_snow_storm"
+msgstr ""
+
+msgid "descr_blizzard"
+msgstr ""
+
+msgid "descr_ice_ring"
+msgstr ""
+
+msgid "descr_frost_ring"
+msgstr ""
+
+msgid "descr_freeze"
+msgstr ""
+
+msgid "descr_chill"
+msgstr ""
+
+msgid "descr_lightning"
+msgstr ""
+
+msgid "descr_lightning_strike"
+msgstr ""
+
+msgid "descr_thunderstorm"
+msgstr ""
+
+msgid "descr_thunderstorm2"
+msgstr ""
+
+msgid "descr_chain_lightning"
+msgstr ""
+
+msgid "descr_chain_lightning2"
+msgstr ""
+
+msgid "descr_static_shield"
+msgstr ""
+
+msgid "descr_ionisation"
+msgstr ""
+
+msgid "descr_triple_shot"
+msgstr ""
+
+msgid "descr_guided_triple_shot"
+msgstr ""
+
+msgid "descr_multishot"
+msgstr ""
+
+msgid "descr_volley_shot"
+msgstr ""
+
+msgid "descr_pierce"
+msgstr ""
+
+msgid "descr_weak_point"
+msgstr ""
+
+msgid "descr_blind_rage"
+msgstr ""
+
+msgid "descr_vacuum"
+msgstr ""
+
+msgid "descr_death_roulette"
+msgstr ""
+
+msgid "descr_exploding_arrow"
+msgstr ""
+
+msgid "descr_exploding_cascade"
+msgstr ""
+
+msgid "descr_aimed_shot"
+msgstr ""
+
+msgid "descr_bow_spirit"
+msgstr ""
+
+msgid "descr_ice_arrows"
+msgstr ""
+
+msgid "descr_freezing_arrows"
+msgstr ""
+
+msgid "descr_wind_arrows"
+msgstr ""
+
+msgid "descr_storm_arrows"
+msgstr ""
+
+msgid "descr_wind_walk"
+msgstr ""
+
+msgid "descr_evade"
+msgstr ""
+
+msgid "descr_critical_strike"
+msgstr ""
+
+msgid "descr_concentration"
+msgstr ""
+
+msgid "descr_mental_wall"
+msgstr ""
+
+msgid "descr_resist_ice"
+msgstr ""
+
+msgid "descr_resist_air"
+msgstr ""
+
+msgid "descr_holy_light"
+msgstr ""
+
+msgid "descr_holy_fire"
+msgstr ""
+
+msgid "descr_burning_rage"
+msgstr ""
+
+msgid "descr_cure_blind_mute"
+msgstr ""
+
+msgid "descr_cure_blind_mute_party"
+msgstr ""
+
+msgid "descr_blazing_shield"
+msgstr ""
+
+msgid "descr_light_beam"
+msgstr ""
+
+msgid "descr_burning_sun"
+msgstr ""
+
+msgid "descr_break_binding"
+msgstr ""
+
+msgid "descr_disrupt_binding"
+msgstr ""
+
+msgid "descr_magic_shield"
+msgstr ""
+
+msgid "descr_cure_pois_burn"
+msgstr ""
+
+msgid "descr_cure_pois_burn_party"
+msgstr ""
+
+msgid "descr_acid"
+msgstr ""
+
+msgid "descr_heal"
+msgstr ""
+
+msgid "descr_heal_party"
+msgstr ""
+
+msgid "descr_divine_wind"
+msgstr ""
+
+msgid "descr_divine_storm"
+msgstr ""
+
+msgid "descr_blade_storm"
+msgstr ""
+
+msgid "descr_cure_conf_bsrk"
+msgstr ""
+
+msgid "descr_cure_conf_bsrk_party"
+msgstr ""
+
+msgid "descr_hypnosis"
+msgstr ""
+
+msgid "descr_hypnosis2"
+msgstr ""
+
+msgid "descr_keen_mind"
+msgstr ""
+
+
+
+# MAINWINDOW - CHARACTER
+msgid "main_power"
+msgstr ""
+
+msgid "main_dexterity"
+msgstr ""
+
+msgid "main_willpower"
+msgstr ""
+
+msgid "main_magic_power"
+msgstr ""
+
+msgid "main_credits"
+msgstr ""
+
+msgid "main_experience"
+msgstr ""
+
+msgid "main_healthpoints"
+msgstr ""
+
+msgid "main_attack"
+msgstr ""
+
+msgid "main_attacks_per_second"
+msgstr ""
+
+msgid "main_range"
+msgstr ""
+
+msgid "main_penetration_power"
+msgstr ""
+
+msgid "main_armour"
+msgstr ""
+
+msgid "main_block"
+msgstr ""
+
+msgid "main_base_damage"
+msgstr ""
+
+msgid "main_physical_resistance"
+msgstr ""
+
+msgid "main_fire_resistance"
+msgstr ""
+
+msgid "main_air_resistance"
+msgstr ""
+
+msgid "main_ice_resistance"
+msgstr ""
+
+
+
+# MAINWINDOW - SKILLTREE
+msgid "main_firemagic"
+msgstr ""
+
+msgid "main_icemagic"
+msgstr ""
+
+msgid "main_airmagic"
+msgstr ""
+
+msgid "main_lightmagic"
+msgstr ""
+
+msgid "main_watermagic"
+msgstr ""
+
+msgid "main_windmagic"
+msgstr ""
+
+
+
+# MAINWINDOW - MAIN
+msgid "main_saveexit"
+msgstr ""
+
+msgid "main_options"
+msgstr ""
+
+msgid "main_warrior"
+msgstr ""
+
+msgid "main_magician"
+msgstr ""
+
+msgid "main_archer"
+msgstr ""
+
+msgid "main_priest"
+msgstr ""
+
+
+
+# DOCUMENT - ABILITY DESCRIPTION
+msgid "doc_description"
+msgstr ""
+
+msgid "doc_minimum_level"
+msgstr ""
+
+msgid "doc_timer"
+msgstr ""
+
+msgid "doc_timer_runtime"
+msgstr ""
+