diff spe/chara_state40.cc @ 18:c330ded6d728

add task file.
author koba <koba@cr.ie.u-ryukyu.ac.jp>
date Fri, 17 Dec 2010 22:18:11 +0900
parents
children f4140672ef9f
line wrap: on
line diff
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/spe/chara_state40.cc	Fri Dec 17 22:18:11 2010 +0900
@@ -0,0 +1,56 @@
+#include "chara_state40.h"
+#include "tobject.h"
+
+SchedDefineTask(STATE40);
+
+static int
+run(SchedTask *smanager, void *rbuf, void *wbuf)
+{
+    CHARACTER *p = (CHARACTER*)smanager->get_input(rbuf, 0);
+    
+    if (enemy_part1->f == FALSE)
+    {
+	Bom(p->x, p->y);
+	p->f = FALSE;
+	p->state = delete_chara;
+	p->collision = noaction;
+	return 0;
+    }
+    if ((rinkf1 == 8) && (p->dt1 % 3 == 1))
+    {
+	if ((p->dt2 < 16))
+	{
+	    p->dt2++;
+	    DefSprite(76, "boss2_rightarm_b", 16, p->dt2, 480, boss);
+	}
+	else
+	{
+	    //                                  rinkf1=9;
+	    return 0;
+	}
+    }
+    if (rinkf1 == 9)
+    {
+	if (p->dt1 % 15 == 1)
+	{
+	    Puttama(8, p->x, p->y);
+	}
+    }
+    if (rinkf1 == 10)
+    {
+	if (p->dt2 != 0)
+	{
+	    p->dt2--;
+	    DefSprite(76, "boss2_rightarm_b", 16, p->dt2, 480, boss);
+	}
+	else
+	{
+	    p->f = FALSE;
+	    p->state = delete_chara;
+	    p->collision = noaction;
+	    //          rinkf1=11;
+	}
+    }
+    p->dt1++;
+    return 0;
+}