Revision:
2:ce4c7e5ab241
Parent:
1:578d6bbe9f09
diff -r 578d6bbe9f09 -r ce4c7e5ab241 WriterBase.cpp
--- a/WriterBase.cpp	Fri Dec 16 07:14:05 2011 +0000
+++ b/WriterBase.cpp	Thu Dec 22 09:44:29 2011 +0000
@@ -74,24 +74,38 @@
   return true; 
 }
 
-bool olc::WriterBase::readRgb()
+bool olc::WriterBase::readColor()
 {
   if (spaceLeft() < 2) return false;
-  put( (uint8_t)olc::READ_RGB );
+  put( (uint8_t)olc::READ_COLOR );
   return true;  
 }
 
-bool olc::WriterBase::reportRgb(uint8_t r, uint8_t g, uint8_t b)
+bool olc::WriterBase::reportColor(uint8_t c)
 {
   if (spaceLeft() < 4) return false;
-  put( (uint8_t)olc::REPORT_RGB );
-  put( r );
-  put( g );
-  put( b );
+  put( (uint8_t)olc::REPORT_COLOR );
+  put( c );
   return true;
 }
 
-bool olc::WriterBase::bitmapU8(uint8_t *aData, uint8_t aSize) {
+bool olc::WriterBase::reportBufferInSize()
+{
+  if (spaceLeft() < 2) return false;
+  put( (uint8_t)olc::REPORT_BUFFER_IN_SIZE );
+  return true;  
+}
+
+bool olc::WriterBase::bufferInSize(uint16_t aSize) 
+{
+  if (spaceLeft() < 3) return false;
+  put( (uint8_t)olc::BUFFER_IN_SIZE );
+  encodeU16( aSize );
+  return true;
+}
+
+bool olc::WriterBase::bitmapU8(uint8_t *aData, uint8_t aSize) 
+{
   if (spaceLeft() < 2) return false;
   put( (uint8_t)olc::BITMAPU8 );
   put( aSize );