28 #ifndef _NANO_SPRITE_H_    29 #define _NANO_SPRITE_H_    45 template<
typename T, T &E>
    57          : m_rect{pos, pos + size}
    67         E.canvas.drawBitmap1(m_rect.
p1.
x, m_rect.
p1.
y, m_rect.
width(), m_rect.
height(), m_bitmap);
    75         E.refreshWorld( m_rect );
    84         m_rect = { p, p + m_rect.
size() };
   103         return { (m_rect.
p1.
x + m_rect.
p2.
x) >> 1, m_rect.
p2.
y  };
   111         return { (m_rect.
p1.
x + m_rect.
p2.
x) >> 1, m_rect.
p1.
y  };
   119         return { m_rect.
p1.
x, (m_rect.
p1.
y + m_rect.
p2.
y) >> 1  };
   127         return { m_rect.
p2.
x, (m_rect.
p1.
y + m_rect.
p2.
y) >> 1  };
   135         return { (m_rect.
p1.
x + m_rect.
p2.
x) >> 1, (m_rect.
p1.
y + m_rect.
p2.
y) >> 1  };
   149     lcdint_t 
x( )
 const { 
return m_rect.
p1.
x; }
   154     lcdint_t 
y( )
 const { 
return m_rect.
p1.
y; }
   158     const uint8_t *m_bitmap;
   165 template<
typename T, T &E>
   188         E.canvas.drawBitmap1(m_pos.x, m_pos.y, m_size.x, m_size.y, m_bitmap);
   196         E.refreshWorld( m_pos.x, m_pos.y,
   197                          m_pos.x + m_size.x - 1, m_pos.y + m_size.y - 1 );
   225         return { m_pos.
x + (m_size.x >> 1), m_pos.y + m_size.y - 1  };
   233         return { m_pos.
x + (m_size.x >> 1), m_pos.y  };
   241         return { m_pos.
x, m_pos.y + (m_size.y>>1)  };
   249         return { m_pos.
x + m_size.x - 1, m_pos.y + (m_size.y>>1)  };
   257         return { m_pos.
x + (m_size.x >> 1), m_pos.y + (m_size.y>>1)  };
   276     lcdint_t 
x( )
 const { 
return m_pos.x; }
   281     lcdint_t 
y( )
 const { 
return m_pos.y; }
   295     const uint8_t *m_bitmap;
 void setBitmap(const uint8_t *bitmap)
 
const NanoPoint & getPosition() const
 
const NanoPoint top() const
 
void moveTo(const NanoPoint &p)
 
void setBitmap(const uint8_t *bitmap)
 
const NanoPoint center() const
 
const NanoPoint bottom() const
 
const NanoPoint right() const
 
const NanoPoint top() const
 
void moveBy(const NanoPoint &p)
 
const NanoPoint right() const
 
NanoSprite(const NanoPoint &pos, const NanoPoint &size, const uint8_t *bitmap)
 
void moveBy(const NanoPoint &p)
 
void moveTo(const NanoPoint &p)
 
const NanoPoint center() const
 
const NanoPoint size() const
 
const NanoPoint bottom() const
 
NanoFixedSprite(const NanoPoint &pos, const NanoPoint &size, const uint8_t *bitmap)
 
const NanoPoint left() const
 
const NanoPoint left() const
 
const NanoPoint & pos() const