Skip to content
Browse files

added some docs, added UML diagram for main classes. added second try…

… with main engine.
  • Loading branch information...
1 parent b10473e commit c58b4101d20caf2caf5f30c4f0ad0de00468be1c Daniel (dmilith) Dettlaff committed Aug 24, 2008
Showing with 945 additions and 274 deletions.
  1. +1 −0 CleanAll
  2. +5 −4 Sconstruct
  3. +20 −1 character.cpp
  4. +6 −9 character.h
  5. +1 −1 config.h
  6. +0 −180 cppcomplete.tags
  7. +2 −1 docs/README.TXT
  8. BIN docs/multithreading_basics.pdf
  9. BIN docs/openmp.pdf
  10. +376 −0 docs/uml.umbrello
  11. +4 −0 job.cpp
  12. +1 −0 job.h
  13. +127 −75 main.cpp
  14. +6 −1 main.h
  15. +68 −0 main2.cpp
  16. +325 −0 tags
  17. +3 −2 world.h
View
1 CleanAll
@@ -1,6 +1,7 @@
echo "Cleaning up.."
scons -c
rm -f *.os
+rm -f *.o
rm -f *.so
rm -f test_*
cd tests/
View
9 Sconstruct
@@ -1,13 +1,14 @@
import os
print 'scons script written by dmilith[at]gmail[dot]com (c) 2oo8'
-release32 = Environment( CXX = 'g++ -m32 -O2 -march=athlon64' )
+release32 = Environment( CXX = 'g++ -m32 -Os -march=athlon64' )
release64 = Environment( CXX = 'g++ -O2 -march=athlon64' )
debug32 = Environment( CXX = 'g++ -m32 -O0 -ggdb -W' )
debug64 = Environment( CXX = 'g++ -O0 -ggdb -W' )
+debug_optimized = Environment( CXX = 'g++ -O2 -ggdb -W' )
-release = debug64
-#release = release64
+#release = debug64
+release = debug_optimized
release.SharedLibrary('hl-sha', [ 'hashlib/hl_sha1.cpp',
'hashlib/hl_sha1wrapper.cpp', 'hashlib/hl_sha256.cpp',
@@ -21,7 +22,7 @@ release.SharedLibrary('soul', 'soul.cpp')
release.SharedLibrary('theritory', 'theritory.cpp')
release.SharedLibrary('world', 'world.cpp')
release.SharedLibrary('job', 'job.cpp')
-release.Program('world' , 'main.cpp',
+release.Program('main' , 'main2.cpp',
LIBS=[ 'boost_thread', 'boost_filesystem', 'hl-sha', 'boost_serialization',
'job', 'character', 'coordinates',
'item', 'map', 'place', 'soul', 'theritory',
View
21 character.cpp
@@ -13,6 +13,12 @@
Ccharacter::Ccharacter( std::string new_name ) {
name = new_name; // creature name
race = human; //(0)
+ for ( int i = 0; i < 50; ++i ) {
+ items[ i ] = NULL;
+ }
+ for ( int i = 0; i < 250; ++i ) {
+ private_box[ i ] = NULL;
+ }
base_health = ( ( race * 100 ) + ( rand() % 10 ) ) + 100;
health = base_health + ( rand() % 125 ) - 75;
dead = false;
@@ -22,12 +28,18 @@ Ccharacter::Ccharacter( std::string new_name ) {
dexterity = 0;
luck = ( rand() % 21 ) - 10;
mind_strength = 0; // creature properties
-
+
} // creature properties
Ccharacter::Ccharacter( Eraces born_race, std::string new_name ) {
name = new_name;
race = born_race; //(0)
+ for ( int i = 0; i < 50; ++i ) {
+ items[ i ] = NULL;
+ }
+ for ( int i = 0; i < 250; ++i ) {
+ private_box[ i ] = NULL;
+ }
base_health = ( ( race * 100 ) + ( rand() % 10 ) ) + 100;
health = base_health + ( rand() % 125 ) - 75 ;
dead = false;
@@ -63,6 +75,13 @@ Ccharacter::Ccharacter( Eraces born_race, std::string new_name ) {
} //obiekt npc'a/ postaci gracza/ potwora
Ccharacter::~Ccharacter() {
+/* for ( int i = 0; i < 50; ++i ) {
+ items[ i ] = NULL;
+ }
+ for ( int i = 0; i < 250; ++i ) {
+ private_box[ i ] = NULL;
+ }
+ */
}
void Ccharacter::kill() {
View
15 character.h
@@ -37,8 +37,8 @@ enum Eraces {
class Ccharacter {
public:
- Ccharacter( std::string new_name = "Zbigniew Żółć" ); //domyslnie tworzony jest czlowiek
- Ccharacter( Eraces born_race, std::string new_name = "Zbigniew Żółć" ); //podajemy rase postaci
+ Ccharacter( std::string new_name = "Zbigniew Zolc" ); //domyslnie tworzony jest czlowiek
+ Ccharacter( Eraces born_race, std::string new_name = "Zbigniew Zolc" ); //podajemy rase postaci
~Ccharacter();
bool dead;
void kill();
@@ -50,18 +50,15 @@ class Ccharacter {
intelligence,
strength,
dexterity,
- instinct, // instynkt im wyzszy tym postac bardziej potrafi wyczuc jakie ma szanse z przeciwnikiem :}
mind_strength;//cechy postaci
uint64_t gold;
uint32_t age; // wiek postaci
- int32_t luck; //szczescie moze byc -
- Ccoordinates pos; //pozycja postaci w swiecie
-// Cbackpack backpack; //plecak
+ int16_t luck; //szczescie moze byc -
+ Ccoordinatese position; //pozycja postaci w swiecie
Csoul soul; // aktualna dusza :}
Eraces race;
- //std::list<Citem> items;
- Citem items[50];
- Citem private_box[250];
+ Citem* items[50];
+ Citem* private_box[250];
}; //obiekt npc'a/ postaci gracza/ potwora
#endif //_CCHARACTER_H_
View
2 config.h
@@ -12,7 +12,7 @@
#include <string>
-#define DEBUG
+//#define DEBUG
#define RUBY_LOCAL_INSTALL // if defined then we'll look for headers in /usr/local instead of /usr
// TODO: #define RUBY_EMB // if defined we'll use Ruby As Embeeded Scripting Language
View
180 cppcomplete.tags
@@ -1,180 +0,0 @@
-!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
-!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
-!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
-!_TAG_PROGRAM_NAME Exuberant Ctags //
-!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
-!_TAG_PROGRAM_VERSION 5.7 //
-BACKSLASH config.h 20;" v
-BG_BLACK config.h 66;" d
-BRIGHT config.h 67;" d
-CREALIS_VERSION version.h 5;" v
-Ccharacter character.cpp 13;" f class:Ccharacter
-Ccharacter character.cpp 28;" f class:Ccharacter
-Ccharacter character.h 38;" c
-Ccharacter character.h 40;" p class:Ccharacter access:public
-Ccharacter character.h 41;" p class:Ccharacter access:public
-Ccoordinates coordinates.cpp 12;" f class:Ccoordinates
-Ccoordinates coordinates.cpp 22;" f class:Ccoordinates
-Ccoordinates coordinates.h 18;" c
-Ccoordinates coordinates.h 20;" p class:Ccoordinates access:public
-Ccoordinates coordinates.h 21;" p class:Ccoordinates access:public
-Citem item.cpp 12;" f class:Citem
-Citem item.h 17;" c
-Citem item.h 19;" p class:Citem access:public
-Cmap map.cpp 12;" f class:Cmap
-Cmap map.cpp 17;" f class:Cmap
-Cmap map.h 16;" c
-Cmap map.h 18;" p class:Cmap access:public
-Cmap map.h 19;" p class:Cmap access:public
-Cplace place.cpp 12;" f class:Cplace
-Cplace place.cpp 16;" f class:Cplace
-Cplace place.h 17;" c
-Cplace place.h 19;" p class:Cplace access:public
-Cplace place.h 20;" p class:Cplace access:public
-Csoul soul.cpp 12;" f class:Csoul
-Csoul soul.h 26;" c
-Csoul soul.h 28;" p class:Csoul access:public
-Ctheritory theritory.cpp 14;" f class:Ctheritory
-Ctheritory theritory.h 18;" c
-Ctheritory theritory.h 20;" p class:Ctheritory access:public
-Cworld world.cpp 14;" f class:Cworld
-Cworld world.cpp 4;" f class:Cworld
-Cworld world.h 32;" c
-Cworld world.h 34;" p class:Cworld access:public
-Cworld world.h 35;" p class:Cworld access:public
-DEBUG config.h 15;" d
-DEFAULT_GRAVITY world.h 27;" v
-DEFAULT_THERITORY_X world.h 28;" v
-DEFAULT_THERITORY_Y world.h 29;" v
-ETypeOfJob job.h 23;" g
-Ealignment soul.h 15;" g
-Eraces character.h 27;" g
-Esize item.h 15;" g
-GREEN config.h 69;" d
-JOB_SAVE_PATH config.h 34;" v
-Job job.cpp 13;" f class:Job
-Job job.h 32;" c
-Job job.h 34;" p class:Job access:public
-MAGENTA config.h 70;" d
-MAIN_DIR config.h 26;" v
-MAIN_DIR config.h 30;" v
-MAX_DWARF_AGE character.h 25;" v
-MAX_ELVE_AGE character.h 24;" v
-MAX_HUMAN_AGE character.h 23;" v
-MAX_PLAYERS world.h 25;" v
-MAX_WORLDS world.h 26;" v
-RED config.h 68;" d
-RUBY_LOCAL_INSTALL config.h 16;" d
-SLASH config.h 19;" v
-SYSTEM_CLASS_VERSION version.h 6;" v
-WORLD_SAVE_PATH config.h 33;" v
-_CCHARACTER_H_ character.h 11;" d
-_CCONFIG_H_ config.h 11;" d
-_CCOORDINATES_H_ coordinates.h 11;" d
-_CITEM_H_ item.h 11;" d
-_CJOB_H_ job.h 11;" d
-_CMAP_H_ map.h 11;" d
-_CPLACE_H_ place.h 11;" d
-_CSOUL_H_ soul.h 11;" d
-_CTHERITORY_H_ theritory.h 11;" d
-_CWORLD_H_ world.h 12;" d
-_MAIN_H main.h 2;" d
-_VERSION_H_ version.h 2;" d
-_do main.cpp 108;" f
-action_ATTACK job.h 27;" e enum:ETypeOfJob
-action_DEFEND job.h 28;" e enum:ETypeOfJob
-action_IDLE job.h 24;" e enum:ETypeOfJob
-action_RUN job.h 26;" e enum:ETypeOfJob
-action_WALK job.h 25;" e enum:ETypeOfJob
-actors job.h 38;" m class:Job access:public
-add_job_to_stack main.cpp 101;" f
-age character.h 56;" m class:Ccharacter access:public
-alignment soul.h 31;" m class:Csoul access:public
-annimal character.h 28;" e enum:Eraces
-base_health character.h 48;" m class:Ccharacter access:public
-boost main.h 32;" n
-cave_troll character.h 33;" e enum:Eraces
-chaoticEvil soul.h 16;" e enum:Ealignment
-characters main.cpp 20;" v file:
-cl_version world.h 39;" m class:Cworld access:public
-dead character.h 43;" m class:Ccharacter access:public
-demoan soul.h 23;" e enum:Ealignment
-dexterity character.h 52;" m class:Ccharacter access:public
-dwarf character.h 31;" e enum:Eraces
-elve character.h 29;" e enum:Eraces
-evil soul.h 17;" e enum:Ealignment
-fileName map.h 21;" m class:Cmap access:public
-get_job_from_stack main.cpp 80;" f
-gold character.h 55;" m class:Ccharacter access:public
-good soul.h 21;" e enum:Ealignment
-gravity world.h 37;" m class:Cworld access:public
-grizzly character.h 32;" e enum:Eraces
-health character.h 49;" m class:Ccharacter access:public
-huge item.h 15;" e enum:Esize
-human character.h 30;" e enum:Eraces
-instinct character.h 53;" m class:Ccharacter access:public
-intelligence character.h 50;" m class:Ccharacter access:public
-items character.h 63;" m class:Ccharacter access:public
-job_crc job.h 35;" m class:Job access:public
-job_flags job.h 36;" m class:Job access:public
-job_id job.h 35;" m class:Job access:public
-job_list main.cpp 17;" v file:
-kill character.cpp 68;" f class:Ccharacter
-kill character.h 44;" p class:Ccharacter access:public
-large item.h 15;" e enum:Esize
-lawfulGood soul.h 22;" e enum:Ealignment
-load_job main.cpp 34;" f
-load_world main.cpp 54;" f
-luck character.h 57;" m class:Ccharacter access:public
-main main.cpp 276;" f
-mana soul.h 29;" m class:Csoul access:public
-map place.h 24;" m class:Cplace access:public
-medium item.h 15;" e enum:Esize
-mind_strength character.h 54;" m class:Ccharacter access:public
-mind_strength soul.h 30;" m class:Csoul access:public
-name character.h 46;" m class:Ccharacter access:public
-name map.h 20;" m class:Cmap access:public
-name place.h 21;" m class:Cplace access:public
-name theritory.h 21;" m class:Ctheritory access:public
-name world.h 38;" m class:Cworld access:public
-neutral soul.h 19;" e enum:Ealignment
-neutralEvil soul.h 18;" e enum:Ealignment
-neutralGood soul.h 20;" e enum:Ealignment
-outgenerous item.h 15;" e enum:Esize
-parent_positions coordinates.h 23;" m class:Ccoordinates access:public
-place theritory.h 23;" m class:Ctheritory access:public
-pos character.h 58;" m class:Ccharacter access:public
-position coordinates.h 22;" m class:Ccoordinates access:public
-pp config.h 21;" v
-print_character main.cpp 130;" f
-private_box character.h 64;" m class:Ccharacter access:public
-race character.h 61;" m class:Ccharacter access:public
-recv_signal main.cpp 64;" f
-run job.cpp 17;" f class:Job
-run job.h 39;" p class:Job access:public
-save_job main.cpp 24;" f
-save_world main.cpp 44;" f
-serialization main.h 33;" n namespace:boost
-serialize main.h 35;" f namespace:boost::serialization
-serialize main.h 43;" f namespace:boost::serialization
-serialize main.h 52;" f namespace:boost::serialization
-serialize main.h 58;" f namespace:boost::serialization
-serialize main.h 64;" f namespace:boost::serialization
-serialize main.h 72;" f namespace:boost::serialization
-size_of_item item.h 21;" m class:Citem access:public
-small item.h 15;" e enum:Esize
-soul character.h 60;" m class:Ccharacter access:public
-soul_exist soul.h 33;" m class:Csoul access:public
-strength character.h 51;" m class:Ccharacter access:public
-thread_console main.cpp 148;" f
-thread_main_loop main.cpp 242;" f
-thread_timer main.cpp 207;" f
-timer main.cpp 18;" v file:
-tiny item.h 15;" e enum:Esize
-type job.h 37;" m class:Job access:public
-weight item.h 20;" m class:Citem access:public
-worlds main.cpp 19;" v file:
-x_theritory_size world.h 36;" m class:Cworld access:public
-y_theritory_size world.h 36;" m class:Cworld access:public
-~Ccharacter character.cpp 65;" f class:Ccharacter
-~Ccharacter character.h 42;" p class:Ccharacter access:public
View
3 docs/README.TXT
@@ -1,5 +1,6 @@
project requirements:
scons
-libboost-threads
+g++ 4.2 ( with OpenMP support )
libboost-serialization
+libboost-filesystem
View
BIN docs/multithreading_basics.pdf
Binary file not shown.
View
BIN docs/openmp.pdf
Binary file not shown.
View
376 docs/uml.umbrello
@@ -0,0 +1,376 @@
+<?xml version="1.0" encoding="UTF-8"?>
+<XMI verified="false" xmi.version="1.2" timestamp="2008-08-24T12:45:36" xmlns:UML="http://schema.omg.org/spec/UML/1.3" >
+ <XMI.header>
+ <XMI.documentation>
+ <XMI.exporter>umbrello uml modeller http://uml.sf.net</XMI.exporter>
+ <XMI.exporterVersion>1.5.8</XMI.exporterVersion>
+ <XMI.exporterEncoding>UnicodeUTF8</XMI.exporterEncoding>
+ </XMI.documentation>
+ <XMI.metamodel xmi.version="1.3" href="UML.xml" xmi.name="UML" />
+ </XMI.header>
+ <XMI.content>
+ <UML:Model isSpecification="false" isAbstract="false" isLeaf="false" xmi.id="m1" isRoot="false" name="UML Model" >
+ <UML:Namespace.ownedElement>
+ <UML:Stereotype visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="folder" name="folder" />
+ <UML:Stereotype visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="datatype" name="datatype" />
+ <UML:Stereotype visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="enum" name="enum" />
+ <UML:Model stereotype="folder" visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Logical View" name="Logical View" >
+ <UML:Namespace.ownedElement>
+ <UML:Package stereotype="folder" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Datatypes" name="Datatypes" >
+ <UML:Namespace.ownedElement>
+ <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="EauX7MP7dxzu" name="int" />
+ <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="P70aG08l8Dy1" name="char" />
+ <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="zkn0IZMW9E2G" name="bool" />
+ <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="bRMCMJ4jO4Jd" name="float" />
+ <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="2POBcKAa5yaL" name="double" />
+ <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Vupd8rrhGDra" name="short" />
+ <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="UtKtxbWy1s9b" name="long" />
+ <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="AHBDFjYjbOMi" name="unsigned int" />
+ <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="DNUPF4t8Mk4y" name="unsigned short" />
+ <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="E2z49YDQkQeR" name="unsigned long" />
+ <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="zN3LjlYu80JL" name="string" />
+ <UML:DataType stereotype="datatype" visibility="public" isSpecification="false" namespace="Datatypes" isAbstract="false" isLeaf="false" elementReference="zatiU9z8LT7l" isRoot="false" xmi.id="ARFORt7aUrXh" name="Citem[]" />
+ </UML:Namespace.ownedElement>
+ </UML:Package>
+ <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="tCe2e1u8P0ch" name="Ccharacter" >
+ <UML:Classifier.feature>
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="xtBzawXAp821" type="E2z49YDQkQeR" name="health" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="i8GVFIUxK8jJ" type="E2z49YDQkQeR" name="base_health" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="Go2jcUQI52pp" type="G56YHg2flODS" name="race" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="5UW5B8acOdeD" type="AHBDFjYjbOMi" name="inteligence" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="pdNhMwHMQiZ6" type="AHBDFjYjbOMi" name="strength" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="dtDjTn84PJUd" type="AHBDFjYjbOMi" name="dexterity" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="PXeIMHf2dcJz" type="AHBDFjYjbOMi" name="mind_strength" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="1W5pWgijP9WV" type="UtKtxbWy1s9b" name="gold" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="pfXE22sKP9xR" type="DNUPF4t8Mk4y" name="age" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="XihYkEbZkHHR" type="Vupd8rrhGDra" name="luck" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="8bmzFJX4Rfcq" type="4YkJy1ztGeMJ" name="items" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="84mZhMPfwGNO" type="4YkJy1ztGeMJ" name="private_box" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="u1d8u9dYFuaK" type="zkn0IZMW9E2G" name="dead" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="trPQi3K1Yfkz" type="0cBO9TiucYtf" name="position" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="3N2oXPv5SVzz" type="k91L3LzJfBBj" name="soul" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="6u6DSAjMtzDM" type="zN3LjlYu80JL" name="name" />
+ <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="I7WsaR7Ph2AE" name="kill" />
+ </UML:Classifier.feature>
+ </UML:Class>
+ <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Vi80vQUsjbc0" name="Erace" />
+ <UML:Enumeration stereotype="enum" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="G56YHg2flODS" name="Eraces" >
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="G56YHg2flODS" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ZY1m0q16JgjR" name="annimal = -5" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="G56YHg2flODS" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="nHRyPpkRxA0e" name="elve = 10" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="G56YHg2flODS" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="NOpJ5ZTspvqE" name="human = 15" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="G56YHg2flODS" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="RKOkJQ6hDPnn" name="dwarf = 20" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="G56YHg2flODS" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="27x9mha56JOU" name="grizzly = 50" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="G56YHg2flODS" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="XWf9x2CPoAgJ" name="golem = 80" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="G56YHg2flODS" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="nvHqdQ9fW6mG" name="cave_troll = 125" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="G56YHg2flODS" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="SMzmMu4zqebW" name="red_dragon = 200" />
+ </UML:Enumeration>
+ <UML:Dependency visibility="public" isSpecification="false" namespace="Logical View" supplier="G56YHg2flODS" xmi.id="fUO1hRDWCiMj" client="tCe2e1u8P0ch" name="" />
+ <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="0cBO9TiucYtf" name="Ccoordinates" >
+ <UML:Classifier.feature>
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="DENwlpxs8QGb" type="zN3LjlYu80JL" name="parent_positions[]" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="Sciyq56NB34p" type="zN3LjlYu80JL" name="position" />
+ </UML:Classifier.feature>
+ </UML:Class>
+ <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="k91L3LzJfBBj" name="Csoul" >
+ <UML:Classifier.feature>
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="uWyq0UZymwkn" type="E2z49YDQkQeR" name="mana" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="BlLOepKUoo1m" type="EauX7MP7dxzu" name="mind_strength" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="ZcDcRm9d3KTw" type="MhkOSNApyEbI" name="alignment" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="Hk0bEuopaKow" type="zkn0IZMW9E2G" name="soul_exist" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="XXNfKFXWidVM" type="zN3LjlYu80JL" name="name" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="faklhwVMsCIf" type="JSrn4FxrF26n" name="spells[]" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="bWMnMSCjoMGA" type="0cBO9TiucYtf" name="position" />
+ </UML:Classifier.feature>
+ </UML:Class>
+ <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="4YkJy1ztGeMJ" name="Citem" >
+ <UML:Classifier.feature>
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="2k2RkWVx8h3z" type="UtKtxbWy1s9b" name="weight" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="21wO7KOIdvc3" type="C5NImQHPYgAi" name="size_of_item" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="e8GE97SYgeD1" type="AHBDFjYjbOMi" name="amount" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="20WSbZyRpbNZ" type="zN3LjlYu80JL" name="name" />
+ </UML:Classifier.feature>
+ </UML:Class>
+ <UML:Enumeration stereotype="enum" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="MhkOSNApyEbI" name="Ealignment" >
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="MhkOSNApyEbI" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="mDqx3eA4TBye" name="chaoticEvil = -3" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="MhkOSNApyEbI" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="BELZ9yLKmINQ" name="evil" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="MhkOSNApyEbI" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="7fZNNImWW65d" name="neutralEvil" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="MhkOSNApyEbI" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ckYZrMpyzMLN" name="neutral" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="MhkOSNApyEbI" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="zI2gNgixOEWF" name="neutralGood" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="MhkOSNApyEbI" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="gA1zt5xqM0Wj" name="good" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="MhkOSNApyEbI" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="zQNcBnOrxPpo" name="lawfulGood" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="MhkOSNApyEbI" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Ngmq9Ju6kFjt" name="demoan" />
+ </UML:Enumeration>
+ <UML:Enumeration stereotype="enum" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="C5NImQHPYgAi" name="Esize" >
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="C5NImQHPYgAi" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Y2UI5VaGVWcA" name="tiny = 0" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="C5NImQHPYgAi" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Pxsi9JPgKrwN" name="small = 2" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="C5NImQHPYgAi" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="q6mIVL7uIxaP" name="medium = 5" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="C5NImQHPYgAi" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ixZR9dnxjXFD" name="large = 10" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="C5NImQHPYgAi" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Xyb0TYSBT1ac" name="outgenerous 30" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="C5NImQHPYgAi" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="JKourqMMovNF" name="huge = 50" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="C5NImQHPYgAi" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="qLutyiDH01Cs" name="infinite = 100" />
+ </UML:Enumeration>
+ <UML:Enumeration stereotype="enum" visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="sJSQ0uZ8hFV5" name="EJobType" >
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="sJSQ0uZ8hFV5" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="l0Q37l43c7XJ" name="action_IDLE" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="sJSQ0uZ8hFV5" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ZHtj3r74zs72" name="action_WALK" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="sJSQ0uZ8hFV5" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Scx57Q7gh0Ni" name="action_RUN" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="sJSQ0uZ8hFV5" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="OSOdVtiwWf1d" name="action_ATTACK" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="sJSQ0uZ8hFV5" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="2X84ufVG7rtb" name="action_GET" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="sJSQ0uZ8hFV5" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="gTZkfH6foFji" name="action_PUT" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="sJSQ0uZ8hFV5" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Zs09w2pdVNL8" name="action_TALK" />
+ <UML:EnumerationLiteral visibility="public" isSpecification="false" namespace="sJSQ0uZ8hFV5" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="x1WN2X3aP1jJ" name="action_INVENTORY" />
+ </UML:Enumeration>
+ <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="ZBCH8BoTCJXm" name="CJob" >
+ <UML:Classifier.feature>
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="cIWbsVTzPbio" type="sJSQ0uZ8hFV5" name="type" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="XEl9uZUkkrZP" type="tCe2e1u8P0ch" name="actors[]" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="2OmGnnZXEJAj" type="zN3LjlYu80JL" name="job_id" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="VurcBTSDurbH" type="zN3LjlYu80JL" name="job_crc" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="pc9Gjl58jU1M" type="UtKtxbWy1s9b" name="job_flags" />
+ <UML:Operation visibility="public" isSpecification="false" isQuery="false" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Ab0gTrIfIkqC" name="run" />
+ </UML:Classifier.feature>
+ </UML:Class>
+ <UML:Class visibility="public" isSpecification="false" namespace="Logical View" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="JSrn4FxrF26n" name="Cmagic" >
+ <UML:Classifier.feature>
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="IKoI26FHcYmy" type="zN3LjlYu80JL" name="spell_name" />
+ <UML:Attribute visibility="private" isSpecification="false" xmi.id="ItqGeOCUfPmk" type="UtKtxbWy1s9b" name="mana_cost" />
+ </UML:Classifier.feature>
+ </UML:Class>
+ </UML:Namespace.ownedElement>
+ <XMI.extension xmi.extender="umbrello" >
+ <diagrams>
+ <diagram showopsig="1" linecolor="#ff0000" snapx="10" showattribassocs="1" snapy="10" linewidth="0" showattsig="1" showpackage="1" showstereotype="1" name="class diagram" font="DejaVu Sans,9,-1,0,50,0,0,0,0,0" canvasheight="730" canvaswidth="963" localid="" snapcsgrid="0" showgrid="1" showops="1" usefillcolor="1" fillcolor="#ffff00" zoom="100" xmi.id="r0GYrJUA6CB2" documentation="" showscope="1" snapgrid="1" showatts="1" type="1" >
+ <widgets>
+ <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="1" x="290" showattsigs="601" showstereotype="1" y="180" showattributes="1" font="DejaVu Sans,9,-1,0,75,0,0,0,0,0" width="198" isinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="tCe2e1u8P0ch" showscope="1" height="288" showopsigs="601" />
+ <enumwidget width="124" showstereotype="1" x="590" y="30" usesdiagramusefillcolor="0" usesdiagramfillcolor="0" isinstance="0" fillcolor="#ffff00" height="176" linecolor="#ff0000" xmi.id="G56YHg2flODS" showpackage="1" usefillcolor="1" linewidth="none" font="DejaVu Sans,9,-1,0,75,1,0,0,0,0" />
+ <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="1" x="10" showattsigs="601" showstereotype="1" y="500" showattributes="1" font="DejaVu Sans,9,-1,5,75,0,0,0,0,0" width="181" isinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="0cBO9TiucYtf" showscope="1" height="56" showopsigs="601" />
+ <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="1" x="319" showattsigs="601" showstereotype="1" y="523" showattributes="1" font="DejaVu Sans,9,-1,5,75,0,0,0,0,0" width="163" isinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="k91L3LzJfBBj" showscope="1" height="136" showopsigs="601" />
+ <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="1" x="140" showattsigs="601" showstereotype="1" y="30" showattributes="1" font="DejaVu Sans,9,-1,0,75,0,0,0,0,0" width="156" isinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="4YkJy1ztGeMJ" showscope="1" height="88" showopsigs="601" />
+ <enumwidget width="106" showstereotype="1" x="600" y="460" usesdiagramusefillcolor="0" usesdiagramfillcolor="0" isinstance="0" fillcolor="#ffff00" height="160" linecolor="#ff0000" xmi.id="MhkOSNApyEbI" showpackage="1" usefillcolor="1" linewidth="none" font="DejaVu Sans,9,-1,0,75,1,0,0,0,0" />
+ <enumwidget width="111" showstereotype="1" x="43" y="202" usesdiagramusefillcolor="0" usesdiagramfillcolor="0" isinstance="0" fillcolor="#ffff00" height="144" linecolor="#ff0000" xmi.id="C5NImQHPYgAi" showpackage="1" usefillcolor="1" linewidth="none" font="DejaVu Sans,9,-1,0,75,1,0,0,0,0" />
+ <enumwidget width="122" showstereotype="1" x="830" y="30" usesdiagramusefillcolor="0" usesdiagramfillcolor="0" isinstance="0" fillcolor="#ffff00" height="160" linecolor="#ff0000" xmi.id="sJSQ0uZ8hFV5" showpackage="1" usefillcolor="1" linewidth="none" font="DejaVu Sans,9,-1,0,75,1,0,0,0,0" />
+ <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="1" x="810" showattsigs="601" showstereotype="1" y="310" showattributes="1" font="DejaVu Sans,9,-1,5,75,0,0,0,0,0" width="149" isinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="ZBCH8BoTCJXm" showscope="1" height="112" showopsigs="601" />
+ <classwidget linecolor="#ff0000" usesdiagramfillcolor="0" linewidth="none" showoperations="1" usesdiagramusefillcolor="0" showpubliconly="0" showpackage="1" x="560" showattsigs="601" showstereotype="1" y="670" showattributes="1" font="DejaVu Sans,9,-1,5,75,0,0,0,0,0" width="136" isinstance="0" usefillcolor="1" fillcolor="#ffff00" xmi.id="JSrn4FxrF26n" showscope="1" height="56" showopsigs="601" />
+ </widgets>
+ <messages/>
+ <associations>
+ <assocwidget indexa="1" indexb="1" visibilityA="0" widgetaid="tCe2e1u8P0ch" visibilityB="0" linecolor="none" changeabilityA="900" totalcounta="3" xmi.id="Go2jcUQI52pp" changeabilityB="900" widgetbid="G56YHg2flODS" totalcountb="2" type="510" linewidth="none" >
+ <linepath>
+ <startpoint startx="490" starty="190" />
+ <endpoint endx="590" endy="190" />
+ <point x="530" y="190" />
+ </linepath>
+ <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="552" showstereotype="1" y="192" text="race" font="DejaVu Sans,9,-1,0,50,0,0,0,0,0" pretext="-" role="710" width="40" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="Y2TRNtiUVyQG" height="20" />
+ </assocwidget>
+ <assocwidget indexa="1" indexb="1" visibilityA="0" widgetaid="tCe2e1u8P0ch" visibilityB="0" linecolor="none" changeabilityA="900" totalcounta="2" xmi.id="trPQi3K1Yfkz" changeabilityB="900" widgetbid="0cBO9TiucYtf" totalcountb="2" type="510" linewidth="none" >
+ <linepath>
+ <startpoint startx="290" starty="470" />
+ <endpoint endx="190" endy="500" />
+ </linepath>
+ <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="196" showstereotype="1" y="478" text="position" font="DejaVu Sans,9,-1,0,50,0,0,0,0,0" pretext="-" role="710" width="62" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="6RrQcnDWcdwK" height="20" />
+ </assocwidget>
+ <assocwidget indexa="1" indexb="1" visibilityA="0" widgetaid="tCe2e1u8P0ch" visibilityB="0" linecolor="none" changeabilityA="900" totalcounta="2" xmi.id="3N2oXPv5SVzz" changeabilityB="900" widgetbid="k91L3LzJfBBj" totalcountb="2" type="510" linewidth="none" >
+ <linepath>
+ <startpoint startx="450" starty="470" />
+ <endpoint endx="450" endy="520" />
+ </linepath>
+ <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="414" showstereotype="1" y="498" text="soul" font="DejaVu Sans,9,-1,0,50,0,0,0,0,0" pretext="-" role="710" width="38" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="Vu0UjNpmkrYF" height="20" />
+ </assocwidget>
+ <assocwidget indexa="2" indexb="1" visibilityA="0" widgetaid="tCe2e1u8P0ch" visibilityB="0" linecolor="none" changeabilityA="900" totalcounta="3" xmi.id="84mZhMPfwGNO" changeabilityB="900" widgetbid="4YkJy1ztGeMJ" totalcountb="2" type="510" linewidth="none" >
+ <linepath>
+ <startpoint startx="410" starty="180" />
+ <endpoint endx="300" endy="60" />
+ <point x="410" y="60" />
+ </linepath>
+ <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="300" showstereotype="1" y="62" text="private_box" font="DejaVu Sans,9,-1,0,50,0,0,0,0,0" pretext="-" role="710" width="83" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="2vFPNotv8P4F" height="20" />
+ </assocwidget>
+ <assocwidget indexa="1" indexb="2" visibilityA="0" widgetaid="tCe2e1u8P0ch" visibilityB="0" linecolor="none" changeabilityA="900" totalcounta="3" xmi.id="8bmzFJX4Rfcq" changeabilityB="900" widgetbid="4YkJy1ztGeMJ" totalcountb="3" type="510" linewidth="none" >
+ <linepath>
+ <startpoint startx="290" starty="180" />
+ <endpoint endx="290" endy="120" />
+ </linepath>
+ <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="242" showstereotype="1" y="122" text="items" font="DejaVu Sans,9,-1,0,50,0,0,0,0,0" pretext="-" role="710" width="46" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="B2qvJNIg502V" height="20" />
+ </assocwidget>
+ <assocwidget indexa="1" indexb="1" visibilityA="0" widgetaid="k91L3LzJfBBj" visibilityB="0" linecolor="none" changeabilityA="900" totalcounta="3" xmi.id="ZcDcRm9d3KTw" changeabilityB="900" widgetbid="MhkOSNApyEbI" totalcountb="2" type="510" linewidth="none" >
+ <linepath>
+ <startpoint startx="480" starty="570" />
+ <endpoint endx="600" endy="570" />
+ </linepath>
+ <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="528" showstereotype="1" y="572" text="alignment" font="DejaVu Sans,9,-1,0,50,0,0,0,0,0" pretext="-" role="710" width="74" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="tfmO07xZiBA9" height="20" />
+ </assocwidget>
+ <assocwidget indexa="1" indexb="1" visibilityA="0" widgetaid="4YkJy1ztGeMJ" visibilityB="0" linecolor="none" changeabilityA="900" totalcounta="3" xmi.id="21wO7KOIdvc3" changeabilityB="900" widgetbid="C5NImQHPYgAi" totalcountb="2" type="510" linewidth="none" >
+ <linepath>
+ <startpoint startx="150" starty="120" />
+ <endpoint endx="150" endy="200" />
+ </linepath>
+ <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="62" showstereotype="1" y="178" text="size_of_item" font="DejaVu Sans,9,-1,0,50,0,0,0,0,0" pretext="-" role="710" width="86" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="teCpaGIcFCyM" height="20" />
+ </assocwidget>
+ <assocwidget indexa="1" indexb="1" visibilityA="0" widgetaid="ZBCH8BoTCJXm" visibilityB="0" linecolor="none" changeabilityA="900" totalcounta="2" xmi.id="cIWbsVTzPbio" changeabilityB="900" widgetbid="sJSQ0uZ8hFV5" totalcountb="2" type="510" linewidth="none" >
+ <linepath>
+ <startpoint startx="830" starty="310" />
+ <endpoint endx="830" endy="190" />
+ </linepath>
+ <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="790" showstereotype="1" y="190" text="type" font="DejaVu Sans,9,-1,0,50,0,0,0,0,0" pretext="-" role="710" width="39" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="6uONq8OSQs4H" height="20" />
+ </assocwidget>
+ <assocwidget indexa="1" indexb="2" visibilityA="0" widgetaid="ZBCH8BoTCJXm" visibilityB="0" linecolor="none" changeabilityA="900" totalcounta="2" xmi.id="XEl9uZUkkrZP" changeabilityB="900" widgetbid="tCe2e1u8P0ch" totalcountb="3" type="510" linewidth="none" >
+ <linepath>
+ <startpoint startx="810" starty="370" />
+ <endpoint endx="490" endy="370" />
+ </linepath>
+ <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="490" showstereotype="1" y="370" text="actors[]" font="DejaVu Sans,9,-1,0,50,0,0,0,0,0" pretext="-" role="710" width="62" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="102Fl97Jcr1T" height="20" />
+ </assocwidget>
+ <assocwidget indexa="2" indexb="1" visibilityA="0" widgetaid="k91L3LzJfBBj" visibilityB="0" linecolor="none" changeabilityA="900" totalcounta="3" xmi.id="faklhwVMsCIf" changeabilityB="900" widgetbid="JSrn4FxrF26n" totalcountb="2" type="510" linewidth="none" >
+ <linepath>
+ <startpoint startx="480" starty="660" />
+ <endpoint endx="560" endy="670" />
+ </linepath>
+ <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="500" showstereotype="1" y="650" text="spells[]" font="DejaVu Sans,9,-1,0,50,0,0,0,0,0" pretext="-" role="710" width="58" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="k0WgdCUGnE1U" height="20" />
+ </assocwidget>
+ <assocwidget indexa="1" indexb="1" visibilityA="0" widgetaid="k91L3LzJfBBj" visibilityB="0" linecolor="none" changeabilityA="900" totalcounta="2" xmi.id="bWMnMSCjoMGA" changeabilityB="900" widgetbid="0cBO9TiucYtf" totalcountb="2" type="510" linewidth="none" >
+ <linepath>
+ <startpoint startx="320" starty="530" />
+ <endpoint endx="190" endy="530" />
+ </linepath>
+ <floatingtext linecolor="none" usesdiagramfillcolor="1" linewidth="none" usesdiagramusefillcolor="1" x="190" showstereotype="1" y="530" text="position" font="DejaVu Sans,9,-1,0,50,0,0,0,0,0" pretext="-" role="710" width="62" isinstance="0" posttext="" usefillcolor="1" fillcolor="none" xmi.id="petc0Lnh87xI" height="20" />
+ </assocwidget>
+ </associations>
+ </diagram>
+ </diagrams>
+ </XMI.extension>
+ </UML:Model>
+ <UML:Model stereotype="folder" visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Use Case View" name="Use Case View" >
+ <UML:Namespace.ownedElement/>
+ </UML:Model>
+ <UML:Model stereotype="folder" visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Component View" name="Component View" >
+ <UML:Namespace.ownedElement/>
+ </UML:Model>
+ <UML:Model stereotype="folder" visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Deployment View" name="Deployment View" >
+ <UML:Namespace.ownedElement/>
+ </UML:Model>
+ <UML:Model stereotype="folder" visibility="public" isSpecification="false" namespace="m1" isAbstract="false" isLeaf="false" isRoot="false" xmi.id="Entity Relationship Model" name="Entity Relationship Model" >
+ <UML:Namespace.ownedElement/>
+ </UML:Model>
+ </UML:Namespace.ownedElement>
+ </UML:Model>
+ </XMI.content>
+ <XMI.extensions xmi.extender="umbrello" >
+ <docsettings viewid="r0GYrJUA6CB2" uniqueid="petc0Lnh87xI" documentation="" />
+ <listview>
+ <listitem open="1" type="800" label="Views" >
+ <listitem open="1" type="801" id="Logical View" >
+ <listitem open="0" type="807" id="r0GYrJUA6CB2" label="class diagram" />
+ <listitem open="1" type="813" id="ZBCH8BoTCJXm" >
+ <listitem open="0" type="814" id="cIWbsVTzPbio" />
+ <listitem open="0" type="814" id="XEl9uZUkkrZP" />
+ <listitem open="0" type="814" id="2OmGnnZXEJAj" />
+ <listitem open="0" type="814" id="VurcBTSDurbH" />
+ <listitem open="0" type="814" id="pc9Gjl58jU1M" />
+ <listitem open="0" type="815" id="Ab0gTrIfIkqC" />
+ </listitem>
+ <listitem open="1" type="813" id="tCe2e1u8P0ch" >
+ <listitem open="0" type="814" id="xtBzawXAp821" />
+ <listitem open="0" type="814" id="i8GVFIUxK8jJ" />
+ <listitem open="0" type="814" id="Go2jcUQI52pp" />
+ <listitem open="0" type="814" id="5UW5B8acOdeD" />
+ <listitem open="0" type="814" id="pdNhMwHMQiZ6" />
+ <listitem open="0" type="814" id="dtDjTn84PJUd" />
+ <listitem open="0" type="814" id="PXeIMHf2dcJz" />
+ <listitem open="0" type="814" id="1W5pWgijP9WV" />
+ <listitem open="0" type="814" id="pfXE22sKP9xR" />
+ <listitem open="0" type="814" id="XihYkEbZkHHR" />
+ <listitem open="0" type="814" id="8bmzFJX4Rfcq" />
+ <listitem open="0" type="814" id="84mZhMPfwGNO" />
+ <listitem open="0" type="814" id="u1d8u9dYFuaK" />
+ <listitem open="0" type="814" id="trPQi3K1Yfkz" />
+ <listitem open="0" type="814" id="3N2oXPv5SVzz" />
+ <listitem open="0" type="814" id="6u6DSAjMtzDM" />
+ <listitem open="0" type="815" id="I7WsaR7Ph2AE" />
+ </listitem>
+ <listitem open="1" type="813" id="0cBO9TiucYtf" >
+ <listitem open="0" type="814" id="DENwlpxs8QGb" />
+ <listitem open="0" type="814" id="Sciyq56NB34p" />
+ </listitem>
+ <listitem open="1" type="813" id="4YkJy1ztGeMJ" >
+ <listitem open="0" type="814" id="2k2RkWVx8h3z" />
+ <listitem open="0" type="814" id="21wO7KOIdvc3" />
+ <listitem open="0" type="814" id="e8GE97SYgeD1" />
+ <listitem open="0" type="814" id="20WSbZyRpbNZ" />
+ </listitem>
+ <listitem open="1" type="813" id="JSrn4FxrF26n" >
+ <listitem open="0" type="814" id="IKoI26FHcYmy" />
+ <listitem open="0" type="814" id="ItqGeOCUfPmk" />
+ </listitem>
+ <listitem open="1" type="813" id="k91L3LzJfBBj" >
+ <listitem open="0" type="814" id="uWyq0UZymwkn" />
+ <listitem open="0" type="814" id="BlLOepKUoo1m" />
+ <listitem open="0" type="814" id="ZcDcRm9d3KTw" />
+ <listitem open="0" type="814" id="Hk0bEuopaKow" />
+ <listitem open="0" type="814" id="XXNfKFXWidVM" />
+ <listitem open="0" type="814" id="faklhwVMsCIf" />
+ <listitem open="0" type="814" id="bWMnMSCjoMGA" />
+ </listitem>
+ <listitem open="1" type="813" id="Vi80vQUsjbc0" />
+ <listitem open="1" type="830" id="Datatypes" >
+ <listitem open="1" type="829" id="ARFORt7aUrXh" />
+ <listitem open="1" type="829" id="zkn0IZMW9E2G" />
+ <listitem open="1" type="829" id="P70aG08l8Dy1" />
+ <listitem open="1" type="829" id="2POBcKAa5yaL" />
+ <listitem open="1" type="829" id="bRMCMJ4jO4Jd" />
+ <listitem open="1" type="829" id="EauX7MP7dxzu" />
+ <listitem open="1" type="829" id="UtKtxbWy1s9b" />
+ <listitem open="1" type="829" id="Vupd8rrhGDra" />
+ <listitem open="1" type="829" id="zN3LjlYu80JL" />
+ <listitem open="1" type="829" id="AHBDFjYjbOMi" />
+ <listitem open="1" type="829" id="E2z49YDQkQeR" />
+ <listitem open="1" type="829" id="DNUPF4t8Mk4y" />
+ </listitem>
+ <listitem open="1" type="831" id="sJSQ0uZ8hFV5" >
+ <listitem open="0" type="839" id="l0Q37l43c7XJ" />
+ <listitem open="0" type="839" id="ZHtj3r74zs72" />
+ <listitem open="0" type="839" id="Scx57Q7gh0Ni" />
+ <listitem open="0" type="839" id="OSOdVtiwWf1d" />
+ <listitem open="0" type="839" id="2X84ufVG7rtb" />
+ <listitem open="0" type="839" id="gTZkfH6foFji" />
+ <listitem open="0" type="839" id="Zs09w2pdVNL8" />
+ <listitem open="0" type="839" id="x1WN2X3aP1jJ" />
+ </listitem>
+ <listitem open="1" type="831" id="MhkOSNApyEbI" >
+ <listitem open="0" type="839" id="mDqx3eA4TBye" />
+ <listitem open="0" type="839" id="BELZ9yLKmINQ" />
+ <listitem open="0" type="839" id="7fZNNImWW65d" />
+ <listitem open="0" type="839" id="ckYZrMpyzMLN" />
+ <listitem open="0" type="839" id="zI2gNgixOEWF" />
+ <listitem open="0" type="839" id="gA1zt5xqM0Wj" />
+ <listitem open="0" type="839" id="zQNcBnOrxPpo" />
+ <listitem open="0" type="839" id="Ngmq9Ju6kFjt" />
+ </listitem>
+ <listitem open="1" type="831" id="G56YHg2flODS" >
+ <listitem open="0" type="839" id="ZY1m0q16JgjR" />
+ <listitem open="0" type="839" id="nHRyPpkRxA0e" />
+ <listitem open="0" type="839" id="NOpJ5ZTspvqE" />
+ <listitem open="0" type="839" id="RKOkJQ6hDPnn" />
+ <listitem open="0" type="839" id="27x9mha56JOU" />
+ <listitem open="0" type="839" id="XWf9x2CPoAgJ" />
+ <listitem open="0" type="839" id="nvHqdQ9fW6mG" />
+ <listitem open="0" type="839" id="SMzmMu4zqebW" />
+ </listitem>
+ <listitem open="1" type="831" id="C5NImQHPYgAi" >
+ <listitem open="0" type="839" id="Y2UI5VaGVWcA" />
+ <listitem open="0" type="839" id="Pxsi9JPgKrwN" />
+ <listitem open="0" type="839" id="q6mIVL7uIxaP" />
+ <listitem open="0" type="839" id="ixZR9dnxjXFD" />
+ <listitem open="0" type="839" id="Xyb0TYSBT1ac" />
+ <listitem open="0" type="839" id="JKourqMMovNF" />
+ <listitem open="0" type="839" id="qLutyiDH01Cs" />
+ </listitem>
+ </listitem>
+ <listitem open="1" type="802" id="Use Case View" />
+ <listitem open="1" type="821" id="Component View" />
+ <listitem open="1" type="827" id="Deployment View" />
+ <listitem open="1" type="836" id="Entity Relationship Model" />
+ </listitem>
+ </listview>
+ <codegeneration>
+ <codegenerator language="C++" />
+ </codegeneration>
+ </XMI.extensions>
+</XMI>
View
4 job.cpp
@@ -17,6 +17,10 @@ Job::Job() {
}
+Job::~Job() {
+ actors[ 0 ] = NULL;
+ actors[ 1 ] = NULL;
+}
void Job::run() {
#ifdef DEBUG
View
1 job.h
@@ -32,6 +32,7 @@ enum ETypeOfJob {
class Job {
public:
Job();
+ ~Job();
std::string job_id, job_crc; // sha1? -not yet implemented
uint32_t job_flags; // specified flags for non-standard types of jobs -not yet implemented
ETypeOfJob type;
View
202 main.cpp
@@ -8,7 +8,6 @@
*/
#include "main.h"
-
//removing from stack
//std::vector<Job>::iterator rm = job_list.end();
//job_list.erase( rm );
@@ -21,6 +20,12 @@ static uint64_t worlds_online;
static Cworld* worlds[ MAX_WORLDS ]; // world.h
static Ccharacter* characters[ MAX_PLAYERS ]; // world.h
+void
+init_structures() {
+ for ( uint32_t i = 0; i < MAX_WORLDS; i++ ) worlds[ i ] = NULL;
+ for ( uint32_t i = 0; i < MAX_PLAYERS; i++ ) characters[ i ] = NULL;
+}
+
// save data to archive
void
save_job( Job job, std::string filename ) {
@@ -54,11 +59,11 @@ save_world( Cworld world, std::string filename ) {
// load data from archive
void
load_world( Cworld world, std::string filename ) {
- // create and open an archive for input
- std::ifstream ifs( filename.c_str() );
- boost::archive::binary_iarchive ia( ifs, 1 );
- // read class state from archive
- ia >> world;
+ // create and open an archive for input
+ std::ifstream ifs( filename.c_str() );
+ boost::archive::binary_iarchive ia( ifs, 1 );
+ // read class state from archive
+ ia >> world;
}
@@ -105,10 +110,10 @@ add_job_to_stack( Job job ) {
// perform one job
void
_do( ETypeOfJob action_to_perform, Ccharacter *c1, Ccharacter *c2 = NULL ) {
- Job *action = new Job();
- action->job_flags = 0;
- action->job_id = generate_sha1( true ); // should be identifier. maybe sha1?
- action->type = action_to_perform;
+ Job action;
+ action.job_flags = 0;
+ action.job_id = generate_sha1( true ); // should be identifier. maybe sha1?
+ action.type = action_to_perform;
if ( c1 == NULL ) {
#ifdef DEBUG
std::cout << "\nCatched on trying perform a job without c1! ";
@@ -117,12 +122,11 @@ _do( ETypeOfJob action_to_perform, Ccharacter *c1, Ccharacter *c2 = NULL ) {
#endif
return;
}
- action->actors[ 0 ] = c1;
+ action.actors[ 0 ] = c1;
if ( c2 != NULL ) {
- action->actors[ 1 ] = c2;
+ action.actors[ 1 ] = c2;
}
- add_job_to_stack( *action );
- delete action;
+ add_job_to_stack( action );
}
const std::string&
@@ -151,6 +155,7 @@ thread_console() {
#endif
char command = '-';
char command_s[128]; // = new std::string();
+
#ifdef DEBUG
std::cout << "Console Ready!" << std::endl;
std::cout.flush();
@@ -160,8 +165,6 @@ thread_console() {
std::cout.flush();
std::cin.getline( command_s, 128 );
std::string command_str( command_s );
-#ifdef DEBUG
-#endif
command = '0';
if ( command_str == "s") command = '0';
if ( command_str == "i") command = 'i';
@@ -177,13 +180,29 @@ thread_console() {
case '0':
break;
case 'i':
- _do( action_IDLE, characters[ 0 ] );
+ for ( int i = 0; i < 50000; i++ ) {
+ _do( action_IDLE, characters[ 0 ] );
+#pragma omp flush( worlds, characters, job_list, timer, characters_online, worlds_online )
+ }
std::cout << "Done IDLE: " << std::endl;
std::cout << print_character( characters[ 0 ] );
std::cout.flush();
break;
case '1':
- _do( action_ATTACK, characters[ 0 ], characters[ 1 ] );
+#ifndef DEBUG
+ std::cout << std::endl << std::time( 0 );
+#endif
+ //characters[ 1 ]->health = 400000000000;
+ // for ( int i = 0; i < 20000; i++ ) {
+ for ( int i = 0; i < 20000; i++ ) {
+ _do( action_ATTACK, characters[ 0 ], characters[ 1 ] );//, characters[ 1 ] );
+#pragma omp flush( worlds, characters, job_list, timer, characters_online, worlds_online )
+ }
+ // }
+#ifndef DEBUG
+ std::cout << std::endl << std::time( 0 );
+#endif
+ // _do( action_ATTACK, characters[ 0 ], characters[ 1 ] );
std::cout << "Done ATTACK: " << std::endl;
std::cout << print_character( characters[ 0 ] ) << print_character( characters[ 1 ] );
std::cout.flush();
@@ -250,7 +269,7 @@ void thread_main_loop() {
std::cout.flush();
#endif
boost::xtime_get( &xt, boost::TIME_UTC );
- xt.nsec += 5000;
+ xt.nsec += 50;
#ifdef DEBUG
xt.nsec += 200000000;
#endif
@@ -271,88 +290,121 @@ setup_dirs() {
/*
* server
*/
-int main( int argc, char* argv[] ) {
+int
+main( int argc, char* argv[] ) {
+
signal( SIGINT, recv_signal );
signal( SIGTERM, recv_signal );
+
+ //init_structures(); // NULLify all dynamic structures
// creating worlds
- //adding new worlds to worlds array
// TODO: make it on vector
worlds[ 0 ] = new Cworld( "Umbra", 255, 255, 0 );
worlds[ 1 ] = new Cworld( "Crealis", 20, 80, 50 );
worlds_online = 2;
- if ( boost::filesystem::exists( WORLD_SAVE_PATH ) ) {
+ if ( boost::filesystem::exists( WORLD_SAVE_PATH ) ) {
load_world( *worlds[0], WORLD_SAVE_PATH + "umbra.world" );
load_world( *worlds[1], WORLD_SAVE_PATH + "crealis.world" );
}
-
+
characters[ 0 ] = new Ccharacter( human, "Marys" );
characters[ 1 ] = new Ccharacter( elve, "Gabriel" );
characters[ 2 ] = new Ccharacter( dwarf, "Mirmil" );
characters[ 3 ] = new Ccharacter( cave_troll, "Burgh" );
characters_online = 4;
+
+#ifdef _OPENMP
+ std::cout << "OpemMP version " << _OPENMP << " initialized." << std::endl;
+ std::cout << "Running on machine with " << omp_get_num_procs() << " core(s)." << std::endl;
+ std::cout.flush();
+
+
+#pragma omp parallel sections \
+ shared( worlds, characters, job_list, timer, characters_online, worlds_online ) \
+ num_threads ( 3 )
+ {
+ #pragma omp section
+ {
+ thread_main_loop();
+ }
+ #pragma omp section
+ {
+ thread_timer();
+ }
+ #pragma omp section
+ {
+ thread_console();
+ }
+ }
+
+{
+ std::cout<<"Created "<< omp_get_num_threads() <<" Threads"<<std::endl;
+// enable dynamic Threads
+ if ( omp_get_dynamic() ) omp_set_dynamic( 1 );
+
+//#ifdef DEBUG
+int64_t i;
+ #pragma omp for schedule( static, 2 )
+ for ( i = 0; i < 20000; i++ )
+ {
+ int z = 1;
+ if (! i % 2 ) z = 2;
+ else if (! i % 3 ) z = 3;
+ else z = 1;
+
+ switch( z ) {
+ case 1:
+ std::cout << "1";
+ std::cout.flush();
+ _do( action_IDLE, characters[ 0 ] );
+ break;
+ case 2:
+ std::cout << "2";
+ std::cout.flush();
+ _do( action_IDLE, characters[ 0 ] );
+ break;
+ case 3:
+ std::cout << "3";
+ std::cout.flush();
+ _do( action_IDLE, characters[ 0 ] );
+ break;
+ }
+ }
+///#endif
+
+ #pragma omp barrier
+ { // all threads must execute this one
+ std::cout << "BAR" << std::endl;
+ std::cout.flush();
+ }
+
+/* #pragma omp critical
+ { // executed only by One Thread.
+ // good place for Network related operations
+ std::cout << "CRI" << std::endl;
+ std::cout.flush();
+ }
+ */
+}
+#else
+ std::cout << "Your compiler does not support OpenMP!" << std::endl;
+ recv_signal( 0 );
+#endif
+
+/*
boost::thread timer_thread( &thread_timer );
boost::thread main_loop_thread( &thread_main_loop );
boost::thread console_thread( &thread_console );
// wait for the threads to finish
timer_thread.join();
main_loop_thread.join();
-// console_thread.join();
-
+ console_thread.join();
+*/
recv_signal( 0 );
return 0;
}
- /*Cworld delmirum; //swiat delmirum (mroczne krolestwo),
- //przykladowo 10 na 10 theritoriow ;} na 200 graczy styka lekko;}
- Cworld crealis(1,1,3,3,1.2); //swiat crealis (dolina gluchej ciszy -noob'landia)
- //Cworld umbra(255,255,255,255,0); //ogrom, plus zero grawitacji.. czyli nie miejsce dla smiertelnikow :}
-
- //std::vector<Cworld> delmirum;
-
- crealis.name="crealis";
- crealis.theritory.name="neomis";
- crealis.theritory.place.name="cathalith village";
- crealis.theritory.place.map.name="alley of the cathalith";
-
- //modyfikujemy pozycje w crealis
-
-
- //tworzymy postac krasnoluda
- crealis.character.push_back( Ccharacter() );
- crealis.character[0].race=dwarf;
- crealis.character[0].strength=17;
- crealis.character[0].dexterity=7;
- crealis.character[0].luck=-5;
- crealis.character[0].intelligence=9;
- crealis.character[0].instinct=11; //instynkt postaci
-
- crealis.character.push_back( Ccharacter() );
-
-
- delmirum.name="delmirum";
- std::cout << "\nname:("<< crealis.name << ") char:("<<crealis.character[0].pos.mCoord
- << ") theirtory name: ("<< crealis.theritory.name << ")";
- std::cout <<"\ncrealis version:(" << crealis.version << ") creatures online ("
- << crealis.character.size() << ")\n";
-
- std::cout << "\nplaces: x:("<< crealis.xPlaceSize << ") y:("<< crealis.yPlaceSize
- << ") g:(" << crealis.gravity << ")";
- std::cout << "\ntheritories: x:("<< crealis.xTheritorySize << ") y:("<< crealis.yTheritorySize << ")";
-
- std::cout << "\nname:("<< delmirum.name << ") char:("<<delmirum.character[0].pos.mCoord
- << ") theritory name: ("<< delmirum.theritory.name << ")";
-
- std::cout << "\nplaces: x:("<< delmirum.xPlaceSize << ") y:("<< delmirum.yPlaceSize
- << ") g:(" << delmirum.gravity << ")";
- std::cout << "\ntheritories: x:("<< delmirum.xTheritorySize << ") y:("<< delmirum.yTheritorySize << ")\n";
-
- std::cout << "\n\n crealis character [0] territory x("
- << crealis.character[0].pos.tCoord.x << ") y:("<<crealis.character[0].pos.tCoord.y<<")\n" ;
-
- char z;
- std::cin >> z ;
- */
View
7 main.h
@@ -12,23 +12,28 @@
#include <boost/archive/binary_iarchive.hpp>
#include <boost/filesystem/operations.hpp>
#include <signal.h>
+#ifdef _OPENMP
+#include <omp.h>
+#endif
#include "job.h"
-#include "world.h"
#include "config.h"
#include "character.h"
#include "item.h"
#include "coordinates.h"
#include "place.h"
#include "soul.h"
#include "version.h"
+#include "world.h"
#ifdef RUBY_LOCAL_INSTALL
#include "../local/lib/ruby/1.8/x86_64-linux/ruby.h"
#else
#include "../lib/ruby/1.8/x86_64-linux/ruby.h"
#endif
+
+
namespace boost {
namespace serialization {
template<class Archive>
View
68 main2.cpp
@@ -0,0 +1,68 @@
+#include <iostream>
+//networking
+#include <boost/asio.hpp>
+#include <boost/date_time/posix_time/posix_time.hpp>
+
+
+#include "main.h"
+
+using namespace std;
+
+
+void
+save_world( Cworld world, std::string filename ) {
+ std::ofstream ofs( filename.c_str() );
+ boost::archive::binary_oarchive oa( ofs, 1 ); // 1 means without header
+ // write class instance to archive
+ oa << world;
+ // archive and stream closed when destructors are called
+}
+
+// load data from archive
+void
+load_world( Cworld world, std::string filename ) {
+ // create and open an archive for input
+ std::ifstream ifs( filename.c_str() );
+ boost::archive::binary_iarchive ia( ifs, 1 );
+ // read class state from archive
+ ia >> world;
+}
+
+
+int
+main() {
+ Ccharacter* characters = new Ccharacter[ 100 ];
+ characters[ 0 ].health = 0;
+ uint64_t timer = 0;
+
+ boost::asio::io_service io;
+
+
+ for ( int i = 0; i < 50000; i++ ) {
+ //set bright red ANSI color in console
+ printf("%c[%d;%d;%dm", 0x1B, BRIGHT, RED, BG_BLACK);
+ cout << "(A#):" << characters[ 0 ].health << "-";
+ characters[ 0 ].health += 1;
+ cout << characters[ 0 ].health;
+ //reset ANSI code to default:
+ printf("%c[%dm", 0x1B, 0);
+ cout << flush;
+ }
+ for ( int i = 0; i < 50000; i++ ) {
+ printf("%c[%d;%d;%dm", 0x1B, BRIGHT, GREEN, BG_BLACK);
+ cout << "(B#):" << characters[ 0 ].health<< "-";;
+ characters[ 0 ].health += 1;
+ cout << characters[ 0 ].health;
+ printf("%c[%dm", 0x1B, 0);
+ cout << flush;
+ }
+ for ( int i = 0; i < 50000; i++ ) {
+ cout << "(C#):" << characters[ 0 ].health<< "-";;
+ characters[ 0 ].health += 1;
+ cout << characters[ 0 ].health << flush;
+ }
+
+ delete[] characters;
+ return 0;
+}
+
View
325 tags
@@ -0,0 +1,325 @@
+!_TAG_FILE_FORMAT 2 /extended format; --format=1 will not append ;" to lines/
+!_TAG_FILE_SORTED 1 /0=unsorted, 1=sorted, 2=foldcase/
+!_TAG_PROGRAM_AUTHOR Darren Hiebert /dhiebert@users.sourceforge.net/
+!_TAG_PROGRAM_NAME Exuberant Ctags //
+!_TAG_PROGRAM_URL http://ctags.sourceforge.net /official site/
+!_TAG_PROGRAM_VERSION 5.7 //
+ADDINC128 hashlib/hl_sha2mac.h 130;" d
+BACKSLASH config.h /^const std::string BACKSLASH = "\\\\";$/;" v
+BG_BLACK config.h 66;" d
+BRIGHT config.h 67;" d
+BYTE_ORDER hashlib/hl_sha2mac.h 103;" d
+CREALIS_VERSION version.h /^static const std::string CREALIS_VERSION = "0.0.3.git";$/;" v
+Ccharacter character.cpp /^Ccharacter::Ccharacter( Eraces born_race, std::string new_name ) {$/;" f class:Ccharacter
+Ccharacter character.cpp /^Ccharacter::Ccharacter( std::string new_name ) {$/;" f class:Ccharacter
+Ccharacter character.h /^class Ccharacter {$/;" c
+Ccoordinates coordinates.cpp /^Ccoordinates::Ccoordinates( std::string pos, std::string parent_pos[ 6 ] ) {$/;" f class:Ccoordinates
+Ccoordinates coordinates.cpp /^Ccoordinates::Ccoordinates() {$/;" f class:Ccoordinates
+Ccoordinates coordinates.h /^class Ccoordinates {$/;" c
+Ch hashlib/hl_sha2mac.h 181;" d
+Citem item.cpp /^Citem::Citem() {$/;" f class:Citem
+Citem item.h /^class Citem {$/;" c
+Cmap map.cpp /^Cmap::Cmap( std::string newName, std::string newFileName ) {$/;" f class:Cmap
+Cmap map.cpp /^Cmap::Cmap() {$/;" f class:Cmap
+Cmap map.h /^class Cmap {$/;" c
+Computed hashlib/hl_sha1.h /^ int Computed;$/;" m struct:SHA1_CTX
+Corrupted hashlib/hl_sha1.h /^ int Corrupted;$/;" m struct:SHA1_CTX
+Cplace place.cpp /^Cplace::Cplace( std::string newName ) {$/;" f class:Cplace
+Cplace place.cpp /^Cplace::Cplace() {$/;" f class:Cplace
+Cplace place.h /^class Cplace {$/;" c
+Csoul soul.cpp /^Csoul::Csoul() {$/;" f class:Csoul
+Csoul soul.h /^class Csoul {$/;" c
+Ctheritory theritory.cpp /^Ctheritory::Ctheritory() {$/;" f class:Ctheritory
+Ctheritory theritory.h /^class Ctheritory {$/;" c
+Cworld world.cpp /^Cworld::Cworld( std::string new_name, uint64_t x, uint64_t y, uint64_t g ) { \/\/maxX, maxY, grawitacja$/;" f class:Cworld
+Cworld world.cpp /^Cworld::Cworld() {$/;" f class:Cworld
+Cworld world.h /^class Cworld {$/;" c
+DEFAULT_GRAVITY world.h /^const uint32_t DEFAULT_GRAVITY = 0;$/;" v
+DEFAULT_THERITORY_X world.h /^const uint32_t DEFAULT_THERITORY_X = 1;$/;" v
+DEFAULT_THERITORY_Y world.h /^const uint32_t DEFAULT_THERITORY_Y = 1;$/;" v
+ETypeOfJob job.h /^enum ETypeOfJob {$/;" g
+Ealignment soul.h /^enum Ealignment {$/;" g
+Eraces character.h /^enum Eraces {$/;" g
+Esize item.h /^enum Esize { tiny = 0, small, medium, large, outgenerous, huge };$/;" g
+GREEN config.h 69;" d
+HASHLIBPP_H hashlib/hashlibpp.h 39;" d
+HASHWRAPPER_H hashlib/hl_hashwrapper.h 73;" d
+HLTYPES_H hashlib/hl_types.h 40;" d
+HL_EXCEPTION_H hashlib/hl_exception.h 41;" d
+HL_FILE_READ_ERROR hashlib/hl_exception.h /^ HL_FILE_READ_ERROR $/;" e enum:hlerrors
+HL_NO_ERROR hashlib/hl_exception.h /^ HL_NO_ERROR = 0,$/;" e enum:hlerrors
+Intermediate_Hash hashlib/hl_sha1.h /^ hl_uint32 Intermediate_Hash[SHA1HashSize\/4];$/;" m struct:SHA1_CTX
+JOB_SAVE_PATH config.h /^const std::string JOB_SAVE_PATH = "jobs" + pp;$/;" v
+Job job.cpp /^Job::Job() {$/;" f class:Job
+Job job.h /^class Job {$/;" c
+K256 hashlib/hl_sha256.cpp /^const static sha2_word32 K256[64] = {$/;" v file:
+LITTLE_ENDIAN hashlib/hl_sha2mac.h 102;" d
+Length_High hashlib/hl_sha1.h /^ hl_uint32 Length_High;$/;" m struct:SHA1_CTX
+Length_Low hashlib/hl_sha1.h /^ hl_uint32 Length_Low; $/;" m struct:SHA1_CTX
+MAGENTA config.h 70;" d
+MAIN_DIR config.h /^ const std::string MAIN_DIR = std::string( "C:" + pp + "CWorld" );$/;" v
+MAIN_DIR config.h /^ const std::string MAIN_DIR = std::string( getenv( "HOME" ) ) + pp + ".cWorld";$/;" v
+MAX_DWARF_AGE character.h /^const uint32_t MAX_DWARF_AGE = 350;$/;" v
+MAX_ELVE_AGE character.h /^const uint32_t MAX_ELVE_AGE = 2000;$/;" v
+MAX_HUMAN_AGE character.h /^const uint32_t MAX_HUMAN_AGE = 115;$/;" v
+MAX_PLAYERS world.h /^const uint32_t MAX_PLAYERS = 2000;$/;" v
+MAX_WORLDS world.h /^const uint32_t MAX_WORLDS = 50;$/;" v
+MEMCPY_BCOPY hashlib/hl_sha2mac.h 157;" d
+MEMCPY_BCOPY hashlib/hl_sha2mac.h 161;" d
+MEMSET_BZERO hashlib/hl_sha2mac.h 156;" d
+MEMSET_BZERO hashlib/hl_sha2mac.h 160;" d
+Maj hashlib/hl_sha2mac.h 182;" d
+Message_Block hashlib/hl_sha1.h /^ hl_uint8 Message_Block[64]; $/;" m struct:SHA1_CTX
+Message_Block_Index hashlib/hl_sha1.h /^ hl_uint16 Message_Block_Index;$/;" m struct:SHA1_CTX
+MyContainer tests/serialization_test.cpp /^class MyContainer {$/;" c file:
+R hashlib/hl_sha2mac.h 174;" d
+RED config.h 68;" d
+REVERSE32 hashlib/hl_sha2mac.h 110;" d
+REVERSE64 hashlib/hl_sha2mac.h 115;" d
+ROUND256 hashlib/hl_sha256.cpp 171;" d file:
+ROUND256_0_TO_15 hashlib/hl_sha256.cpp 151;" d file:
+ROUND256_0_TO_15 hashlib/hl_sha256.cpp 162;" d file:
+RUBY_LOCAL_INSTALL config.h 16;" d
+S32 hashlib/hl_sha2mac.h 176;" d
+S64 hashlib/hl_sha2mac.h 178;" d
+SHA1 hashlib/hl_sha1.h /^class SHA1$/;" c
+SHA1CircularShift hashlib/hl_sha1.cpp 81;" d file:
+SHA1HashSize hashlib/hl_sha1.h 95;" d
+SHA1Input hashlib/hl_sha1.cpp /^int SHA1::SHA1Input( SHA1_CTX *context,$/;" f class:SHA1
+SHA1PadMessage hashlib/hl_sha1.cpp /^void SHA1::SHA1PadMessage(SHA1_CTX *context)$/;" f class:SHA1
+SHA1ProcessMessageBlock hashlib/hl_sha1.cpp /^void SHA1::SHA1ProcessMessageBlock(SHA1_CTX *context)$/;" f class:SHA1
+SHA1Reset hashlib/hl_sha1.cpp /^int SHA1::SHA1Reset(SHA1_CTX *context)$/;" f class:SHA1
+SHA1Result hashlib/hl_sha1.cpp /^int SHA1::SHA1Result( SHA1_CTX *context,$/;" f class:SHA1
+SHA1WRAPPER_H hashlib/hl_sha1wrapper.h 41;" d
+SHA1_CTX hashlib/hl_sha1.h /^typedef struct SHA1_CTX$/;" s
+SHA1_CTX hashlib/hl_sha1.h /^} SHA1_CTX;$/;" t typeref:struct:SHA1_CTX
+SHA1_H hashlib/hl_sha1.h 73;" d
+SHA256 hashlib/hl_sha256.h /^class SHA256$/;" c
+SHA256WRAPPER_H hashlib/hl_sha256wrapper.h 41;" d
+SHA256_BLOCK_LENGTH hashlib/hl_sha256.h 78;" d
+SHA256_CTX hashlib/hl_sha256.h /^typedef struct SHA256_CTX $/;" s
+SHA256_CTX hashlib/hl_sha256.h /^} SHA256_CTX;$/;" t typeref:struct:SHA256_CTX
+SHA256_DIGEST_LENGTH hashlib/hl_sha256.h 80;" d
+SHA256_DIGEST_STRING_LENGTH hashlib/hl_sha256.h 81;" d
+SHA256_End hashlib/hl_sha256.cpp /^char* SHA256::SHA256_End(SHA256_CTX* context, char buffer[]) {$/;" f class:SHA256
+SHA256_Final hashlib/hl_sha256.cpp /^void SHA256::SHA256_Final(sha2_byte digest[], SHA256_CTX* context) {$/;" f class:SHA256
+SHA256_H hashlib/hl_sha256.h 74;" d
+SHA256_Init hashlib/hl_sha256.cpp /^void SHA256::SHA256_Init(SHA256_CTX* context) {$/;" f class:SHA256
+SHA256_SHORT_BLOCK_LENGTH hashlib/hl_sha256.h 79;" d
+SHA256_Transform hashlib/hl_sha256.cpp /^void SHA256::SHA256_Transform(SHA256_CTX* context, const sha2_word32* data) {$/;" f class:SHA256
+SHA256_Update hashlib/hl_sha256.cpp /^void SHA256::SHA256_Update(SHA256_CTX* context, const sha2_byte *data, unsigned int len) {$/;" f class:SHA256
+SHA2_USE_MEMSET_MEMCPY hashlib/hl_sha2mac.h 148;" d
+SHA2ext hashlib/hl_sha2ext.h /^class SHA2ext$/;" c
+SHA2ext_H hashlib/hl_sha2ext.h 74;" d
+SHA384_BLOCK_LENGTH hashlib/hl_sha2ext.h 78;" d
+SHA384_CTX hashlib/hl_sha2ext.h /^typedef SHA512_CTX SHA384_CTX;$/;" t
+SHA384_DIGEST_LENGTH hashlib/hl_sha2ext.h 79;" d
+SHA384_DIGEST_STRING_LENGTH hashlib/hl_sha2ext.h 80;" d
+SHA512_BLOCK_LENGTH hashlib/hl_sha2ext.h 81;" d
+SHA512_CTX hashlib/hl_sha2ext.h /^typedef struct SHA512_CTX $/;" s
+SHA512_CTX hashlib/hl_sha2ext.h /^} SHA512_CTX;$/;" t typeref:struct:SHA512_CTX
+SHA512_DIGEST_LENGTH hashlib/hl_sha2ext.h 82;" d
+SHA512_DIGEST_STRING_LENGTH hashlib/hl_sha2ext.h 83;" d
+SHA512_SHORT_BLOCK_LENGTH hashlib/hl_sha2ext.h 84;" d
+SLASH config.h /^const std::string SLASH = "\/";$/;" v
+SYSTEM_CLASS_VERSION version.h /^static const std::string SYSTEM_CLASS_VERSION = "0.2.6.git";$/;" v
+Sigma0_256 hashlib/hl_sha2mac.h 185;" d
+Sigma0_512 hashlib/hl_sha2mac.h 191;" d
+Sigma1_256 hashlib/hl_sha2mac.h 186;" d
+Sigma1_512 hashlib/hl_sha2mac.h 192;" d
+WORLD_SAVE_PATH config.h /^const std::string WORLD_SAVE_PATH = "save" + pp;$/;" v
+_CCHARACTER_H_ character.h 11;" d
+_CCONFIG_H_ config.h 11;" d
+_CCOORDINATES_H_ coordinates.h 11;" d
+_CITEM_H_ item.h 11;" d
+_CJOB_H_ job.h 11;" d
+_CMAP_H_ map.h 11;" d
+_CPLACE_H_ place.h 11;" d
+_CSOUL_H_ soul.h 11;" d
+_CTHERITORY_H_ theritory.h 11;" d
+_CWORLD_H_ world.h 12;" d
+_HL_TOOLS_H hashlib/hl_tools.h 10;" d
+_MAIN_H main.h 2;" d
+_SHA_enum_ hashlib/hl_sha1.h 83;" d
+_VERSION_H_ version.h 2;" d
+_do main.cpp /^_do( ETypeOfJob action_to_perform, Ccharacter *c1, Ccharacter *c2 = NULL ) {$/;" f
+action_ATTACK job.h /^ action_ATTACK = 10,$/;" e enum:ETypeOfJob
+action_DEFEND job.h /^ action_DEFEND = 11,$/;" e enum:ETypeOfJob
+action_IDLE job.h /^ action_IDLE = 0,$/;" e enum:ETypeOfJob
+action_RUN job.h /^ action_RUN = 2,$/;" e enum:ETypeOfJob
+action_WALK job.h /^ action_WALK = 1,$/;" e enum:ETypeOfJob
+actors job.h /^ Ccharacter* actors[ 2 ]; \/\/ first is always main player, second one is optional$/;" m class:Job
+add_job_to_stack main.cpp /^add_job_to_stack( Job job ) { $/;" f
+age character.h /^ uint32_t age; \/\/ wiek postaci$/;" m class:Ccharacter
+age tests/serialization_test.cpp /^ uint32_t age; \/\/ wiek postaci$/;" m class:MyContainer file:
+alignment soul.h /^ Ealignment alignment; \/\/charakter$/;" m class:Csoul
+annimal character.h /^ annimal = 0,$/;" e enum:Eraces
+base_health character.h /^ base_health,$/;" m class:Ccharacter
+base_health tests/serialization_test.cpp /^ base_health,$/;" m class:MyContainer file:
+bitcount hashlib/hl_sha256.h /^ hl_uint64 bitcount;$/;" m struct:SHA256_CTX
+bitcount hashlib/hl_sha2ext.h /^ hl_uint64 bitcount[2];$/;" m struct:SHA512_CTX
+boost main.h /^namespace boost {$/;" n
+boost tests/serialization_test_2.cpp /^namespace boost {$/;" n file:
+buffer hashlib/hl_sha256.h /^ hl_uint8 buffer[SHA256_BLOCK_LENGTH];$/;" m struct:SHA256_CTX
+buffer hashlib/hl_sha2ext.h /^ hl_uint8 buffer[SHA512_BLOCK_LENGTH];$/;" m struct:SHA512_CTX
+cave_troll character.h /^ cave_troll = 25$/;" e enum:Eraces
+chaoticEvil soul.h /^ chaoticEvil = -3,$/;" e enum:Ealignment
+characters main.cpp /^static Ccharacter* characters[ MAX_PLAYERS ]; \/\/ world.h$/;" v file:
+characters_online main.cpp /^static uint64_t characters_online; \/\/ current amount of online players$/;" v file:
+cl_version world.h /^ std::string cl_version; \/\/wersja swiata. od tego zaleza ew niekompatybilnosci$/;" m class:Cworld
+context hashlib/hl_sha1wrapper.h /^ SHA1_CTX context;$/;" m class:sha1wrapper
+context hashlib/hl_sha256wrapper.h /^ SHA256_CTX context;$/;" m class:sha256wrapper
+convToString hashlib/hl_sha1wrapper.cpp /^std::string sha1wrapper::convToString(unsigned char *data)$/;" f class:sha1wrapper
+convToString hashlib/hl_sha256wrapper.cpp /^std::string sha256wrapper::convToString(unsigned char *data)$/;" f class:sha256wrapper
+dead character.h /^ bool dead;$/;" m class:Ccharacter
+demoan soul.h /^ demoan = 4 \/\/demoan, polaczenie demona i aniola -cos jak chaoticNeutral$/;" e enum:Ealignment
+dexterity character.h /^ dexterity,$/;" m class:Ccharacter
+dexterity tests/serialization_test.cpp /^ dexterity,$/;" m class:MyContainer file:
+dwarf character.h /^ dwarf = 3,$/;" e enum:Eraces
+elve character.h /^ elve = 1,$/;" e enum:Eraces
+erro_message hashlib/hl_exception.h /^ std::string erro_message(void)$/;" f class:hlException
+error_number hashlib/hl_exception.h /^ hlerror error_number(void)$/;" f class:hlException
+evil soul.h /^ evil = -2,$/;" e enum:Ealignment
+fileName map.h /^ std::string fileName; \/\/ nazwa pliku bsp z mapa$/;" m class:Cmap
+generate_sha1 hashlib/hl_tools.cpp /^generate_sha1( bool timeize_srand ) {$/;" f
+getHashFromFile hashlib/hl_hashwrapper.h /^ virtual std::string getHashFromFile(std::string filename)$/;" f class:hashwrapper
+getHashFromString hashlib/hl_hashwrapper.h /^ virtual std::string getHashFromString(std::string text)$/;" f class:hashwrapper
+get_job_from_stack main.cpp /^get_job_from_stack() {$/;" f
+gold character.h /^ uint64_t gold; $/;" m class:Ccharacter
+gold tests/serialization_test.cpp /^ int64_t gold;$/;" m class:MyContainer file:
+good soul.h /^ good = 2,$/;" e enum:Ealignment
+gravity world.h /^ uint64_t gravity; \/\/grawitacja$/;" m class:Cworld
+grizzly character.h /^ grizzly = 4,$/;" e enum:Eraces
+hashIt hashlib/hl_sha1wrapper.cpp /^std::string sha1wrapper::hashIt(void)$/;" f class:sha1wrapper
+hashIt hashlib/hl_sha256wrapper.cpp /^std::string sha256wrapper::hashIt(void)$/;" f class:sha256wrapper
+hashwrapper hashlib/hl_hashwrapper.h /^class hashwrapper$/;" c
+health character.h /^ health,$/;" m class:Ccharacter
+health tests/serialization_test.cpp /^ health,$/;" m class:MyContainer file:
+hlException hashlib/hl_exception.h /^ hlException(hlerror er, std::string m)$/;" f class:hlException
+hlException hashlib/hl_exception.h /^class hlException$/;" c
+hl_uint16 hashlib/hl_types.h /^typedef unsigned short int hl_uint16;$/;" t
+hl_uint32 hashlib/hl_types.h /^typedef unsigned long int hl_uint32;$/;" t
+hl_uint64 hashlib/hl_types.h /^typedef unsigned long long int hl_uint64;$/;" t
+hl_uint8 hashlib/hl_types.h /^typedef unsigned char hl_uint8;$/;" t
+hlerror hashlib/hl_exception.h /^} hlerror;$/;" t typeref:enum:hlerrors
+hlerrors hashlib/hl_exception.h /^typedef enum hlerrors$/;" g
+huge item.h /^enum Esize { tiny = 0, small, medium, large, outgenerous, huge };$/;" e enum:Esize
+human character.h /^ human = 2,$/;" e enum:Eraces
+iError hashlib/hl_exception.h /^ hlerror iError;$/;" m class:hlException
+init_structures main.cpp /^init_structures() {$/;" f
+instinct character.h /^ instinct, \/\/ instynkt im wyzszy tym postac bardziej potrafi wyczuc jakie ma szanse z przeciwnikiem :}$/;" m class:Ccharacter
+instinct tests/serialization_test.cpp /^ instinct, \/\/ instynkt im wyzszy tym postac bardziej potrafi wyczuc jakie ma szanse z przeciwnikiem :}$/;" m class:MyContainer file:
+intelligence character.h /^ intelligence,$/;" m class:Ccharacter
+intelligence tests/serialization_test.cpp /^ intelligence,$/;" m class:MyContainer file:
+items character.h /^ Citem* items[50];$/;" m class:Ccharacter
+job_crc job.h /^ std::string job_id, job_crc; \/\/ sha1? -not yet implemented$/;" m class:Job
+job_flags job.h /^ uint32_t job_flags; \/\/ specified flags for non-standard types of jobs -not yet implemented$/;" m class:Job
+job_id job.h /^ std::string job_id, job_crc; \/\/ sha1? -not yet implemented$/;" m class:Job
+job_list main.cpp /^static std::vector<Job> job_list;$/;" v file:
+kill character.cpp /^void Ccharacter::kill() {$/;" f class:Ccharacter
+large item.h /^enum Esize { tiny = 0, small, medium, large, outgenerous, huge };$/;" e enum:Esize
+lawfulGood soul.h /^ lawfulGood = 3,$/;" e enum:Ealignment
+load tests/serialization_test.cpp /^ load(Archive & ar, const unsigned int version)$/;" f class:MyContainer file:
+load_job main.cpp /^load_job( Job job, std::string filename ) {$/;" f
+load_world main.cpp /^load_world( Cworld world, std::string filename ) {$/;" f
+load_world main2.cpp /^load_world( Cworld world, std::string filename ) {$/;" f
+luck character.h /^ int32_t luck; \/\/szczescie moze byc -$/;" m class:Ccharacter
+luck tests/serialization_test.cpp /^ int32_t luck; \/\/szczescie moze byc -$/;" m class:MyContainer file:
+main main.cpp /^main( int argc, char* argv[] ) {$/;" f
+main main2.cpp /^main() {$/;" f
+main tests/serialization_test.cpp /^int main() {$/;" f
+main tests/serialization_test_2.cpp /^int main() {$/;" f
+mana soul.h /^ uint64_t mana,$/;" m class:Csoul
+map place.h /^ Cmap map; \/\/mapa$/;" m class:Cplace
+medium item.h /^enum Esize { tiny = 0, small, medium, large, outgenerous, huge };$/;" e enum:Esize
+mind_strength character.h /^ mind_strength;\/\/cechy postaci$/;" m class:Ccharacter
+mind_strength soul.h /^ mind_strength; \/\/sila umyslu$/;" m class:Csoul
+mind_strength tests/serialization_test.cpp /^ mind_strength;\/\/cechy postaci$/;" m class:MyContainer file:
+name character.h /^ std::string name; \/\/imie\/nazwa postaci$/;" m class:Ccharacter
+name map.h /^ std::string name; \/\/map name $/;" m class:Cmap
+name place.h /^ std::string name; \/\/place name$/;" m class:Cplace
+name theritory.h /^ std::string name; \/\/theritory name and\/or sha1 identifier$/;" m class:Ctheritory
+name world.h /^ std::string name;$/;" m class:Cworld
+neutral soul.h /^ neutral = 0,$/;" e enum:Ealignment
+neutralEvil soul.h /^ neutralEvil = -1,$/;" e enum:Ealignment
+neutralGood soul.h /^ neutralGood = 1,$/;" e enum:Ealignment
+outgenerous item.h /^enum Esize { tiny = 0, small, medium, large, outgenerous, huge };$/;" e enum:Esize
+parent_positions coordinates.h /^ std::string parent_positions[ 6 ]; \/\/ sha1 z sha sąsiadujących elementów liczone od lewego boku 6 kąta$/;" m class:Ccoordinates
+place theritory.h /^ Cplace place; \/\/terytorium place'a$/;" m class:Ctheritory
+pos character.h /^ Ccoordinates pos; \/\/pozycja postaci w swiecie$/;" m class:Ccharacter
+position coordinates.h /^ std::string position; \/\/ sha1 identyfikujące daną pozycję mapy$/;" m class:Ccoordinates
+pp config.h /^static std::string pp = SLASH; \/\/ "normal" UNIX slash to separate parts path$/;" v
+print_character main.cpp /^print_character( Ccharacter* ch ) {$/;" f
+private_box character.h /^ Citem* private_box[250];$/;" m class:Ccharacter
+race character.h /^ Eraces race;$/;" m class:Ccharacter
+recv_signal main.cpp /^recv_signal( int sig ) {$/;" f
+resetContext hashlib/hl_sha1wrapper.cpp /^void sha1wrapper::resetContext(void)$/;" f class:sha1wrapper
+resetContext hashlib/hl_sha256wrapper.cpp /^void sha256wrapper::resetContext(void)$/;" f class:sha256wrapper
+run job.cpp /^void Job::run() {$/;" f class:Job
+save tests/serialization_test.cpp /^ save( Archive & ar, const unsigned int version ) const {$/;" f class:MyContainer file:
+save_job main.cpp /^save_job( Job job, std::string filename ) {$/;" f
+save_world main.cpp /^save_world( Cworld world, std::string filename ) {$/;" f
+save_world main2.cpp /^save_world( Cworld world, std::string filename ) {$/;" f
+serialization main.h /^namespace serialization {$/;" n namespace:boost
+serialization tests/serialization_test_2.cpp /^namespace serialization {$/;" n namespace:boost file:
+serialize main.h /^ void serialize(Archive & ar, Citem & item, const unsigned int version) {$/;" f namespace:boost::serialization
+serialize main.h /^ void serialize(Archive & ar, Ccharacter & ch, const unsigned int version) {$/;" f namespace:boost::serialization
+serialize main.h /^ void serialize(Archive & ar, Ccoordinates & pos, const unsigned int version) {$/;" f namespace:boost::serialization
+serialize main.h /^ void serialize(Archive & ar, Csoul & soul, const unsigned int version) {$/;" f namespace:boost::serialization
+serialize main.h /^ void serialize(Archive & ar, Cworld & world, const unsigned int version) {$/;" f namespace:boost::serialization
+serialize main.h /^ void serialize(Archive & ar, Job & job, const unsigned int version) {$/;" f namespace:boost::serialization
+serialize tests/serialization_test_2.cpp /^ void serialize(Archive & ar, Ccharacter & ch, const unsigned int version) {$/;" f namespace:boost::serialization
+serialize tests/serialization_test_2.cpp /^ void serialize(Archive & ar, Ccoordinates & pos, const unsigned int version) {$/;" f namespace:boost::serialization
+serialize tests/serialization_test_2.cpp /^ void serialize(Archive & ar, Citem & item, const unsigned int version) {$/;" f namespace:boost::serialization
+serialize tests/serialization_test_2.cpp /^ void serialize(Archive & ar, Csoul & soul, const unsigned int version) {$/;" f namespace:boost::serialization
+serialize tests/serialization_test_2.cpp /^ void serialize(Archive & ar, Cworld & world, const unsigned int version) {$/;" f namespace:boost::serialization
+sha1 hashlib/hl_sha1wrapper.h /^ SHA1 *sha1;$/;" m class:sha1wrapper
+sha1wrapper hashlib/hl_sha1wrapper.cpp /^sha1wrapper::sha1wrapper()$/;" f class:sha1wrapper
+sha1wrapper hashlib/hl_sha1wrapper.h /^class sha1wrapper : public hashwrapper$/;" c
+sha256 hashlib/hl_sha256wrapper.h /^ SHA256 *sha256;$/;" m class:sha256wrapper
+sha256_initial_hash_value hashlib/hl_sha256.cpp /^const static sha2_word32 sha256_initial_hash_value[8] = {$/;" v file:
+sha256wrapper hashlib/hl_sha256wrapper.cpp /^sha256wrapper::sha256wrapper()$/;" f class:sha256wrapper
+sha256wrapper hashlib/hl_sha256wrapper.h /^class sha256wrapper : public hashwrapper$/;" c
+sha2_byte hashlib/hl_sha256.h /^typedef hl_uint8 sha2_byte; $/;" t
+sha2_byte hashlib/hl_sha2ext.h /^typedef hl_uint8 sha2_byte; $/;" t
+sha2_hex_digits hashlib/hl_sha256.cpp /^static const char *sha2_hex_digits = "0123456789abcdef";$/;" v file:
+sha2_word32 hashlib/hl_sha256.h /^typedef hl_uint32 sha2_word32; $/;" t
+sha2_word32 hashlib/hl_sha2ext.h /^typedef hl_uint32 sha2_word32; $/;" t
+sha2_word64 hashlib/hl_sha256.h /^typedef hl_uint64 sha2_word64; $/;" t
+sha2_word64 hashlib/hl_sha2ext.h /^typedef hl_uint64 sha2_word64; $/;" t
+shaInputTooLong hashlib/hl_sha1.h /^ shaInputTooLong, \/* input data too long *\/$/;" e enum:__anon1
+shaNull hashlib/hl_sha1.h /^ shaNull, \/* Null pointer parameter *\/$/;" e enum:__anon1
+shaStateError hashlib/hl_sha1.h /^ shaStateError \/* called Input after Result *\/$/;" e enum:__anon1
+shaSuccess hashlib/hl_sha1.h /^ shaSuccess = 0,$/;" e enum:__anon1
+sigma0_256 hashlib/hl_sha2mac.h 187;" d
+sigma0_512 hashlib/hl_sha2mac.h 193;" d
+sigma1_256 hashlib/hl_sha2mac.h 188;" d
+sigma1_512 hashlib/hl_sha2mac.h 194;" d
+size_of_item item.h /^ Esize size_of_item;$/;" m class:Citem
+small item.h /^enum Esize { tiny = 0, small, medium, large, outgenerous, huge };$/;" e enum:Esize
+soul character.h /^ Csoul soul; \/\/ aktualna dusza :}$/;" m class:Ccharacter
+soul_exist soul.h /^ bool soul_exist; \/\/czy istnieje dusza. czyli czy postac jest graczem czy nie$/;" m class:Csoul
+state hashlib/hl_sha256.h /^ hl_uint32 state[8];$/;" m struct:SHA256_CTX
+state hashlib/hl_sha2ext.h /^ hl_uint64 state[8];$/;" m struct:SHA512_CTX
+strMessge hashlib/hl_exception.h /^ std::string strMessge;$/;" m class:hlException
+strength character.h /^ strength,$/;" m class:Ccharacter
+strength tests/serialization_test.cpp /^ strength,$/;" m class:MyContainer file:
+thread_console main.cpp /^thread_console() {$/;" f
+thread_main_loop main.cpp /^void thread_main_loop() {$/;" f
+thread_timer main.cpp /^thread_timer() {$/;" f
+timer main.cpp /^static uint64_t timer;$/;" v file:
+tiny item.h /^enum Esize { tiny = 0, small, medium, large, outgenerous, huge };$/;" e enum:Esize
+type job.h /^ ETypeOfJob type;$/;" m class:Job
+uint2cstr hashlib/hl_tools.cpp /^uint2cstr( uint64_t i ) {$/;" f
+updateContext hashlib/hl_sha1wrapper.cpp /^void sha1wrapper::updateContext(unsigned char *data, unsigned int len)$/;" f class:sha1wrapper
+updateContext hashlib/hl_sha256wrapper.cpp /^void sha256wrapper::updateContext(unsigned char *data, unsigned int len)$/;" f class:sha256wrapper
+weight item.h /^ int64_t weight;$/;" m class:Citem
+worlds main.cpp /^static Cworld* worlds[ MAX_WORLDS ]; \/\/ world.h$/;" v file:
+worlds_online main.cpp /^static uint64_t worlds_online;$/;" v file:
+x_theritory_size world.h /^ uint64_t x_theritory_size, y_theritory_size; \/\/rozmiary obszaru zdefiniowanego na serwerze (w theritoriach\/place'ach))$/;" m class:Cworld
+y_theritory_size world.h /^ uint64_t x_theritory_size, y_theritory_size; \/\/rozmiary obszaru zdefiniowanego na serwerze (w theritoriach\/place'ach))$/;" m class:Cworld
+~Ccharacter character.cpp /^Ccharacter::~Ccharacter() {$/;" f class:Ccharacter
+~Job job.cpp /^Job::~Job() {$/;" f class:Job
+~hashwrapper hashlib/hl_hashwrapper.h /^ virtual ~hashwrapper ( void ) { };$/;" f class:hashwrapper
+~sha1wrapper hashlib/hl_sha1wrapper.cpp /^sha1wrapper::~sha1wrapper()$/;" f class:sha1wrapper
+~sha256wrapper hashlib/hl_sha256wrapper.cpp /^sha256wrapper::~sha256wrapper()$/;" f class:sha256wrapper
View
5 world.h
@@ -22,11 +22,12 @@
#include "soul.h"
#include "coordinates.h"
+// global consts
const uint32_t MAX_PLAYERS = 2000;
const uint32_t MAX_WORLDS = 50;
const uint32_t DEFAULT_GRAVITY = 0;
-const uint32_t DEFAULT_THERITORY_X = 1; // X theritory'w w jednej kolumnie world'a.. itd.. ;}
-const uint32_t DEFAULT_THERITORY_Y = 1; // Y theritory w jednym rzedzie world'a (czyli 1x1)
+const uint32_t DEFAULT_THERITORY_X = 1;
+const uint32_t DEFAULT_THERITORY_Y = 1;
// WORLD
class Cworld {

0 comments on commit c58b410

Please sign in to comment.
Something went wrong with that request. Please try again.