diff spe/SimpleState.cc @ 17:927401604461

add spe object
author koba <koba@cr.ie.u-ryukyu.ac.jp>
date Fri, 17 Dec 2010 04:16:25 +0900
parents
children
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spe/SimpleState.cc	Fri Dec 17 04:16:25 2010 +0900
@@ -0,0 +1,15 @@
+#include "SimpleState.h"
+#include "Character_state.h"
+#include "tobject.h"
+
+SchedDefineTask(SimpleState);
+
+static int
+run(SchedTask *smanager, void *rbuf, void *wbuf)
+{
+    CHARACTER *p = (CHARACTER*)smanager->get_input(rbuf, 0);
+    p = (*p->state)(p);
+    
+    smanager->swap();
+    return 0;
+}