ldtypes.cpp

Sat, 16 Mar 2013 03:11:19 +0200

author
Santeri Piippo <crimsondusk64@gmail.com>
date
Sat, 16 Mar 2013 03:11:19 +0200
changeset 14
6d9d8efae2f8
parent 13
3955ff2a7d72
child 17
5606eebd0b90
permissions
-rw-r--r--

this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.

0
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
1 #include "common.h"
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
2 #include "ldtypes.h"
13
3955ff2a7d72 Added logf function to write to message log. Write warnings of unparsable files into the message log.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 11
diff changeset
3 #include "io.h"
0
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
4
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
5 const char* g_saObjTypeNames[] = {
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
6 "unidentified",
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
7 "unknown",
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
8 "empty",
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
9 "comment",
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
10 "subfile",
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
11 "line",
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
12 "triangle",
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
13 "quadrilateral",
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
14 "condline",
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
15 "vector",
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
16 "vertex",
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
17 };
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
18
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
19 // =============================================================================
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
20 // LDObject constructors
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
21 LDObject::LDObject () {
14
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
22 commonInit ();
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
23 }
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
24
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
25 void LDObject::commonInit () {
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
26 qObjListEntry = nullptr;
0
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
27 }
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
28
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
29 LDGibberish::LDGibberish () {
14
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
30 commonInit ();
0
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
31 }
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
32
11
323390a03294 Color gibberish red. Check for line code length for gibberish (must be 1 to be valid)
Santeri Piippo <crimsondusk64@gmail.com>
parents: 0
diff changeset
33 LDGibberish::LDGibberish (str _zContent, str _zReason) {
14
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
34 zContents = _zContent;
11
323390a03294 Color gibberish red. Check for line code length for gibberish (must be 1 to be valid)
Santeri Piippo <crimsondusk64@gmail.com>
parents: 0
diff changeset
35 zReason = _zReason;
14
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
36
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
37 commonInit ();
11
323390a03294 Color gibberish red. Check for line code length for gibberish (must be 1 to be valid)
Santeri Piippo <crimsondusk64@gmail.com>
parents: 0
diff changeset
38 }
323390a03294 Color gibberish red. Check for line code length for gibberish (must be 1 to be valid)
Santeri Piippo <crimsondusk64@gmail.com>
parents: 0
diff changeset
39
0
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
40 LDEmpty::LDEmpty () {
14
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
41 commonInit ();
0
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
42 }
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
43
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
44 LDComment::LDComment () {
14
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
45 commonInit ();
0
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
46 }
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
47
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
48 LDSubfile::LDSubfile () {
14
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
49 commonInit ();
0
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
50 }
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
51
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
52 LDLine::LDLine () {
14
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
53 commonInit ();
0
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
54 }
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
55
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
56 LDTriangle::LDTriangle () {
14
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
57 commonInit ();
0
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
58 }
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
59
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
60 LDQuad::LDQuad () {
14
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
61 commonInit ();
0
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
62 }
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
63
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
64 LDCondLine::LDCondLine () {
14
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
65 commonInit ();
0
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
66 }
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
67
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
68 LDVector::LDVector () {
14
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
69 commonInit ();
0
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
70 }
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
71
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
72 LDVertex::LDVertex () {
14
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
73 commonInit ();
13
3955ff2a7d72 Added logf function to write to message log. Write warnings of unparsable files into the message log.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 11
diff changeset
74 }
3955ff2a7d72 Added logf function to write to message log. Write warnings of unparsable files into the message log.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 11
diff changeset
75
3955ff2a7d72 Added logf function to write to message log. Write warnings of unparsable files into the message log.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 11
diff changeset
76 ulong LDObject::getIndex () {
3955ff2a7d72 Added logf function to write to message log. Write warnings of unparsable files into the message log.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 11
diff changeset
77 if (!g_CurrentFile)
3955ff2a7d72 Added logf function to write to message log. Write warnings of unparsable files into the message log.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 11
diff changeset
78 return -1u;
3955ff2a7d72 Added logf function to write to message log. Write warnings of unparsable files into the message log.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 11
diff changeset
79
3955ff2a7d72 Added logf function to write to message log. Write warnings of unparsable files into the message log.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 11
diff changeset
80 // TODO: shouldn't rely on g_CurrentFile
3955ff2a7d72 Added logf function to write to message log. Write warnings of unparsable files into the message log.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 11
diff changeset
81 for (ulong i = 0; i < g_CurrentFile->objects.size(); ++i) {
3955ff2a7d72 Added logf function to write to message log. Write warnings of unparsable files into the message log.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 11
diff changeset
82 if (g_CurrentFile->objects[i] == this)
3955ff2a7d72 Added logf function to write to message log. Write warnings of unparsable files into the message log.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 11
diff changeset
83 return i;
3955ff2a7d72 Added logf function to write to message log. Write warnings of unparsable files into the message log.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 11
diff changeset
84 }
3955ff2a7d72 Added logf function to write to message log. Write warnings of unparsable files into the message log.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 11
diff changeset
85
3955ff2a7d72 Added logf function to write to message log. Write warnings of unparsable files into the message log.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 11
diff changeset
86 return -1u;
14
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
87 }
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
88
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
89 // =============================================================================
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
90 str LDComment::getContents () {
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
91 return str::mkfmt ("0%s", zText.chars ());
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
92 }
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
93
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
94 str LDLine::getContents () {
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
95 return str::mkfmt ("2 %d %f %f %f %f %f %f", dColor,
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
96 vaCoords[0].x, vaCoords[0].y, vaCoords[0].z,
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
97 vaCoords[1].x, vaCoords[1].y, vaCoords[1].z);
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
98 }
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
99
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
100 str LDTriangle::getContents () {
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
101 return str::mkfmt ("3 %d %f %f %f %f %f %f %f %f %f", dColor,
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
102 vaCoords[0].x, vaCoords[0].y, vaCoords[0].z,
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
103 vaCoords[1].x, vaCoords[1].y, vaCoords[1].z,
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
104 vaCoords[2].x, vaCoords[2].y, vaCoords[2].z);
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
105 }
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
106
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
107 str LDQuad::getContents () {
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
108 // Oh, Jesus.
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
109 return str::mkfmt ("3 %d %f %f %f %f %f %f %f %f %f %f %f %f", dColor,
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
110 vaCoords[0].x, vaCoords[0].y, vaCoords[0].z,
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
111 vaCoords[1].x, vaCoords[1].y, vaCoords[1].z,
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
112 vaCoords[2].x, vaCoords[2].y, vaCoords[2].z,
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
113 vaCoords[3].x, vaCoords[3].y, vaCoords[3].z);
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
114 }
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
115
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
116 str LDCondLine::getContents () {
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
117 return str::mkfmt ("3 %d %f %f %f %f %f %f %f %f %f %f %f %f", dColor,
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
118 vaCoords[0].x, vaCoords[0].y, vaCoords[0].z,
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
119 vaCoords[1].x, vaCoords[1].y, vaCoords[1].z,
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
120 vaControl[0].x, vaControl[0].y, vaControl[0].z,
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
121 vaControl[1].x, vaControl[1].y, vaControl[1].z);
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
122 }
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
123
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
124 str LDGibberish::getContents () {
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
125 return zContents;
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
126 }
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
127
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
128 str LDSubfile::getContents () {
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
129 return str::mkfmt ("1 %d %f %f %f %f %f %f %f %f %f %f %f %f %s", dColor,
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
130 vPosition.x, vPosition.y, vPosition.y,
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
131 faMatrix[0], faMatrix[1], faMatrix[2],
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
132 faMatrix[3], faMatrix[4], faMatrix[5],
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
133 faMatrix[6], faMatrix[7], faMatrix[8],
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
134 zFileName.chars());
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
135 }
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
136
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
137 str LDVector::getContents () {
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
138 return str::mkfmt ("0 !LDFORGE VECTOR"); // TODO
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
139 }
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
140
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
141 str LDVertex::getContents () {
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
142 return "!LDFORGE VERTEX"; // TODO
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
143 }
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
144
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
145 str LDEmpty::getContents () {
6d9d8efae2f8 this thing got its own reinterpret_cast now. :P Added SetContents action for altering an object by contents and reinterpreting it.
Santeri Piippo <crimsondusk64@gmail.com>
parents: 13
diff changeset
146 return str ();
0
c51cce84a9ac Initial commit
Santeri Piippo <crimsondusk64@gmail.com>
parents:
diff changeset
147 }

mercurial