shithub: musw

ref: bad1338d12dce1c8d9a3a2cf6b16476cd910e6f7
dir: /fns.h/

View raw version
#define HZ2MS(hz)	(1000/(hz))

/*
 * alloc
 */
void *emalloc(ulong);
void *erealloc(void*, ulong);
//Image *eallocimage(Display*, Rectangle, ulong, int, ulong);

/*
 * physics
 */
void integrate(GameState*, double, double);
void integrateu(Universe*, double, double);

/*
 * nanosec
 */
uvlong nanosec(void);

/*
 * pack
 */
int pack(uchar*, int, char*, ...);
int unpack(uchar*, int, char*, ...);

/*
 * lobby
 */
Lobby *newlobby(void);
void dellobby(Lobby*);

/*
 * party
 */
void inittheparty(void);
Party *newparty(Player[2]);
void delparty(Party*);
void addparty(Party*);

/*
 * universe
 */
Universe *newuniverse(void);
void deluniverse(Universe*);
void inituniverse(Universe*);

/*
 *	sprite
 */
Sprite *newsprite(Image*, Point, Rectangle, int, ulong);
Sprite *readsprite(char*, Point, Rectangle, int, ulong);
void delsprite(Sprite*);