Revision 5b98becf

View differences:

bricks.h
1
const uint16_t bricks[] PROGMEM = { 
2
	/* +----+
3
	 * |    |
4
	 * | ## |
5
	 * | ## |
6
	 * |    |
7
	 * +----+ */
8
	0b0000011001100000, 
9

  
10
	/* +----+
11
	 * |    |
12
	 * | #  |
13
	 * | ## |
14
	 * |  # |
15
	 * +----+ */
16
	0b0000010001100010,
17

  
18
	/* +----+
19
	 * |    |
20
	 * |  # |
21
	 * | ## |
22
	 * | #  |
23
	 * +----+ */
24
	0b0000001001100100, 
25

  
26
	/* +----+
27
	 * |    |
28
	 * | #  |
29
	 * | ## |
30
	 * | #  |
31
	 * +----+ */
32
	0b0000010001100100, 
33

  
34
	/* +----+
35
	 * | #  |
36
	 * | #  |
37
	 * | #  |
38
	 * | #  |
39
	 * +----+ */
40
	0b0100010001000100, 
41

  
42
	/* +----+
43
	 * |    |
44
	 * | #  |
45
	 * | #  |
46
	 * | ## |
47
	 * +----+ */
48
	0b0000010001000110, 
49

  
50
	/* +----+
51
	 * |    |
52
	 * |  # |
53
	 * |  # |
54
	 * | ## |
55
	 * +----+ */
56
	0b0000001000100110
57
};
main.c
1
#define F_CPU 16000000L                                                                                                                                                  
1
#define F_CPU 16000000L
2

  
2 3
#include <inttypes.h>
3 4
#include <avr/io.h>
4 5
#include <util/delay.h>
5 6
#include <avr/interrupt.h>
6 7
#include <avr/pgmspace.h>
8
#include "bricks.h"
7 9

  
8 10
//let's make our lives easier :)
9 11
#define PORT_(port) PORT ## port
......
86 88
volatile uint16_t lines[90] = {0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0,0 };
87 89
volatile player_t player[NUMBER_OF_PLAYERS];
88 90

  
89
const uint16_t bricks[] PROGMEM = { 
90
	/* +----+
91
	 * |    |
92
	 * | ## |
93
	 * | ## |
94
	 * |    |
95
	 * +----+ */
96
	0b0000011001100000, 
97

  
98
	/* +----+
99
	 * |    |
100
	 * | #  |
101
	 * | ## |
102
	 * |  # |
103
	 * +----+ */
104
	0b0000010001100010,
105

  
106
	/* +----+
107
	 * |    |
108
	 * |  # |
109
	 * | ## |
110
	 * | #  |
111
	 * +----+ */
112
	0b0000001001100100, 
113

  
114
	/* +----+
115
	 * |    |
116
	 * | #  |
117
	 * | ## |
118
	 * | #  |
119
	 * +----+ */
120
	0b0000010001100100, 
121

  
122
	/* +----+
123
	 * | #  |
124
	 * | #  |
125
	 * | #  |
126
	 * | #  |
127
	 * +----+ */
128
	0b0100010001000100, 
129

  
130
	/* +----+
131
	 * |    |
132
	 * | #  |
133
	 * | #  |
134
	 * | ## |
135
	 * +----+ */
136
	0b0000010001000110, 
137

  
138
	/* +----+
139
	 * |    |
140
	 * |  # |
141
	 * |  # |
142
	 * | ## |
143
	 * +----+ */
144
	0b0000001000100110
145
};
146 91
volatile uint8_t keypressCounter = 0;
147 92

  
148 93
int main(){

Also available in: Unified diff