Merge lp:~luke-jr/armagetronad/armagetronad-map-zone-visuals into lp:~armagetronad-dev/armagetronad/trunk-armagetronad-work
- armagetronad-map-zone-visuals
- Merge into trunk-armagetronad-work
Proposed by
Luke-Jr
Status: | Work in progress |
---|---|
Proposed branch: | lp:~luke-jr/armagetronad/armagetronad-map-zone-visuals |
Merge into: | lp:~armagetronad-dev/armagetronad/trunk-armagetronad-work |
Diff against target: | None lines |
To merge this branch: | bzr merge lp:~luke-jr/armagetronad/armagetronad-map-zone-visuals |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Manuel Moos | Needs Fixing | ||
Review via email: mp+4037@code.launchpad.net |
Commit message
Description of the change
To post a comment you must log in.
Revision history for this message
Luke-Jr (luke-jr) wrote : | # |
How does it hurt? If it's just compatibility, the safest route would be to block it in the DTD if possible.
Revision history for this message
Manuel Moos (z-man) wrote : | # |
It's just ugly, both visually and technically :) Visuals should not jump around like that, it takes the player's focus away from actually important things. And on the technical side, the number of segments IS an integer.
And yeah, I should have complained about that in the previous merge where the network sync for that was introduced already. My bad. Luckily, at this point, with no release containing the code, it's perfectly fine to switch the network type to an integer.
Preview Diff
[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1 | === added file 'resource/proto/AATeam/map-0.3.2-prealpha1.dtd' | |||
2 | --- resource/proto/AATeam/map-0.3.2-prealpha1.dtd 1970-01-01 00:00:00 +0000 | |||
3 | +++ resource/proto/AATeam/map-0.3.2-prealpha1.dtd 2009-02-28 18:38:10 +0000 | |||
4 | @@ -0,0 +1,179 @@ | |||
5 | 1 | <!-- version="0.3.2-prealpha1" --> | ||
6 | 2 | <!ELEMENT Resource (Map)> | ||
7 | 3 | |||
8 | 4 | <!ATTLIST Resource | ||
9 | 5 | type (aamap) "aamap" | ||
10 | 6 | name CDATA #REQUIRED | ||
11 | 7 | version CDATA "1.0" | ||
12 | 8 | author CDATA "Anonymous" | ||
13 | 9 | category CDATA "unsorted" | ||
14 | 10 | comissioner CDATA #IMPLIED | ||
15 | 11 | > | ||
16 | 12 | |||
17 | 13 | <!ELEMENT Map (Settings?, World)> | ||
18 | 14 | |||
19 | 15 | <!ELEMENT Settings (Setting*)> | ||
20 | 16 | <!ELEMENT Setting EMPTY> | ||
21 | 17 | <!ATTLIST Setting name CDATA #REQUIRED> | ||
22 | 18 | <!ATTLIST Setting value CDATA #REQUIRED> | ||
23 | 19 | |||
24 | 20 | <!-- ATM, a map contain only one Field --> | ||
25 | 21 | <!ELEMENT World (Field)> | ||
26 | 22 | <!-- a field | ||
27 | 23 | - may have an axes declared | ||
28 | 24 | - need at least one spawn | ||
29 | 25 | - need at least one wall --> | ||
30 | 26 | <!ELEMENT Field (Axes?, Ownership?, (Spawn | Wall | Monitor | Zone | Zone_v1 )*)> | ||
31 | 27 | |||
32 | 28 | <!ELEMENT Axes (Axis*)> | ||
33 | 29 | <!ELEMENT Ownership (TeamOwnership*)> | ||
34 | 30 | <!ELEMENT Spawn EMPTY> | ||
35 | 31 | <!ELEMENT Wall (Point+) > | ||
36 | 32 | <!ELEMENT Point EMPTY> | ||
37 | 33 | <!ELEMENT Axis EMPTY> | ||
38 | 34 | <!ELEMENT Zone ((ShapeCircle | ShapePolygon), (Enter | Inside | Leave | Outside)+ ) > | ||
39 | 35 | |||
40 | 36 | <!ATTLIST Map version CDATA #REQUIRED> | ||
41 | 37 | |||
42 | 38 | <!ATTLIST Field logicalBox (true | false) "true"> | ||
43 | 39 | |||
44 | 40 | <!ATTLIST Axes number CDATA "4"> | ||
45 | 41 | <!ATTLIST Axes normalize (true | false) "true"> | ||
46 | 42 | |||
47 | 43 | <!ATTLIST Spawn x CDATA #REQUIRED> | ||
48 | 44 | <!ATTLIST Spawn y CDATA #REQUIRED> | ||
49 | 45 | <!ATTLIST Spawn xdir CDATA #IMPLIED> | ||
50 | 46 | <!ATTLIST Spawn ydir CDATA #IMPLIED> | ||
51 | 47 | <!ATTLIST Spawn angle CDATA #IMPLIED> | ||
52 | 48 | <!ATTLIST Spawn length CDATA "1.0"> | ||
53 | 49 | |||
54 | 50 | <!ATTLIST Wall height CDATA #IMPLIED> | ||
55 | 51 | |||
56 | 52 | <!ATTLIST Point x CDATA #REQUIRED> | ||
57 | 53 | <!ATTLIST Point y CDATA #REQUIRED> | ||
58 | 54 | |||
59 | 55 | <!ATTLIST Axis xdir CDATA #IMPLIED> | ||
60 | 56 | <!ATTLIST Axis ydir CDATA #IMPLIED> | ||
61 | 57 | <!ATTLIST Axis angle CDATA #IMPLIED> | ||
62 | 58 | <!ATTLIST Axis length CDATA "1.0"> | ||
63 | 59 | |||
64 | 60 | |||
65 | 61 | <!ATTLIST Zone name CDATA ""> | ||
66 | 62 | |||
67 | 63 | <!ELEMENT Monitor (OnOver | OnUnder | InRange | OutsideRange)+ > | ||
68 | 64 | <!ATTLIST Monitor name CDATA #REQUIRED> | ||
69 | 65 | <!ATTLIST Monitor init CDATA "0.0"> | ||
70 | 66 | <!ATTLIST Monitor drift CDATA "0.0"> | ||
71 | 67 | <!ATTLIST Monitor low CDATA "0.0"> | ||
72 | 68 | <!ATTLIST Monitor high CDATA "1.0"> | ||
73 | 69 | |||
74 | 70 | <!ELEMENT OnOver (EffectGroup | ZoneInfluence | MonitorInfluence)+ > | ||
75 | 71 | <!ATTLIST OnOver value CDATA #REQUIRED> | ||
76 | 72 | |||
77 | 73 | <!ELEMENT OnUnder (EffectGroup | ZoneInfluence | MonitorInfluence)+ > | ||
78 | 74 | <!ATTLIST OnUnder value CDATA #REQUIRED> | ||
79 | 75 | |||
80 | 76 | <!ELEMENT InRange (EffectGroup | ZoneInfluence | MonitorInfluence)+ > | ||
81 | 77 | <!ATTLIST InRange low CDATA #REQUIRED> | ||
82 | 78 | <!ATTLIST InRange high CDATA #REQUIRED> | ||
83 | 79 | |||
84 | 80 | <!ELEMENT OutsideRange (EffectGroup | ZoneInfluence | MonitorInfluence)+ > | ||
85 | 81 | <!ATTLIST OutsideRange low CDATA #REQUIRED> | ||
86 | 82 | <!ATTLIST OutsideRange high CDATA #REQUIRED> | ||
87 | 83 | |||
88 | 84 | |||
89 | 85 | <!ELEMENT ShapeCircle (Point, Color?)> | ||
90 | 86 | <!ATTLIST ShapeCircle bottom CDATA "0.0"> | ||
91 | 87 | <!ATTLIST ShapeCircle scale CDATA "1.0"> | ||
92 | 88 | <!ATTLIST ShapeCircle height CDATA "5.0"> | ||
93 | 89 | <!ATTLIST ShapeCircle growth CDATA #IMPLIED> | ||
94 | 90 | <!ATTLIST ShapeCircle rotation CDATA "0.0"> | ||
95 | 91 | <!ATTLIST ShapeCircle segments CDATA #IMPLIED> | ||
96 | 92 | <!ATTLIST ShapeCircle seglength CDATA #IMPLIED> | ||
97 | 93 | <!ATTLIST ShapeCircle radius CDATA "1.0"> | ||
98 | 94 | |||
99 | 95 | <!ELEMENT ShapePolygon (Point, Color, Point+)> | ||
100 | 96 | <!ATTLIST ShapePolygon bottom CDATA "0.0"> | ||
101 | 97 | <!ATTLIST ShapePolygon scale CDATA "1.0"> | ||
102 | 98 | <!ATTLIST ShapePolygon height CDATA "5.0"> | ||
103 | 99 | <!ATTLIST ShapePolygon growth CDATA #IMPLIED> | ||
104 | 100 | <!ATTLIST ShapePolygon rotation CDATA "0.0"> | ||
105 | 101 | |||
106 | 102 | <!ELEMENT Color EMPTY> | ||
107 | 103 | <!ATTLIST Color red CDATA "1.0"> | ||
108 | 104 | <!ATTLIST Color green CDATA "0.0"> | ||
109 | 105 | <!ATTLIST Color blue CDATA "0.0"> | ||
110 | 106 | <!ATTLIST Color alpha CDATA "0.7"> | ||
111 | 107 | <!ATTLIST Color hexCode CDATA #IMPLIED> | ||
112 | 108 | <!ATTLIST Color name CDATA #IMPLIED> | ||
113 | 109 | |||
114 | 110 | |||
115 | 111 | <!ELEMENT Enter (EffectGroup+) > | ||
116 | 112 | <!ELEMENT Inside (EffectGroup+) > | ||
117 | 113 | <!ELEMENT Leave (EffectGroup+) > | ||
118 | 114 | <!ELEMENT Outside (EffectGroup+) > | ||
119 | 115 | |||
120 | 116 | <!ELEMENT EffectGroup (User)> | ||
121 | 117 | <!ATTLIST EffectGroup owners CDATA #IMPLIED> | ||
122 | 118 | <!ATTLIST EffectGroup teamOwners CDATA #IMPLIED> | ||
123 | 119 | |||
124 | 120 | <!ELEMENT User (Target | MonitorInfluence | ZoneInfluence)+ > | ||
125 | 121 | <!ATTLIST User user (all | owner | ownerTeam | allButOwner | allButTeamOwner | anotherTeammate) "all" > | ||
126 | 122 | <!ATTLIST User positive (true | false | ignore) "ignore" > | ||
127 | 123 | <!ATTLIST User marked (true | false | ignore) "ignore" > | ||
128 | 124 | |||
129 | 125 | |||
130 | 126 | <!ELEMENT Target (Effect)+ > | ||
131 | 127 | <!ATTLIST Target target (self | teammate | team | all | allButSelf | | ||
132 | 128 | another | | ||
133 | 129 | owner | ownerTeam | ownerTeamTeammate | anyDead | | ||
134 | 130 | allDead | anotherTeammateDead | anotherNotTeammateDead | | ||
135 | 131 | singleDeadOwner | ||
136 | 132 | ) "self" > | ||
137 | 133 | <!-- | ||
138 | 134 | <!ATTLIST Target target (self | teammate | team | all | allButSelf | | ||
139 | 135 | allButTeam | another | anotherTeam | anotherTeammate | | ||
140 | 136 | anotherNotTeammate | owner | ownerTeam | ownerTeamTeammate | anyDead | | ||
141 | 137 | allDead | AnotherTeammateDead | anotherNotTeammateDead) "self" > | ||
142 | 138 | --> | ||
143 | 139 | <!ATTLIST Target count CDATA "-1"> | ||
144 | 140 | |||
145 | 141 | |||
146 | 142 | <!ELEMENT Effect EMPTY> | ||
147 | 143 | <!ATTLIST Effect effect (win | death | point | brakerecharge | | ||
148 | 144 | rubberrecharge | acceleration | spawnplayer | setting ) "death" > | ||
149 | 145 | <!ATTLIST Effect count CDATA "-1"> | ||
150 | 146 | <!ATTLIST Effect description CDATA #IMPLIED> | ||
151 | 147 | <!ATTLIST Effect score CDATA "1"> <!-- only for point --> | ||
152 | 148 | <!ATTLIST Effect settingName CDATA #IMPLIED> <!-- only for setting --> | ||
153 | 149 | <!ATTLIST Effect settingValue CDATA #IMPLIED><!-- only for setting --> | ||
154 | 150 | <!ATTLIST Effect value CDATA "0"> <!-- only for acceleration atm, but should be for nearly all --> | ||
155 | 151 | |||
156 | 152 | <!ELEMENT MonitorInfluence EMPTY> | ||
157 | 153 | <!ATTLIST MonitorInfluence name CDATA #IMPLIED> | ||
158 | 154 | <!ATTLIST MonitorInfluence marked (true | false | ignore) "ignore"> | ||
159 | 155 | <!ATTLIST MonitorInfluence influence CDATA #IMPLIED> | ||
160 | 156 | <!ATTLIST MonitorInfluence influenceSlide CDATA "0.0"> <!-- deprecated as of rev 8042 --> | ||
161 | 157 | <!ATTLIST MonitorInfluence influenceAdd CDATA "0.0"> <!-- deprecated as of rev 8042 --> | ||
162 | 158 | <!ATTLIST MonitorInfluence influenceSet CDATA "0.0"> <!-- deprecated as of rev 8042 --> | ||
163 | 159 | |||
164 | 160 | <!ELEMENT ZoneInfluence (Rotation | Scale | Point | Color)+ > | ||
165 | 161 | <!ATTLIST ZoneInfluence name CDATA #IMPLIED> | ||
166 | 162 | |||
167 | 163 | <!ELEMENT Rotation EMPTY> | ||
168 | 164 | <!ATTLIST Rotation rotation CDATA #IMPLIED> | ||
169 | 165 | <!ATTLIST Rotation rotationAngle CDATA "0.0"> <!-- deprecated as of rev 8042 --> | ||
170 | 166 | <!ATTLIST Rotation rotationSpeed CDATA "0.0"> <!-- deprecated as of rev 8042 --> | ||
171 | 167 | |||
172 | 168 | <!ELEMENT Scale EMPTY> | ||
173 | 169 | <!ATTLIST Scale scale CDATA "1.0"> | ||
174 | 170 | |||
175 | 171 | <!ELEMENT TeamOwnership EMPTY> | ||
176 | 172 | <!ATTLIST TeamOwnership teamId CDATA #REQUIRED> | ||
177 | 173 | <!ATTLIST TeamOwnership playerId CDATA #IMPLIED> | ||
178 | 174 | |||
179 | 175 | <!ELEMENT Zone_v1 (ShapeCircle) > | ||
180 | 176 | <!ATTLIST Zone_v1 effect (win | death | fortress ) "death" > | ||
181 | 177 | |||
182 | 178 | |||
183 | 179 | |||
184 | 0 | 180 | ||
185 | === added file 'resource/proto/flyingzones.aamap.xml' | |||
186 | --- resource/proto/flyingzones.aamap.xml 1970-01-01 00:00:00 +0000 | |||
187 | +++ resource/proto/flyingzones.aamap.xml 2009-02-28 18:38:43 +0000 | |||
188 | @@ -0,0 +1,48 @@ | |||
189 | 1 | <?xml version="1.0" encoding="UTF-8" standalone="no"?> | ||
190 | 2 | <!DOCTYPE Resource SYSTEM "AATeam/map-0.3.2-prealpha1.dtd"> | ||
191 | 3 | <Resource type="aamap" name="flyingzones" version="0.0.1" author="Luke-Jr" category="_TEST"> | ||
192 | 4 | <Map version="2"> | ||
193 | 5 | <World> | ||
194 | 6 | <Field> | ||
195 | 7 | <Spawn x="255" y="50" xdir="0" ydir="1" /> | ||
196 | 8 | <Spawn x="245" y="450" xdir="0" ydir="-1" /> | ||
197 | 9 | <Spawn x="50" y="245" xdir="1" ydir="0" /> | ||
198 | 10 | <Spawn x="450" y="255" xdir="-1" ydir="0" /> | ||
199 | 11 | |||
200 | 12 | <Spawn x="305" y="100" xdir="0" ydir="1" /> | ||
201 | 13 | <Spawn x="195" y="400" xdir="0" ydir="-1" /> | ||
202 | 14 | <Spawn x="100" y="195" xdir="1" ydir="0" /> | ||
203 | 15 | <Spawn x="400" y="305" xdir="-1" ydir="0" /> | ||
204 | 16 | |||
205 | 17 | <Spawn x="205" y="100" xdir="0" ydir="1" /> | ||
206 | 18 | <Spawn x="295" y="400" xdir="0" ydir="-1" /> | ||
207 | 19 | <Spawn x="100" y="295" xdir="1" ydir="0" /> | ||
208 | 20 | <Spawn x="400" y="205" xdir="-1" ydir="0" /> | ||
209 | 21 | |||
210 | 22 | <Wall> | ||
211 | 23 | <Point x="0" y="0" /> | ||
212 | 24 | <Point x="0" y="500" /> | ||
213 | 25 | <Point x="500" y="500" /> | ||
214 | 26 | <Point x="500" y="0" /> | ||
215 | 27 | <Point x="0" y="0" /> | ||
216 | 28 | </Wall> | ||
217 | 29 | |||
218 | 30 | <Zone> | ||
219 | 31 | <ShapeCircle radius="100;-1" bottom="-1;0;0.01" height="-0.05;.1;.05" segments="3;0.3" seglength="1.1;-0.01"> | ||
220 | 32 | <Point x="250" y="250"/> | ||
221 | 33 | <Color red="1" green="0" blue="0"/> | ||
222 | 34 | </ShapeCircle> | ||
223 | 35 | <Enter> | ||
224 | 36 | <EffectGroup> | ||
225 | 37 | <User> | ||
226 | 38 | <Target> | ||
227 | 39 | <Effect count="0" effect="win"/> | ||
228 | 40 | </Target> | ||
229 | 41 | </User> | ||
230 | 42 | </EffectGroup> | ||
231 | 43 | </Enter> | ||
232 | 44 | </Zone> | ||
233 | 45 | </Field> | ||
234 | 46 | </World> | ||
235 | 47 | </Map> | ||
236 | 48 | </Resource> | ||
237 | 0 | 49 | ||
238 | === modified file 'src/tron/gParser.cpp' | |||
239 | --- src/tron/gParser.cpp 2009-02-26 22:15:59 +0000 | |||
240 | +++ src/tron/gParser.cpp 2009-02-28 07:48:33 +0000 | |||
241 | @@ -740,6 +740,34 @@ | |||
242 | 740 | shape->setRotation2( tpRotation ); | 740 | shape->setRotation2( tpRotation ); |
243 | 741 | } | 741 | } |
244 | 742 | 742 | ||
245 | 743 | if (myxmlHasProp(cur, "segments")) { | ||
246 | 744 | string str = string(myxmlGetProp(cur, "segments")); | ||
247 | 745 | tPolynomial tpSegments; | ||
248 | 746 | tpSegments.parse(str); | ||
249 | 747 | shape->setSegments( tpSegments ); | ||
250 | 748 | } | ||
251 | 749 | |||
252 | 750 | if (myxmlHasProp(cur, "seglength")) { | ||
253 | 751 | string str = string(myxmlGetProp(cur, "seglength")); | ||
254 | 752 | tPolynomial tpSegLength; | ||
255 | 753 | tpSegLength.parse(str); | ||
256 | 754 | shape->setSegLength( tpSegLength ); | ||
257 | 755 | } | ||
258 | 756 | |||
259 | 757 | if (myxmlHasProp(cur, "bottom")) { | ||
260 | 758 | string str = string(myxmlGetProp(cur, "bottom")); | ||
261 | 759 | tPolynomial tpBottom; | ||
262 | 760 | tpBottom.parse(str); | ||
263 | 761 | shape->setBottom( tpBottom ); | ||
264 | 762 | } | ||
265 | 763 | |||
266 | 764 | if (myxmlHasProp(cur, "height")) { | ||
267 | 765 | string str = string(myxmlGetProp(cur, "height")); | ||
268 | 766 | tPolynomial tpHeight; | ||
269 | 767 | tpHeight.parse(str); | ||
270 | 768 | shape->setHeight( tpHeight ); | ||
271 | 769 | } | ||
272 | 770 | |||
273 | 743 | cur = cur->xmlChildrenNode; | 771 | cur = cur->xmlChildrenNode; |
274 | 744 | while ( cur != NULL) { | 772 | while ( cur != NULL) { |
275 | 745 | if (!xmlStrcmp(cur->name, (const xmlChar *)"text") || !xmlStrcmp(cur->name, (const xmlChar *)"comment")) {} | 773 | if (!xmlStrcmp(cur->name, (const xmlChar *)"text") || !xmlStrcmp(cur->name, (const xmlChar *)"comment")) {} |
276 | 746 | 774 | ||
277 | === modified file 'src/tron/zone/zShape.cpp' | |||
278 | --- src/tron/zone/zShape.cpp 2009-02-27 20:57:31 +0000 | |||
279 | +++ src/tron/zone/zShape.cpp 2009-02-28 18:38:10 +0000 | |||
280 | @@ -163,8 +163,16 @@ | |||
281 | 163 | setColor(state.get<rColor>("color")); | 163 | setColor(state.get<rColor>("color")); |
282 | 164 | if (state.isset("rotation")) | 164 | if (state.isset("rotation")) |
283 | 165 | setRotation2( state.get<tPolynomial>("rotation") ); | 165 | setRotation2( state.get<tPolynomial>("rotation") ); |
284 | 166 | if (state.isset("segments")) | ||
285 | 167 | setSegments( state.get<tPolynomial>("segments") ); | ||
286 | 168 | if (state.isset("seglength")) | ||
287 | 169 | setSegLength( state.get<tPolynomial>("seglength") ); | ||
288 | 166 | if (state.isset("scale")) | 170 | if (state.isset("scale")) |
289 | 167 | setScale( state.get<tFunction>("scale") ); | 171 | setScale( state.get<tFunction>("scale") ); |
290 | 172 | if (state.isset("bottom")) | ||
291 | 173 | setBottom( state.get<tPolynomial>("bottom") ); | ||
292 | 174 | if (state.isset("height")) | ||
293 | 175 | setHeight( state.get<tPolynomial>("height") ); | ||
294 | 168 | } | 176 | } |
295 | 169 | 177 | ||
296 | 170 | REAL zShape::calcDistanceNear(tCoord & p) { | 178 | REAL zShape::calcDistanceNear(tCoord & p) { |
297 | @@ -204,10 +212,42 @@ | |||
298 | 204 | } | 212 | } |
299 | 205 | } | 213 | } |
300 | 206 | 214 | ||
301 | 215 | void zShape::setSegments(const tPolynomial & s) { | ||
302 | 216 | if(segments_ == s) | ||
303 | 217 | return; | ||
304 | 218 | segments_ = s; | ||
305 | 219 | if (sn_GetNetState() != nCLIENT) | ||
306 | 220 | RequestSync(); | ||
307 | 221 | } | ||
308 | 222 | |||
309 | 223 | void zShape::setSegLength(const tPolynomial & s) { | ||
310 | 224 | if(seglength_ == s) | ||
311 | 225 | return; | ||
312 | 226 | seglength_ = s; | ||
313 | 227 | if (sn_GetNetState() != nCLIENT) | ||
314 | 228 | RequestSync(); | ||
315 | 229 | } | ||
316 | 230 | |||
317 | 207 | void zShape::setScale(const tFunction & s){ | 231 | void zShape::setScale(const tFunction & s){ |
318 | 208 | scale_ = s; | 232 | scale_ = s; |
319 | 209 | } | 233 | } |
320 | 210 | 234 | ||
321 | 235 | void zShape::setBottom(const tPolynomial & p) { | ||
322 | 236 | if(bottom_ == p) | ||
323 | 237 | return; | ||
324 | 238 | bottom_ = p; | ||
325 | 239 | if (sn_GetNetState() != nCLIENT) | ||
326 | 240 | RequestSync(); | ||
327 | 241 | } | ||
328 | 242 | |||
329 | 243 | void zShape::setHeight(const tPolynomial & p) { | ||
330 | 244 | if(height_ == p) | ||
331 | 245 | return; | ||
332 | 246 | height_ = p; | ||
333 | 247 | if (sn_GetNetState() != nCLIENT) | ||
334 | 248 | RequestSync(); | ||
335 | 249 | } | ||
336 | 250 | |||
337 | 211 | void zShape::setGrowth(REAL growth) { | 251 | void zShape::setGrowth(REAL growth) { |
338 | 212 | REAL s = scale_(lasttime_ - referencetime_); | 252 | REAL s = scale_(lasttime_ - referencetime_); |
339 | 213 | scale_.SetSlope(growth); | 253 | scale_.SetSlope(growth); |
340 | @@ -280,7 +320,7 @@ | |||
341 | 280 | 320 | ||
342 | 281 | REAL zShape::GetEffectiveSegmentLength() const { | 321 | REAL zShape::GetEffectiveSegmentLength() const { |
343 | 282 | if (seglength_.Len()) | 322 | if (seglength_.Len()) |
345 | 283 | return int( seglength_.evaluate(lastTime) ); | 323 | return seglength_.evaluate(lastTime); |
346 | 284 | return sz_zoneSegLength; | 324 | return sz_zoneSegLength; |
347 | 285 | } | 325 | } |
348 | 286 | 326 | ||
349 | 287 | 327 | ||
350 | === modified file 'src/tron/zone/zShape.h' | |||
351 | --- src/tron/zone/zShape.h 2009-02-27 20:50:40 +0000 | |||
352 | +++ src/tron/zone/zShape.h 2009-02-28 07:48:33 +0000 | |||
353 | @@ -57,9 +57,13 @@ | |||
354 | 57 | void setPosY(const tFunction &y); | 57 | void setPosY(const tFunction &y); |
355 | 58 | virtual | 58 | virtual |
356 | 59 | void setRotation2(const tPolynomial & r); | 59 | void setRotation2(const tPolynomial & r); |
357 | 60 | virtual void setSegments(const tPolynomial &); | ||
358 | 61 | virtual void setSegLength(const tPolynomial &); | ||
359 | 60 | 62 | ||
360 | 61 | virtual | 63 | virtual |
361 | 62 | void setScale(const tFunction &s); | 64 | void setScale(const tFunction &s); |
362 | 65 | virtual void setBottom(const tPolynomial &); | ||
363 | 66 | virtual void setHeight(const tPolynomial &); | ||
364 | 63 | void setColor(const rColor &c); | 67 | void setColor(const rColor &c); |
365 | 64 | 68 | ||
366 | 65 | void setColorNow(const rColor &c); | 69 | void setColorNow(const rColor &c); |
367 | @@ -68,7 +72,11 @@ | |||
368 | 68 | tFunction getPosX() {return posx_;}; | 72 | tFunction getPosX() {return posx_;}; |
369 | 69 | tFunction getPosY() {return posy_;}; | 73 | tFunction getPosY() {return posy_;}; |
370 | 70 | tPolynomial getRotation2() { return rotation2; }; | 74 | tPolynomial getRotation2() { return rotation2; }; |
371 | 75 | tPolynomial getSegments() { return segments_; }; | ||
372 | 76 | tPolynomial getSegLength() { return seglength_; }; | ||
373 | 71 | tFunction getScale() {return scale_;}; | 77 | tFunction getScale() {return scale_;}; |
374 | 78 | tPolynomial getBottom() { return bottom_; }; | ||
375 | 79 | tPolynomial getHeight() { return height_; }; | ||
376 | 72 | rColor getColor() {return color_;}; | 80 | rColor getColor() {return color_;}; |
377 | 73 | 81 | ||
378 | 74 | REAL GetEffectiveBottom() const; | 82 | REAL GetEffectiveBottom() const; |
Nice. However, I don't think time dependant segment count is a good thing to have. The transitions just look wrong. Can we get rid of that and just have it a constant integer?