room101/MOTION.HPP

28 lines
468 B
Text
Raw Permalink Normal View History

#ifndef __MOTION_H
#define __MOTION_H
#include "vector.hpp"
#define MOTION_CONSTANT (-1)
#define MOTION_INSTANT ( 0)
typedef struct _Motion
{
int tick;
int count;
Vector pos;
Vector vel;
void (*callback)(struct _Motion*);
} Motion;
void MotionInit(Motion*, float, float, float, int);
void MotionDelta(Motion*, float, float, float, int);
void MotionTick(Motion*);
#endif