Merge lp:~widelands-dev/widelands/fix_name_collision into lp:widelands

Proposed by Tino
Status: Merged
Merged at revision: 8154
Proposed branch: lp:~widelands-dev/widelands/fix_name_collision
Merge into: lp:widelands
Diff against target: 540 lines (+53/-53)
27 files modified
src/economy/flag.h (+1/-1)
src/economy/portdock.cc (+1/-1)
src/economy/portdock.h (+1/-1)
src/economy/road.h (+1/-1)
src/graphic/game_renderer.cc (+9/-9)
src/graphic/game_renderer.h (+3/-3)
src/logic/map_objects/bob.cc (+1/-1)
src/logic/map_objects/bob.h (+1/-1)
src/logic/map_objects/draw_text.h (+3/-3)
src/logic/map_objects/immovable.cc (+2/-2)
src/logic/map_objects/immovable.h (+3/-3)
src/logic/map_objects/map_object.cc (+4/-4)
src/logic/map_objects/map_object.h (+1/-1)
src/logic/map_objects/tribes/building.cc (+3/-3)
src/logic/map_objects/tribes/building.h (+2/-2)
src/logic/map_objects/tribes/constructionsite.cc (+1/-1)
src/logic/map_objects/tribes/constructionsite.h (+1/-1)
src/logic/map_objects/tribes/dismantlesite.cc (+1/-1)
src/logic/map_objects/tribes/dismantlesite.h (+1/-1)
src/logic/map_objects/tribes/ship.cc (+2/-2)
src/logic/map_objects/tribes/ship.h (+1/-1)
src/logic/map_objects/tribes/soldier.cc (+1/-1)
src/logic/map_objects/tribes/soldier.h (+1/-1)
src/logic/map_objects/tribes/worker.cc (+1/-1)
src/logic/map_objects/tribes/worker.h (+1/-1)
src/wui/mapview.cc (+4/-4)
src/wui/transport_draw.cc (+2/-2)
To merge this branch: bzr merge lp:~widelands-dev/widelands/fix_name_collision
Reviewer Review Type Date Requested Status
Tino Needs Resubmitting
Review via email: mp+309320@code.launchpad.net

Description of the change

It was not possible to compile current trunk on windows, because of a name collision with a MSDN function DrawText : https://msdn.microsoft.com/en-us/library/windows/desktop/dd162498(v=vs.85).aspx

I've renamed the function to WLDrawText, but perhaps there is also a better fix by using namespaces?

To post a comment you must log in.
Revision history for this message
GunChleoc (gunchleoc) wrote :

I think namespace Widelands would be appropriate here, since it's located in logic.

Revision history for this message
GunChleoc (gunchleoc) wrote :

Or we could call it TextToDraw?

Revision history for this message
GunChleoc (gunchleoc) wrote :

Third idea: Move it into the MapObject class, because it's an instruction to them.

Revision history for this message
SirVer (sirver) wrote :

I am all for namespaces! Do not move it into the class, because that tightly couples the units (.h/.cc) files. If it is a separate struct, we can more nimbly move the struct around and have less dependencies.

Revision history for this message
bunnybot (widelandsofficial) wrote :

Continuous integration builds have changed state:

Travis build 1499. State: passed. Details: https://travis-ci.org/widelands/widelands/builds/170705571.
Appveyor build 1342. State: success. Details: https://ci.appveyor.com/project/widelands-dev/widelands/build/_widelands_dev_widelands_fix_name_collision-1342.

Revision history for this message
Tino (tino79) wrote :

Sorry, this is the best i can come up with.

Tried declaring the Widelands namespace in draw_text.h, but then always the enum was invalid (duplicate declaration).
Tried using "enum class DrawText"...

review: Needs Resubmitting
Revision history for this message
GunChleoc (gunchleoc) wrote :

