Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- class Character : public GraphElement
- {
- public:
- // position of character
- Point2D pos;
- // character
- char character;
- Character( Point2D t_pos, char t_char, RGB t_fg, RGB t_bg ) :
- pos( t_pos ), character( t_char ), GraphElement( t_fg, t_bg ) {};
- void draw()
- {
- int x = this->pos.x;
- int y = this-> pos.y;
- char ch = this->character;
- int Px=0;
- int Py=0;
- for(int y=0;y<26;y++){
- int riadok=font[ch][y];
- for(int x=0;x<16;x++){
- if(riadok & 1<<x){
- drawPixel((Px+16)-x,Py+y);
- }
- }
- }
- }
- };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement