view ppe/chara_state20.cc @ 64:07bc996c8e49

fix t_dandy on ps3.
author koba <koba@cr.ie.u-ryukyu.ac.jp>
date Fri, 11 Feb 2011 18:20:30 +0900
parents 978097c6427a
children f27a6af6514c
line wrap: on
line source

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

SchedDefineTask1(State20, state20);

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

    p->x += p->vx;
    p->y += p->vy;
    p->vy -= 0.5;
    p->vy += 0.4;

    p->state_task = STATE20;
    smanager->swap();
    return 0;
}