-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathcannon.h
More file actions
38 lines (31 loc) · 728 Bytes
/
cannon.h
File metadata and controls
38 lines (31 loc) · 728 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
/*
*
*/
#ifndef __CANNON_H_
#define __CANNON_H_
#include "rpi_lib/image.h"
#define LOW_THRESHOLD 2000
#define HIGH_THRESHOLD 20000
struct Cannon{
volatile int x;
volatile int y;
volatile int width;
volatile int height;
volatile char isShot;
volatile struct Image image;
};
#define CANNON_IMAGE_WIDTH 13
#define CANNON_IMAGE_HEIGHT 8
enum CANNON_IMAGE_DATA{
CANNON = 0,
CANNON_EXPLOSION = 1,
CANNON_IMAGE_MAX = 2,
};
extern const unsigned int cannon_image_data[CANNON_IMAGE_MAX][CANNON_IMAGE_HEIGHT];
extern const unsigned int cannon_image_width[CANNON_IMAGE_MAX];
extern void InitializeCannon();
extern void ShotCannon();
extern void MoveCannon();
extern void ExplosionCannon();
extern void DrawCannon();
#endif