My ELEC2645 joystick project Tetris Game NAME: JIANWEI CHEN SID: 200879849
Dependencies: N5110 SDFileSystem mbed
Patterns.h@4:463abe5f5135, 2016-05-05 (annotated)
- Committer:
- cjw851102
- Date:
- Thu May 05 09:18:01 2016 +0000
- Revision:
- 4:463abe5f5135
- Parent:
- 0:12a1972fa0d0
Final version
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
cjw851102 | 4:463abe5f5135 | 1 | /** |
cjw851102 | 4:463abe5f5135 | 2 | @file Patterns.h |
cjw851102 | 4:463abe5f5135 | 3 | @brief Header file containing member functions and variables |
cjw851102 | 4:463abe5f5135 | 4 | @brief Header file patterns pixel settings and funtion to get specific pattern pixel setting |
cjw851102 | 4:463abe5f5135 | 5 | @brief Revision 1.0. |
cjw851102 | 4:463abe5f5135 | 6 | @author JIANWEI CHEN |
cjw851102 | 4:463abe5f5135 | 7 | @date May 2016 |
cjw851102 | 4:463abe5f5135 | 8 | */ |
cjw851102 | 4:463abe5f5135 | 9 | |
cjw851102 | 0:12a1972fa0d0 | 10 | #ifndef PATTERNS_H |
cjw851102 | 0:12a1972fa0d0 | 11 | #define PATTERNS_H |
cjw851102 | 4:463abe5f5135 | 12 | |
cjw851102 | 4:463abe5f5135 | 13 | |
cjw851102 | 0:12a1972fa0d0 | 14 | class Patterns |
cjw851102 | 0:12a1972fa0d0 | 15 | { |
cjw851102 | 0:12a1972fa0d0 | 16 | public: |
cjw851102 | 4:463abe5f5135 | 17 | /** Get pattern pixel setting |
cjw851102 | 4:463abe5f5135 | 18 | * |
cjw851102 | 4:463abe5f5135 | 19 | * @param type - pattern type (0~6) |
cjw851102 | 4:463abe5f5135 | 20 | * @param rotation - pattern rotation (0~3) |
cjw851102 | 4:463abe5f5135 | 21 | * @param y - pattern y co-ordinate (0~6) |
cjw851102 | 4:463abe5f5135 | 22 | * @param x - pattern x co-ordinate (0~6) |
cjw851102 | 4:463abe5f5135 | 23 | * @note (x,y) is the top left corner pixel of a 6x6 square |
cjw851102 | 4:463abe5f5135 | 24 | */ |
cjw851102 | 0:12a1972fa0d0 | 25 | int getPatterns(int type, int rotation, int y, int x); |
cjw851102 | 0:12a1972fa0d0 | 26 | |
cjw851102 | 0:12a1972fa0d0 | 27 | private: |
cjw851102 | 0:12a1972fa0d0 | 28 | |
cjw851102 | 0:12a1972fa0d0 | 29 | }; |
cjw851102 | 0:12a1972fa0d0 | 30 | |
cjw851102 | 0:12a1972fa0d0 | 31 | #endif |