Nasrun

Dependencies:   mbed

Fork of project_ShipDot by Jirat Nakarit

Committer:
dragondrunk
Date:
Sun Dec 04 05:02:03 2016 +0000
Revision:
22:5bc894988f11
add dotmatrix display (only place ship)

Who changed what in which revision?

UserRevisionLine numberNew contents of line
dragondrunk 22:5bc894988f11 1 /*
dragondrunk 22:5bc894988f11 2 *************************************
dragondrunk 22:5bc894988f11 3 I have some idea to create only three function
dragondrunk 22:5bc894988f11 4 display ship;
dragondrunk 22:5bc894988f11 5 display dot or bomb;
dragondrunk 22:5bc894988f11 6 finally display game interface;
dragondrunk 22:5bc894988f11 7 *************************************
dragondrunk 22:5bc894988f11 8 */
dragondrunk 22:5bc894988f11 9
dragondrunk 22:5bc894988f11 10 #ifndef ColorMbed_H
dragondrunk 22:5bc894988f11 11 #define ColorMbed_H
dragondrunk 22:5bc894988f11 12
dragondrunk 22:5bc894988f11 13 #include "mbed.h"
dragondrunk 22:5bc894988f11 14
dragondrunk 22:5bc894988f11 15 class ColorMbed{
dragondrunk 22:5bc894988f11 16
dragondrunk 22:5bc894988f11 17 public:
dragondrunk 22:5bc894988f11 18
dragondrunk 22:5bc894988f11 19 void init(); // set white_balance
dragondrunk 22:5bc894988f11 20 /*
dragondrunk 22:5bc894988f11 21 display_dot can display one dot on dot matrix
dragondrunk 22:5bc894988f11 22 parameter :
dragondrunk 22:5bc894988f11 23 row : int (1,2,3,...,8)
dragondrunk 22:5bc894988f11 24 column : int (1,2,3,...,8)
dragondrunk 22:5bc894988f11 25 color : {B,G,R}
dragondrunk 22:5bc894988f11 26 */
dragondrunk 22:5bc894988f11 27 void display_dot(int row,int column,int *color);
dragondrunk 22:5bc894988f11 28 /*
dragondrunk 22:5bc894988f11 29 display_ship 1 to 8 such as
dragondrunk 22:5bc894988f11 30 ship 1 is 4 chanal on dot matrix
dragondrunk 22:5bc894988f11 31 ship 2 is 3 chanal on dot matrix
dragondrunk 22:5bc894988f11 32 2 : ship 3 is 2 chanal on dot matrix
dragondrunk 22:5bc894988f11 33 4 : ship 4 is 1 chanal on dot matrix
dragondrunk 22:5bc894988f11 34 fix rgb !!!
dragondrunk 22:5bc894988f11 35 parameter :
dragondrunk 22:5bc894988f11 36 type : int (ship 1..2.3.4)
dragondrunk 22:5bc894988f11 37 row : int (1,2,3,4,...,8)
dragondrunk 22:5bc894988f11 38 column : int (1,2,3,4,...,8)
dragondrunk 22:5bc894988f11 39 */
dragondrunk 22:5bc894988f11 40 void display_ship(int row,int column,int type,int *color);
dragondrunk 22:5bc894988f11 41
dragondrunk 22:5bc894988f11 42 void display_pic(int *pic,int *color);
dragondrunk 22:5bc894988f11 43 /*
dragondrunk 22:5bc894988f11 44 display picture from hexa code color in this function is
dragondrunk 22:5bc894988f11 45 only color and blank
dragondrunk 22:5bc894988f11 46 */
dragondrunk 22:5bc894988f11 47
dragondrunk 22:5bc894988f11 48
dragondrunk 22:5bc894988f11 49
dragondrunk 22:5bc894988f11 50 private :
dragondrunk 22:5bc894988f11 51
dragondrunk 22:5bc894988f11 52 int _power(int number , int power); // power number
dragondrunk 22:5bc894988f11 53 };
dragondrunk 22:5bc894988f11 54
dragondrunk 22:5bc894988f11 55
dragondrunk 22:5bc894988f11 56 #endif