src/ldtypes.cpp

changeset 185
6fea53f1ffc2
parent 183
f1b8cb53d2a2
child 188
4e686b771996
equal deleted inserted replaced
184:fae3bc9ce319 185:6fea53f1ffc2
59 // LDObject constructors 59 // LDObject constructors
60 LDObject::LDObject () { 60 LDObject::LDObject () {
61 qObjListEntry = null; 61 qObjListEntry = null;
62 parent = null; 62 parent = null;
63 m_hidden = false; 63 m_hidden = false;
64 m_selected = false;
64 } 65 }
65 66
66 LDGibberish::LDGibberish (str _zContent, str _zReason) { 67 LDGibberish::LDGibberish (str _zContent, str _zReason) {
67 zContents = _zContent; 68 zContents = _zContent;
68 zReason = _zReason; 69 zReason = _zReason;
614 "edge", 615 "edge",
615 "cyli", 616 "cyli",
616 "disc", 617 "disc",
617 "ndis", 618 "ndis",
618 "ring", 619 "ring",
619 "cone", 620 "con",
620 null 621 null
621 }; 622 };
622 623
623 // ============================================================================= 624 // =============================================================================
624 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 625 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
647 // However, always keep the root at least 2 characters. 648 // However, always keep the root at least 2 characters.
648 short extra = (~frac + ~ringNum + ~root) - 8; 649 short extra = (~frac + ~ringNum + ~root) - 8;
649 root -= min<short> (max<short> (extra, 0), 2); 650 root -= min<short> (max<short> (extra, 0), 2);
650 651
651 // Stick them all together and return the result. 652 // Stick them all together and return the result.
652 return fmt ("%s%s%s%s", prefix.chars(), frac.chars (), root.chars (), ringNum.chars ()); 653 return fmt ("%s%s%s%s.dat", prefix.chars(), frac.chars (), root.chars (), ringNum.chars ());
653 } 654 }
654 655
655 // ============================================================================= 656 // =============================================================================
656 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * 657 // * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
657 // ============================================================================= 658 // =============================================================================

mercurial