view ppe/chara_state1.cc @ 0:4be1ca60a49b default tip

first commit.
author tkaito
date Sat, 05 Feb 2011 02:13:58 +0900
parents
children
line wrap: on
line source

#include "task_base.h"
#include "task_object.h"

SchedDefineTask1(State1, state1);

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

    p->x -= p->vx;
    p->y -= p->vy;

    p->task = STATE1;
    smanager->swap();
    return 0;
}