gearmulator

Emulation of classic VA synths of the late 90s/2000s that are based on Motorola 56300 family DSPs
Log | Files | Refs | Submodules | README | LICENSE

xtLcd.cpp (489B)


      1 #include "xtLcd.h"
      2 
      3 namespace xt
      4 {
      5 	Lcd::Lcd()
      6 	{
      7 		m_lcdData.fill(' ');
      8 	}
      9 
     10 	void Lcd::resetWritePos()
     11 	{
     12 		m_lcdWritePos = 0;
     13 	}
     14 
     15 	bool Lcd::writeCharacter(const char _c)
     16 	{
     17 		if(m_lcdData[m_lcdWritePos] == _c)
     18 		{
     19 			++m_lcdWritePos;
     20 			return false;
     21 		}
     22 		m_lcdData[m_lcdWritePos++] = _c;
     23 		return true;
     24 	}
     25 
     26 	std::string Lcd::toString() const
     27 	{
     28 		const std::string lineA(m_lcdData.data(), 40);
     29 		const std::string lineB(m_lcdData.data() + 40, 40);
     30 		return lineA + '\n' + lineB;
     31 	}
     32 }