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.cpp14
1 files changed, 12 insertions, 2 deletions
diff --git a/ext/wittle_generator/Panel.cpp b/ext/wittle_generator/Panel.cpp index 54c7283..125636f 100644 --- a/ext/wittle_generator/Panel.cpp +++ b/ext/wittle_generator/Panel.cpp
@@ -159,11 +159,21 @@ std::string Panel::Write() {
159 } else if (symbol == Decoration::Poly) { 159 } else if (symbol == Decoration::Poly) {
160 serializer.writeByte(Serializer::Poly); 160 serializer.writeByte(Serializer::Poly);
161 serializer.writeColor(val & 0xF); 161 serializer.writeColor(val & 0xF);
162 // TODO: write polyshape 162
163 long polyshape = (val & 0xFFFF0000) >> 16;
164 if (val & Decoration::Can_Rotate) {
165 polyshape |= (1 << 20);
166 }
167 serializer.writeLong(polyshape);
163 } else if (symbol == Decoration::Negative) { 168 } else if (symbol == Decoration::Negative) {
164 serializer.writeByte(Serializer::Ylop); 169 serializer.writeByte(Serializer::Ylop);
165 serializer.writeColor(val & 0xF); 170 serializer.writeColor(val & 0xF);
166 // TODO: write polyshape 171
172 long polyshape = (val & 0xFFFF0000) >> 16;
173 if (val & Decoration::Can_Rotate) {
174 polyshape |= (1 << 20);
175 }
176 serializer.writeLong(polyshape);
167 } else { 177 } else {
168 serializer.writeByte(Serializer::Nonce); 178 serializer.writeByte(Serializer::Nonce);
169 } 179 }