35
|
1 #include <string.h>
|
33
|
2 #include "task_object.h"
|
|
3 #include "../ObjectType.h"
|
|
4
|
|
5 void
|
|
6 DefSprite(int number, const char *name, float w, float h, int color, ObjDataPtr obj)
|
|
7 {
|
|
8 obj->type = Def;
|
|
9 obj->number = number;
|
35
|
10 strcpy(obj->name, name);
|
33
|
11 obj->w = w;
|
|
12 obj->h = h;
|
|
13 obj->color = color;
|
|
14 }
|
|
15
|
|
16
|
|
17 void
|
|
18 DefSpriteEx(int number, short middlex, short middley, ObjDataPtr obj)
|
|
19 {
|
|
20 obj->type = DefEx;
|
|
21 obj->number = number;
|
|
22 obj->middlex = middlex;
|
|
23 obj->middley = middley;
|
|
24 }
|
|
25
|
|
26
|
|
27 void
|
|
28 PutSprite(int zorder, short x, short y, int number, ObjDataPtr obj)
|
|
29 {
|
|
30 obj->type = Put;
|
|
31 obj->zorder = zorder;
|
|
32 obj->x = x;
|
|
33 obj->y = y;
|
|
34 obj->number = number;
|
|
35 }
|
|
36
|
|
37
|
|
38 void
|
|
39 PutSpriteEx(int number, int x, int y, float scalex, float scaley, float angle, ObjDataPtr obj)
|
|
40 {
|
|
41 obj->type = PutEx;
|
|
42 obj->number = number;
|
|
43 obj->x = x;
|
|
44 obj->y = y;
|
|
45 obj->scalex = scalex;
|
|
46 obj->scaley = scaley;
|
|
47 obj->angle = angle;
|
|
48 }
|