Original author: Pierre Sarrazin. Preserve upstream GPLv3-or-later and file-specific notices. Source: http://sarrazip.com/dev/coco-planes-0.1.0.tar.gz Archive SHA-256: 29191e6ba225965caa637ee726e1189639dc7fcdf2b68310fb93fbffd56c9c52
26 lines
436 B
C
26 lines
436 B
C
#include "Sprite.h"
|
|
|
|
#include "PreShiftedBitmap.h"
|
|
|
|
#include <assert.h>
|
|
|
|
|
|
void
|
|
Sprite_init(Sprite *s, const struct PreShiftedBitmap *bitmap)
|
|
{
|
|
assert(s);
|
|
assert(bitmap);
|
|
assert(bitmap->height > 0);
|
|
assert(bitmap->height <= MAX_BITMAP_HEIGHT);
|
|
|
|
s->active = TRUE;
|
|
s->x = 0;
|
|
s->y = 0;
|
|
s->dx = 0;
|
|
s->dy = 0;
|
|
s->bm = bitmap;
|
|
s->h = bitmap->height;
|
|
s->bitmapIndex = 0;
|
|
s->timeToLive = 0;
|
|
}
|