summaryrefslogtreecommitdiff
path: root/src/task.cc
diff options
context:
space:
mode:
authorJonas Suhr Christensen <jsc@umbraculum.org>2012-02-24 17:17:27 +0100
committerJonas Suhr Christensen <jsc@umbraculum.org>2012-02-24 17:17:27 +0100
commit48cd878e5a0cfaedae93fc515148e784e1534fbd (patch)
treeb66abf9a56bbd5c8545c6d02fd7f53d1415e44f0 /src/task.cc
parent3ab33f728f61b12f85a6067d02610c2b5142a4a5 (diff)
Removed message parsing code to msgparser.
Diffstat (limited to 'src/task.cc')
-rw-r--r--src/task.cc18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/task.cc b/src/task.cc
index 0b948c5..24e94a1 100644
--- a/src/task.cc
+++ b/src/task.cc
@@ -28,3 +28,21 @@
#include "task.h"
TaskList tasklist;
+static int id_count = 0;
+
+int current_id_count() {
+ return id_count;
+}
+
+task_t create_task(std::string title, std::string desc,
+ int x, int y) {
+
+ task_t t;
+ t.x = x;
+ t.y = y;
+ t.title = title;
+ t.desc = desc;
+ t.id = id_count; id_count++;
+
+ return t;
+}