-
Notifications
You must be signed in to change notification settings - Fork 1
/
Game8x8Graphics.h
56 lines (44 loc) · 904 Bytes
/
Game8x8Graphics.h
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
44
45
46
47
48
49
50
51
52
53
54
55
/*****************************************************************************
* 8x8ø¹Ï®w.
*
* created by channel
*
* todo list:
*
* note:
****************************************************************************/
#ifndef _GAME8X8GRAPHICS_h
#define _GAME8X8GRAPHICS_h
#if defined(ARDUINO) && ARDUINO >= 100
#include "arduino.h"
#else
#include "WProgram.h"
#endif
#include <Arduino.h>
#include "LedControl.h"
class Game8x8Graphics {
private:
// µe¥¬.
byte canvas[8][8] = {
{ 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 },
};
public:
// ±±¨îMAX7219¨ç¼Æ®w.
LedControl *lc;
// «Øºc¦¡.
Game8x8Graphics();
// §ó·s.
void update();
// ²M°£.
void clearDisplay(byte state);
// ³]©w¹³¯À.
void setPixcls(int row, int col, byte state);
};
#endif