-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathobject.h
More file actions
43 lines (33 loc) · 669 Bytes
/
Copy pathobject.h
File metadata and controls
43 lines (33 loc) · 669 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
#pragma once
#include "list.h"
typedef enum {
Spaceship,
Asteroid,
Blast,
} Type;
typedef struct {
float x;
float y;
float r;
} Euclidean;
typedef struct {
Type type;
float speed_limit;
Euclidean position;
Euclidean velocity;
Euclidean acceleration;
struct {
float size;
ALLEGRO_COLOR color;
} structure;
struct {
int no_blast;
int no_accel;
int dead;
} state;
Euclidean mirror;
} Object;
Object* object_new(Type type, Euclidean resolution);
void object_draw(Object* object, Euclidean resolution);
void object_move(Object* o, List* list, Euclidean boundaries);
void object_delete(Object* object);