Sounds like this was a *headdesk* excercise :(

@bunnybot merge

Preview Diff

[H/L] Next/Prev Comment, [J/K] Next/Prev File, [N/P] Next/Prev Hunk
1=== modified file 'src/economy/flag.h'
2--- src/economy/flag.h 2016-10-22 11:20:33 +0000
3+++ src/economy/flag.h 2016-10-26 19:44:13 +0000
4@@ -146,7 +146,7 @@
5 void cleanup(EditorGameBase&) override;
6
7 void draw(uint32_t gametime,
8- DrawText draw_text,
9+ TextToDraw draw_text,
10 const Vector2f& point_on_dst,
11 float scale,
12 RenderTarget* dst) override;
13
14=== modified file 'src/economy/portdock.cc'
15--- src/economy/portdock.cc 2016-10-24 14:04:00 +0000
16+++ src/economy/portdock.cc 2016-10-26 19:44:13 +0000
17@@ -141,7 +141,7 @@
18 expedition_bootstrap_->set_economy(e);
19 }
20
21-void PortDock::draw(uint32_t, const DrawText, const Vector2f&, float, RenderTarget*) {
22+void PortDock::draw(uint32_t, const TextToDraw, const Vector2f&, float, RenderTarget*) {
23 // do nothing
24 }
25
26
27=== modified file 'src/economy/portdock.h'
28--- src/economy/portdock.h 2016-10-22 11:20:33 +0000
29+++ src/economy/portdock.h 2016-10-26 19:44:13 +0000
30@@ -97,7 +97,7 @@
31 Flag& base_flag() override;
32 PositionList get_positions(const EditorGameBase&) const override;
33 void draw(uint32_t gametime,
34- DrawText draw_text,
35+ TextToDraw draw_text,
36 const Vector2f& point_on_dst,
37 float scale,
38 RenderTarget* dst) override;
39
40=== modified file 'src/economy/road.h'
41--- src/economy/road.h 2016-10-22 11:20:33 +0000
42+++ src/economy/road.h 2016-10-26 19:44:13 +0000
43@@ -119,7 +119,7 @@
44 void cleanup(EditorGameBase&) override;
45
46 void draw(uint32_t gametime,
47- DrawText draw_text,
48+ TextToDraw draw_text,
49 const Vector2f& point_on_dst,
50 float scale,
51 RenderTarget* dst) override;
52
53=== modified file 'src/graphic/game_renderer.cc'
54--- src/graphic/game_renderer.cc 2016-10-24 20:07:22 +0000
55+++ src/graphic/game_renderer.cc 2016-10-26 19:44:13 +0000
56@@ -100,29 +100,29 @@
57 void draw_objects_for_visible_field(const EditorGameBase& egbase,
58 const FieldsToDraw::Field& field,
59 const float zoom,
60- const DrawText draw_text,
61+ const TextToDraw draw_text,
62 const Player* player,
63 RenderTarget* dst) {
64 BaseImmovable* const imm = field.fcoords.field->get_immovable();
65 if (imm != nullptr && imm->get_positions(egbase).front() == field.fcoords) {
66- DrawText draw_text_for_this_immovable = draw_text;
67+ TextToDraw draw_text_for_this_immovable = draw_text;
68 const Player* owner = imm->get_owner();
69 if (player != nullptr && owner != nullptr && !player->see_all() &&
70 player->is_hostile(*owner)) {
71 draw_text_for_this_immovable =
72- static_cast<DrawText>(draw_text_for_this_immovable & ~DrawText::kStatistics);
73+ static_cast<TextToDraw>(draw_text_for_this_immovable & ~TextToDraw::kStatistics);
74 }
75
76 imm->draw(
77 egbase.get_gametime(), draw_text_for_this_immovable, field.rendertarget_pixel, zoom, dst);
78 }
79 for (Bob* bob = field.fcoords.field->get_first_bob(); bob; bob = bob->get_next_bob()) {
80- DrawText draw_text_for_this_bob = draw_text;
81+ TextToDraw draw_text_for_this_bob = draw_text;
82 const Player* owner = bob->get_owner();
83 if (player != nullptr && owner != nullptr && !player->see_all() &&
84 player->is_hostile(*owner)) {
85 draw_text_for_this_bob =
86- static_cast<DrawText>(draw_text_for_this_bob & ~DrawText::kStatistics);
87+ static_cast<TextToDraw>(draw_text_for_this_bob & ~TextToDraw::kStatistics);
88 }
89 bob->draw(egbase, draw_text_for_this_bob, field.rendertarget_pixel, zoom, dst);
90 }
91@@ -215,7 +215,7 @@
92 const float zoom,
93 const FieldsToDraw& fields_to_draw,
94 const Player* player,
95- const DrawText draw_text,
96+ const TextToDraw draw_text,
97 RenderTarget* dst) {
98 std::vector<FieldOverlayManager::OverlayInfo> overlay_info;
99 for (size_t current_index = 0; current_index < fields_to_draw.size(); ++current_index) {
100@@ -319,7 +319,7 @@
101 const Vector2f& viewpoint,
102 const float zoom,
103 const Widelands::Player& player,
104- const DrawText draw_text,
105+ const TextToDraw draw_text,
106 RenderTarget* dst) {
107 draw(egbase, viewpoint, zoom, draw_text, &player, dst);
108 }
109@@ -327,7 +327,7 @@
110 void GameRenderer::rendermap(const Widelands::EditorGameBase& egbase,
111 const Vector2f& viewpoint,
112 const float zoom,
113- const DrawText draw_text,
114+ const TextToDraw draw_text,
115 RenderTarget* dst) {
116 draw(egbase, viewpoint, zoom, draw_text, nullptr, dst);
117 }
118@@ -335,7 +335,7 @@
119 void GameRenderer::draw(const EditorGameBase& egbase,
120 const Vector2f& viewpoint,
121 const float zoom,
122- const DrawText draw_text,
123+ const TextToDraw draw_text,
124 const Player* player,
125 RenderTarget* dst) {
126 assert(viewpoint.x >= 0); // divisions involving negative numbers are bad
127
128=== modified file 'src/graphic/game_renderer.h'
129--- src/graphic/game_renderer.h 2016-10-22 11:20:33 +0000
130+++ src/graphic/game_renderer.h 2016-10-26 19:44:13 +0000
131@@ -47,7 +47,7 @@
132 const Vector2f& viewpoint,
133 float scale,
134 const Widelands::Player& player,
135- DrawText draw_text,
136+ TextToDraw draw_text,
137 RenderTarget* dst);
138
139 // Renders the map from an omniscient perspective. This is used
140@@ -55,7 +55,7 @@
141 void rendermap(const Widelands::EditorGameBase& egbase,
142 const Vector2f& viewpoint,
143 float scale,
144- DrawText draw_text,
145+ TextToDraw draw_text,
146 RenderTarget* dst);
147
148 private:
149@@ -64,7 +64,7 @@
150 void draw(const Widelands::EditorGameBase& egbase,
151 const Vector2f& viewpoint,
152 float scale,
153- DrawText draw_text,
154+ TextToDraw draw_text,
155 const Widelands::Player* player,
156 RenderTarget* dst);
157
158
159=== modified file 'src/logic/map_objects/bob.cc'
160--- src/logic/map_objects/bob.cc 2016-10-22 11:20:33 +0000
161+++ src/logic/map_objects/bob.cc 2016-10-26 19:44:13 +0000
162@@ -756,7 +756,7 @@
163 /// Note that the current node is actually the node that we are walking to, not
164 /// the the one that we start from.
165 void Bob::draw(const EditorGameBase& egbase,
166- const DrawText&,
167+ const TextToDraw&,
168 const Vector2f& field_on_dst,
169 const float scale,
170 RenderTarget* dst) const {
171
172=== modified file 'src/logic/map_objects/bob.h'
173--- src/logic/map_objects/bob.h 2016-10-22 11:20:33 +0000
174+++ src/logic/map_objects/bob.h 2016-10-26 19:44:13 +0000
175@@ -264,7 +264,7 @@
176 // starting field) in pixel space of 'dst' (including scale). The 'scale' is
177 // required to draw the bob in the right size.
178 virtual void draw(const EditorGameBase&,
179- const DrawText& draw_text,
180+ const TextToDraw& draw_text,
181 const Vector2f& field_on_dst,
182 float scale,
183 RenderTarget* dst) const;
184
185=== modified file 'src/logic/map_objects/draw_text.h'
186--- src/logic/map_objects/draw_text.h 2016-10-24 20:07:22 +0000
187+++ src/logic/map_objects/draw_text.h 2016-10-26 19:44:13 +0000
188@@ -20,14 +20,14 @@
189 #ifndef WL_LOGIC_MAP_OBJECTS_DRAW_TEXT_H
190 #define WL_LOGIC_MAP_OBJECTS_DRAW_TEXT_H
191
192-enum DrawText {
193+enum TextToDraw {
194 kNone = 0,
195 kCensus = 1,
196 kStatistics = 2,
197 };
198
199-inline DrawText operator|(DrawText a, DrawText b) {
200- return static_cast<DrawText>(static_cast<int>(a) | static_cast<int>(b));
201+inline TextToDraw operator|(TextToDraw a, TextToDraw b) {
202+ return static_cast<TextToDraw>(static_cast<int>(a) | static_cast<int>(b));
203 }
204
205 #endif // end of include guard: WL_LOGIC_MAP_OBJECTS_DRAW_TEXT_H
206
207=== modified file 'src/logic/map_objects/immovable.cc'
208--- src/logic/map_objects/immovable.cc 2016-10-25 07:07:14 +0000
209+++ src/logic/map_objects/immovable.cc 2016-10-26 19:44:13 +0000
210@@ -437,7 +437,7 @@
211 }
212
213 void Immovable::draw(uint32_t gametime,
214- const DrawText draw_text,
215+ const TextToDraw draw_text,
216 const Vector2f& point_on_dst,
217 float scale,
218 RenderTarget* dst) {
219@@ -452,7 +452,7 @@
220 }
221
222 void Immovable::draw_construction(const uint32_t gametime,
223- const DrawText draw_text,
224+ const TextToDraw draw_text,
225 const Vector2f& point_on_dst,
226 const float scale,
227 RenderTarget* dst) {
228
229=== modified file 'src/logic/map_objects/immovable.h'
230--- src/logic/map_objects/immovable.h 2016-10-24 20:07:22 +0000
231+++ src/logic/map_objects/immovable.h 2016-10-26 19:44:13 +0000
232@@ -100,7 +100,7 @@
233 // the point for the hotspot of the animation and 'scale' determines how big
234 // the immovable will be plotted.
235 virtual void draw(uint32_t gametime,
236- DrawText draw_text,
237+ TextToDraw draw_text,
238 const Vector2f& point_on_dst,
239 float scale,
240 RenderTarget* dst) = 0;
241@@ -222,7 +222,7 @@
242 void cleanup(EditorGameBase&) override;
243 void act(Game&, uint32_t data) override;
244 void draw(uint32_t gametime,
245- DrawText draw_text,
246+ TextToDraw draw_text,
247 const Vector2f& point_on_dst,
248 float scale,
249 RenderTarget* dst) override;
250@@ -301,7 +301,7 @@
251 private:
252 void increment_program_pointer();
253 void draw_construction(uint32_t gametime,
254- DrawText draw_text,
255+ TextToDraw draw_text,
256 const Vector2f& point_on_dst,
257 float scale,
258 RenderTarget* dst);
259
260=== modified file 'src/logic/map_objects/map_object.cc'
261--- src/logic/map_objects/map_object.cc 2016-10-23 12:59:11 +0000
262+++ src/logic/map_objects/map_object.cc 2016-10-26 19:44:13 +0000
263@@ -445,13 +445,13 @@
264 egbase.objects().remove(*this);
265 }
266
267-void MapObject::do_draw_info(const DrawText& draw_text,
268+void MapObject::do_draw_info(const TextToDraw& draw_text,
269 const std::string& census,
270 const std::string& statictics,
271 const Vector2f& field_on_dst,
272 float scale,
273 RenderTarget* dst) const {
274- if (draw_text == DrawText::kNone) {
275+ if (draw_text == TextToDraw::kNone) {
276 return;
277 }
278
279@@ -468,11 +468,11 @@
280
281 // Rounding guarantees that text aligns with pixels to avoid subsampling.
282 const Vector2f census_pos = round(field_on_dst - Vector2f(0, 48) * scale).cast<float>();
283- if (draw_text & DrawText::kCensus) {
284+ if (draw_text & TextToDraw::kCensus) {
285 dst->blit(census_pos, rendered_census_info, BlendMode::UseAlpha, UI::Align::kCenter);
286 }
287
288- if (draw_text & DrawText::kStatistics && !statictics.empty()) {
289+ if (draw_text & TextToDraw::kStatistics && !statictics.empty()) {
290 const Vector2f statistics_pos =
291 round(census_pos + Vector2f(0, rendered_census_info->height() / 2.f + 10 * scale))
292 .cast<float>();
293
294=== modified file 'src/logic/map_objects/map_object.h'
295--- src/logic/map_objects/map_object.h 2016-10-22 11:20:33 +0000
296+++ src/logic/map_objects/map_object.h 2016-10-26 19:44:13 +0000
297@@ -406,7 +406,7 @@
298 virtual void cleanup(EditorGameBase&);
299
300 /// Draws census and statistics on screen
301- void do_draw_info(const DrawText& draw_text,
302+ void do_draw_info(const TextToDraw& draw_text,
303 const std::string& census,
304 const std::string& statictics,
305 const Vector2f& field_on_dst,
306
307=== modified file 'src/logic/map_objects/tribes/building.cc'
308--- src/logic/map_objects/tribes/building.cc 2016-10-22 11:20:33 +0000
309+++ src/logic/map_objects/tribes/building.cc 2016-10-26 19:44:13 +0000
310@@ -588,7 +588,7 @@
311
312
313 void Building::draw(uint32_t gametime,
314- const DrawText draw_text,
315+ const TextToDraw draw_text,
316 const Vector2f& point_on_dst,
317 const float scale,
318 RenderTarget* dst) {
319@@ -606,12 +606,12 @@
320 Draw overlay help strings when enabled.
321 ===============
322 */
323-void Building::draw_info(const DrawText draw_text,
324+void Building::draw_info(const TextToDraw draw_text,
325 const Vector2f& point_on_dst,
326 const float scale,
327 RenderTarget* dst) {
328 const std::string statistics_string =
329- (draw_text & DrawText::kStatistics) ? info_string(InfoStringFormat::kStatistics) : "";
330+ (draw_text & TextToDraw::kStatistics) ? info_string(InfoStringFormat::kStatistics) : "";
331 do_draw_info(draw_text, info_string(InfoStringFormat::kCensus), statistics_string, point_on_dst,
332 scale, dst);
333 }
334
335=== modified file 'src/logic/map_objects/tribes/building.h'
336--- src/logic/map_objects/tribes/building.h 2016-10-22 11:20:33 +0000
337+++ src/logic/map_objects/tribes/building.h 2016-10-26 19:44:13 +0000
338@@ -312,11 +312,11 @@
339 void act(Game&, uint32_t data) override;
340
341 void draw(uint32_t gametime,
342- DrawText draw_text,
343+ TextToDraw draw_text,
344 const Vector2f& point_on_dst,
345 float scale,
346 RenderTarget* dst) override;
347- void draw_info(DrawText draw_text, const Vector2f& point_on_dst, float scale, RenderTarget* dst);
348+ void draw_info(TextToDraw draw_text, const Vector2f& point_on_dst, float scale, RenderTarget* dst);
349
350 virtual void create_options_window(InteractiveGameBase&, UI::Window*& registry) = 0;
351
352
353=== modified file 'src/logic/map_objects/tribes/constructionsite.cc'
354--- src/logic/map_objects/tribes/constructionsite.cc 2016-10-22 11:20:33 +0000
355+++ src/logic/map_objects/tribes/constructionsite.cc 2016-10-26 19:44:13 +0000
356@@ -298,7 +298,7 @@
357 ===============
358 */
359 void ConstructionSite::draw(uint32_t gametime,
360- DrawText draw_text,
361+ TextToDraw draw_text,
362 const Vector2f& point_on_dst,
363 float scale,
364 RenderTarget* dst) {
365
366=== modified file 'src/logic/map_objects/tribes/constructionsite.h'
367--- src/logic/map_objects/tribes/constructionsite.h 2016-10-22 11:20:33 +0000
368+++ src/logic/map_objects/tribes/constructionsite.h 2016-10-26 19:44:13 +0000
369@@ -115,7 +115,7 @@
370 static void wares_queue_callback(Game&, WaresQueue*, DescriptionIndex, void* data);
371
372 void draw(uint32_t gametime,
373- DrawText draw_text,
374+ TextToDraw draw_text,
375 const Vector2f& point_on_dst,
376 float scale,
377 RenderTarget* dst) override;
378
379=== modified file 'src/logic/map_objects/tribes/dismantlesite.cc'
380--- src/logic/map_objects/tribes/dismantlesite.cc 2016-10-22 11:20:33 +0000
381+++ src/logic/map_objects/tribes/dismantlesite.cc 2016-10-26 19:44:13 +0000
382@@ -213,7 +213,7 @@
383 ===============
384 */
385 void DismantleSite::draw(uint32_t gametime,
386- const DrawText draw_text,
387+ const TextToDraw draw_text,
388 const Vector2f& point_on_dst,
389 float scale,
390 RenderTarget* dst) {
391
392=== modified file 'src/logic/map_objects/tribes/dismantlesite.h'
393--- src/logic/map_objects/tribes/dismantlesite.h 2016-10-22 11:20:33 +0000
394+++ src/logic/map_objects/tribes/dismantlesite.h 2016-10-26 19:44:13 +0000
395@@ -90,7 +90,7 @@
396 void create_options_window(InteractiveGameBase&, UI::Window*& registry) override;
397
398 void draw(uint32_t gametime,
399- DrawText draw_text,
400+ TextToDraw draw_text,
401 const Vector2f& point_on_dst,
402 float scale,
403 RenderTarget* dst) override;
404
405=== modified file 'src/logic/map_objects/tribes/ship.cc'
406--- src/logic/map_objects/tribes/ship.cc 2016-10-24 14:04:00 +0000
407+++ src/logic/map_objects/tribes/ship.cc 2016-10-26 19:44:13 +0000
408@@ -940,7 +940,7 @@
409 }
410
411 void Ship::draw(const EditorGameBase& egbase,
412- const DrawText& draw_text,
413+ const TextToDraw& draw_text,
414 const Vector2f& field_on_dst,
415 const float scale,
416 RenderTarget* dst) const {
417@@ -948,7 +948,7 @@
418
419 // Show ship name and current activity
420 std::string statistics_string = "";
421- if (draw_text & DrawText::kStatistics) {
422+ if (draw_text & TextToDraw::kStatistics) {
423 switch (ship_state_) {
424 case (ShipStates::kTransport):
425 /** TRANSLATORS: This is a ship state */
426
427=== modified file 'src/logic/map_objects/tribes/ship.h'
428--- src/logic/map_objects/tribes/ship.h 2016-10-24 14:04:00 +0000
429+++ src/logic/map_objects/tribes/ship.h 2016-10-26 19:44:13 +0000
430@@ -240,7 +240,7 @@
431
432 protected:
433 void draw(const EditorGameBase&,
434- const DrawText& draw_text,
435+ const TextToDraw& draw_text,
436 const Vector2f& field_on_dst,
437 float scale,
438 RenderTarget* dst) const override;
439
440=== modified file 'src/logic/map_objects/tribes/soldier.cc'
441--- src/logic/map_objects/tribes/soldier.cc 2016-10-22 11:24:18 +0000
442+++ src/logic/map_objects/tribes/soldier.cc 2016-10-26 19:44:13 +0000
443@@ -440,7 +440,7 @@
444 * Draw this soldier. This basically draws him as a worker, but add health points
445 */
446 void Soldier::draw(const EditorGameBase& game,
447- const DrawText&,
448+ const TextToDraw&,
449 const Vector2f& field_on_dst,
450 const float scale,
451 RenderTarget* dst) const {
452
453=== modified file 'src/logic/map_objects/tribes/soldier.h'
454--- src/logic/map_objects/tribes/soldier.h 2016-10-22 11:20:33 +0000
455+++ src/logic/map_objects/tribes/soldier.h 2016-10-26 19:44:13 +0000
456@@ -209,7 +209,7 @@
457
458 /// Draw this soldier
459 void draw(const EditorGameBase&,
460- const DrawText& draw_text,
461+ const TextToDraw& draw_text,
462 const Vector2f& point_on_dst,
463 float scale,
464 RenderTarget* dst) const override;
465
466=== modified file 'src/logic/map_objects/tribes/worker.cc'
467--- src/logic/map_objects/tribes/worker.cc 2016-10-22 11:20:33 +0000
468+++ src/logic/map_objects/tribes/worker.cc 2016-10-26 19:44:13 +0000
469@@ -2535,7 +2535,7 @@
470 * Draw the worker, taking the carried ware into account.
471 */
472 void Worker::draw(const EditorGameBase& egbase,
473- const DrawText&,
474+ const TextToDraw&,
475 const Vector2f& field_on_dst,
476 const float scale,
477 RenderTarget* dst) const {
478
479=== modified file 'src/logic/map_objects/tribes/worker.h'
480--- src/logic/map_objects/tribes/worker.h 2016-10-22 11:20:33 +0000
481+++ src/logic/map_objects/tribes/worker.h 2016-10-26 19:44:13 +0000
482@@ -181,7 +181,7 @@
483 const float scale,
484 RenderTarget* dst) const;
485 void draw(const EditorGameBase&,
486- const DrawText& draw_text,
487+ const TextToDraw& draw_text,
488 const Vector2f& field_on_dst,
489 float scale,
490 RenderTarget* dst) const override;
491
492=== modified file 'src/wui/mapview.cc'
493--- src/wui/mapview.cc 2016-10-24 20:56:32 +0000
494+++ src/wui/mapview.cc 2016-10-26 19:44:13 +0000
495@@ -131,20 +131,20 @@
496 return;
497 }
498
499- DrawText draw_text = DrawText::kNone;
500+ TextToDraw draw_text = TextToDraw::kNone;
501 auto display_flags = intbase().get_display_flags();
502 if (display_flags & InteractiveBase::dfShowCensus) {
503- draw_text = draw_text | DrawText::kCensus;
504+ draw_text = draw_text | TextToDraw::kCensus;
505 }
506 if (display_flags & InteractiveBase::dfShowStatistics) {
507- draw_text = draw_text | DrawText::kStatistics;
508+ draw_text = draw_text | TextToDraw::kStatistics;
509 }
510
511 if (upcast(InteractivePlayer const, interactive_player, &intbase())) {
512 renderer_->rendermap(
513 egbase, viewpoint_, zoom_, interactive_player->player(), draw_text, &dst);
514 } else {
515- renderer_->rendermap(egbase, viewpoint_, zoom_, static_cast<DrawText>(draw_text), &dst);
516+ renderer_->rendermap(egbase, viewpoint_, zoom_, static_cast<TextToDraw>(draw_text), &dst);
517 }
518 }
519
520
521=== modified file 'src/wui/transport_draw.cc'
522--- src/wui/transport_draw.cc 2016-10-24 14:07:28 +0000
523+++ src/wui/transport_draw.cc 2016-10-26 19:44:13 +0000
524@@ -27,7 +27,7 @@
525 namespace Widelands {
526
527 void Flag::draw(uint32_t gametime,
528- const DrawText,
529+ const TextToDraw,
530 const Vector2f& point_on_dst,
531 float scale,
532 RenderTarget* dst) {
533@@ -54,6 +54,6 @@
534 }
535
536 /** The road is drawn by the terrain renderer via marked fields. */
537-void Road::draw(uint32_t, const DrawText, const Vector2f&, float, RenderTarget*) {
538+void Road::draw(uint32_t, const TextToDraw, const Vector2f&, float, RenderTarget*) {
539 }
540 }

Subscribers

People subscribed via source and target branches

to status/vote changes: