summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEugenio Favalli <elvenprogrammer@gmail.com>2005-01-05 15:39:43 +0000
committerEugenio Favalli <elvenprogrammer@gmail.com>2005-01-05 15:39:43 +0000
commitb1acd70f999fcd981512829cf6100ad9d358d0e6 (patch)
tree612280d20fce53c15160e1765e4202d4f19c5337
parent9978e58ee7d9a15814b939fa8dd42254e16702b2 (diff)
downloadmana-b1acd70f999fcd981512829cf6100ad9d358d0e6.tar.gz
mana-b1acd70f999fcd981512829cf6100ad9d358d0e6.tar.bz2
mana-b1acd70f999fcd981512829cf6100ad9d358d0e6.tar.xz
mana-b1acd70f999fcd981512829cf6100ad9d358d0e6.zip
- Fixing DevCpp project file again
- Started being structure conversion
-rw-r--r--The Mana World.dev16
-rw-r--r--src/being.cpp31
-rw-r--r--src/being.h25
3 files changed, 64 insertions, 8 deletions
diff --git a/The Mana World.dev b/The Mana World.dev
index 03240c71..dbb24349 100644
--- a/The Mana World.dev
+++ b/The Mana World.dev
@@ -20,7 +20,7 @@ ObjectOutput=obj
OverrideOutput=1
OverrideOutputName=tmw.exe
HostApplication=
-Folders=graphic,gui,net,sound
+Folders=graphic,gui,net,resources,sound
CommandLine=
UseCustomMakefile=0
CustomMakefile=
@@ -33,7 +33,7 @@ CompilerSettings=0010001001001000001101
Major=0
Minor=0
Release=8
-Build=778
+Build=785
LanguageID=1033
CharsetID=1252
CompanyName=The Mana World Development Team
@@ -872,20 +872,20 @@ Priority=1000
OverrideBuildCmd=0
BuildCmd=
-[Unit83]
-FileName=src\gui\textbox.cpp
+[Unit84]
+FileName=src\gui\textbox.h
CompileCpp=1
-Folder=tmw
+Folder=gui
Compile=1
Link=1
Priority=1000
OverrideBuildCmd=0
BuildCmd=
-[Unit84]
-FileName=src\gui\textbox.h
+[Unit83]
+FileName=src\gui\textbox.cpp
CompileCpp=1
-Folder=tmw
+Folder=gui
Compile=1
Link=1
Priority=1000
diff --git a/src/being.cpp b/src/being.cpp
index 65eb707e..66d7cea0 100644
--- a/src/being.cpp
+++ b/src/being.cpp
@@ -147,3 +147,34 @@ void empty_path(NODE *node) {
node->path = NULL;
}
}
+
+// Beings restructuration
+
+Being::Being() {
+ id = 0; job = 0;
+ action = 0; frame = 0;
+ path = NULL; speech = NULL; speech_time = 0;
+ tick_time = 0; speed = 150;
+ emotion = 0; emotion_time = 0;
+ text_x = 0; text_y = 0;
+ hair_style = 1; hair_color = 1;
+ weapon = 0;
+ x = 0; y = 0; direction = 0;
+ speech_color = makecol(0, 0, 0);
+}
+
+Being::~Being() {
+ if(path) {
+ PATH_NODE *temp = path;
+ PATH_NODE *next;
+ while (temp) {
+ next = temp->next;
+ delete temp;
+ temp = next;
+ }
+ path = NULL;
+ }
+ if(speech) {
+ free(speech);
+ }
+} \ No newline at end of file
diff --git a/src/being.h b/src/being.h
index 17572951..cc7b3973 100644
--- a/src/being.h
+++ b/src/being.h
@@ -42,6 +42,31 @@ struct PATH_NODE {
PATH_NODE *next;
};
+class Being {
+ public:
+ unsigned int id;
+ unsigned short job;
+ unsigned short x, y;
+ unsigned char direction;
+ unsigned char type;
+ unsigned char action;
+ unsigned char frame;
+ PATH_NODE *path;
+ char *speech;
+ unsigned char speech_time;
+ int speech_color;
+ unsigned short tick_time;
+ unsigned short speed;
+ unsigned char emotion;
+ unsigned char emotion_time;
+ unsigned int text_x, text_y; // temp solution to fix speech position
+ unsigned short hair_style, hair_color;
+ unsigned short weapon;
+
+ Being();
+ Being::~Being();
+};
+
struct NODE {
/**
* Constructor.