view spe/chara_state9.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 source

#include "chara_state9.h"
#include "tobject.h"

SchedDefineTask(STATE9);

static int
run(SchedTask *smanager, void *rbuf, void *wbuf)
{
    CHARACTER *p = (CHARACTER*)smanager->get_input(rbuf, 0);

    if(p->s <= 2)
    {
	p->s += 0.05;
	p->y -= 12;
	count++;
	DefSpriteEx(54, 16*4, 32*4);
	PutSpriteEx(54, (p->x * 4), (p->y * 4), p->s, p->s, 1);
	p->task = STATE9;
	return 0;
    }
    count++;
    DefSpriteEx(54, 16, 32);
    PutSpriteEx(54, p->x, p->y, p->s, p->s, 1);
    rinkx = p->x;
    rinky = p->y;
    Putenemy(5, rinkx - 16, rinky - 16, 1, 0, chara_state10);
    Putenemy(5, rinkx - 16, rinky - 16, -1, 0, chara_state10);
    p->task = STATE11;
    p->dt1 = 8192;
    return 0;
}