aboutsummaryrefslogtreecommitdiff
path: root/components.h
diff options
context:
space:
mode:
Diffstat (limited to 'components.h')
-rw-r--r--components.h17
1 files changed, 14 insertions, 3 deletions
diff --git a/components.h b/components.h
index 84cfc54..66304df 100644
--- a/components.h
+++ b/components.h
@@ -5,6 +5,9 @@
#include "asset.h"
#include "rect.h"
+/* Components are POD. If you put a pointer in one of these,
+ * you're a dumb poo poo head. */
+
typedef struct {
int x, y;
} CPosition;
@@ -21,10 +24,18 @@ typedef struct {
int timer;
} CAnimated;
+typedef struct {
+ int life;
+ int vx, vy;
+} CBullet;
+
typedef enum {
- ctype_sprite = 1 << 0,
- ctype_position = 1 << 1,
- ctype_animated = 1 << 2
+ ctype_sprite = 1 << 0,
+ ctype_position = 1 << 1,
+ ctype_animated = 1 << 2,
+ ctype_bullet = 1 << 3,
+ ctype_player_bullet = 1 << 4,
+ ctype_enemy_bullet = 1 << 5
} CType;
#endif