shithub: dormer

ref: c40d66e369235ec021af570553b89bd101a42109
dir: /sprite.c/

View raw version
#include <u.h>
#include <libc.h>
#include <draw.h>
#include <stdio.h>
#include "dormer.h"

Sprite*
mksprite(Canvas *c, char *path)
{
	c->spritev[c->si].image = readimage(display, open(path, OREAD), 0);
	Sprite *s = &c->spritev[c->si++];
	return s;
}

void
mvsprite(Sprite *s, int x, int y)
{
	s->x = x;
	s->y = y;
}