about summary refs log tree commit diff stats
path: root/ext/wittle_generator/Panel.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'ext/wittle_generator/Panel.cpp')
-rw-r--r--ext/wittle_generator/Panel.cpp17
1 files changed, 7 insertions, 10 deletions
diff --git a/ext/wittle_generator/Panel.cpp b/ext/wittle_generator/Panel.cpp index 4bf4be7..892d4cc 100644 --- a/ext/wittle_generator/Panel.cpp +++ b/ext/wittle_generator/Panel.cpp
@@ -157,16 +157,11 @@ std::string Panel::Write() {
157 serializer.writeByte(Serializer::Nega); 157 serializer.writeByte(Serializer::Nega);
158 serializer.writeColor(val & 0xF); 158 serializer.writeColor(val & 0xF);
159 } else if (symbol == Decoration::Poly) { 159 } else if (symbol == Decoration::Poly) {
160 serializer.writeByte(Serializer::Poly); 160 if (val & Decoration::Negative) {
161 serializer.writeColor(val & 0xF); 161 serializer.writeByte(Serializer::Ylop);
162 162 } else {
163 long polyshape = (val & 0xFFFF0000) >> 16; 163 serializer.writeByte(Serializer::Poly);
164 if (val & Decoration::Can_Rotate) {
165 polyshape |= (1 << 20);
166 } 164 }
167 serializer.writeLong(polyshape);
168 } else if (symbol == Decoration::Negative) {
169 serializer.writeByte(Serializer::Ylop);
170 serializer.writeColor(val & 0xF); 165 serializer.writeColor(val & 0xF);
171 166
172 long polyshape = (val & 0xFFFF0000) >> 16; 167 long polyshape = (val & 0xFFFF0000) >> 16;
@@ -194,7 +189,9 @@ std::string Panel::Write() {
194 } else { 189 } else {
195 serializer.writeByte(Serializer::DotNone); 190 serializer.writeByte(Serializer::DotNone);
196 } 191 }
197 if (val & Decoration::Gap) { 192 if (val == OPEN) {
193 serializer.writeByte(Serializer::GapFull);
194 } else if (val & Decoration::Gap) {
198 serializer.writeByte(Serializer::GapBreak); 195 serializer.writeByte(Serializer::GapBreak);
199 } else { 196 } else {
200 serializer.writeByte(Serializer::GapNone); 197 serializer.writeByte(Serializer::GapNone);