view spe/chara_state20.cc @ 60:cfd42ee2ad28

change makefile, spe/task. adjust scale api. worked on ps3-ppe.
author yutaka@localhost.localdomain
date Sun, 06 Feb 2011 17:16:43 +0900
parents f4140672ef9f
children
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;
}