Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1074353 into lp:widelands

2014-07-12 Thread GunChleoc
The last 2 commits are NOCOM(#sirver) comments that need attention.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1074353/+merge/221095
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1074353.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1074353 into lp:widelands

2014-07-12 Thread GunChleoc
The proposal to merge lp:~widelands-dev/widelands/bug-1074353 into lp:widelands 
has been updated.

Description changed to:

This is in a mergeable state now, although more work needs to be done, as 
commented in the source code (comments are in lua_map.cc and format_help.lua).

The remaining issues in this bug: 
https://bugs.launchpad.net/widelands/+bug/1074353 have been shifted to new bug 
reports, so it can be closed after merging.

The 3 other related bugs have been fixed and can also be closed.

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1074353/+merge/221095
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1074353/+merge/221095
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1074353.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1339861 into lp:widelands

2014-07-12 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1339861 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1339861 in widelands: "Remove the "Military settings" option"
  https://bugs.launchpad.net/widelands/+bug/1339861

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1339861/+merge/226570

Deleted MilitaryBox from wui
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1339861/+merge/226570
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1339861 into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/map_information into lp:widelands

2014-07-12 Thread SirVer
SirVer has proposed merging lp:~widelands-dev/widelands/map_information into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/map_information/+merge/226572

Suggested submit message:

-
- Add a stand alone tool logic/map_info that can render minimaps. 
The upload of maps on the homepage is broken right now. This was triggered 
through the one-world refactoring, but it is due to the homepage not using 
Widelands code, but reimplementing everything (including minimap generation) in 
python from scratch. This second implementation broke. This tool should help to 
consolidate code paths. I am investigating using boost python for binding to 
python, so that this can be turned in a python library directly.
- Fixes a bug in minimap rendering code: software rendering was sometimes using 
the wrong colors.
- Refactor to minimap rendering to not depend on wui.
- Minor refactorings.
-


-- 
https://code.launchpad.net/~widelands-dev/widelands/map_information/+merge/226572
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/map_information into lp:widelands.
=== modified file 'src/game_io/game_preload_data_packet.cc'
--- src/game_io/game_preload_data_packet.cc	2014-04-18 12:43:49 +
+++ src/game_io/game_preload_data_packet.cc	2014-07-12 12:35:28 +
@@ -114,12 +114,11 @@
 		return;
 	}
 	if (ipl != nullptr) {
-		MiniMapRenderer mmr;
-		const uint32_t flags = MiniMap::Owner | MiniMap::Bldns | MiniMap::Terrn;
+		const MiniMapLayer flags = MiniMapLayer::Owner | MiniMapLayer::Building | MiniMapLayer::Terrain;
 		const Point& vp = ipl->get_viewpoint();
 		std::unique_ptr< ::StreamWrite> sw(fs.OpenStreamWrite(MINIMAP_FILENAME));
 		if (sw.get() != nullptr) {
-			mmr.write_minimap_image(game, &ipl->player(), vp, flags, sw.get());
+			write_minimap_image(game, &ipl->player(), vp, flags, sw.get());
 			sw->Flush();
 		}
 	}

=== modified file 'src/graphic/colormap.cc'
--- src/graphic/colormap.cc	2013-09-23 20:30:35 +
+++ src/graphic/colormap.cc	2014-07-12 12:35:28 +
@@ -19,6 +19,7 @@
 
 #include "graphic/colormap.h"
 
+#include 
 #include 
 #include 
 #include 
@@ -38,13 +39,9 @@
 			int32_t shade = (j < 128) ? j : (j - 256);
 			shade = 256 + 2 * shade;
 
-			int32_t r = (palette[i].r * shade) >> 8;
-			int32_t g = (palette[i].g * shade) >> 8;
-			int32_t b = (palette[i].b * shade) >> 8;
-
-			if (r > 255) r = 255;
-			if (g > 255) g = 255;
-			if (b > 255) b = 255;
+			const uint32_t r = std::min((palette[i].r * shade) >> 8, 255);
+			const uint32_t g = std::min((palette[i].g * shade) >> 8, 255);
+			const uint32_t b = std::min((palette[i].b * shade) >> 8, 255);
 
 			const Uint32 value =
 SDL_MapRGB(&const_cast(format), r, g, b);

=== modified file 'src/graphic/colormap.h'
--- src/graphic/colormap.h	2014-07-05 16:41:51 +
+++ src/graphic/colormap.h	2014-07-12 12:35:28 +
@@ -22,10 +22,23 @@
 
 #include 
 
+#include "graphic/color.h"
+
 /**
  * Colormap contains a palette and lookup table for use with ground textures.
 */
 class Colormap {
+public:
+	Colormap (const SDL_Color &, const SDL_PixelFormat & fmt);
+	~Colormap ();
+
+	// Returns the palette of this colormap (256 entries of RGB Colors);
+	SDL_Color * get_palette() {return palette;}
+
+	// Returns the internally calculated colormap used in the renderer.
+	void * get_colormap () const {return colormap;}
+
+private:
 	SDL_Color palette[256];
 
 	/// maps 8 bit color and brightness value to the shaded color.
@@ -33,14 +46,6 @@
 	/// less shades would greatly reduce the size of this table, and thus
 	/// improve memory cache impact inside the renderer.
 	void * colormap;
-
-public:
-	Colormap (const SDL_Color &, const SDL_PixelFormat & fmt);
-	~Colormap ();
-
-	SDL_Color * get_palette() {return palette;}
-
-	void * get_colormap () const {return colormap;}
 };
 
 #endif  // end of include guard: WL_GRAPHIC_COLORMAP_H

=== modified file 'src/graphic/graphic.cc'
--- src/graphic/graphic.cc	2014-07-05 14:39:48 +
+++ src/graphic/graphic.cc	2014-07-12 12:35:28 +
@@ -80,13 +80,12 @@
 {
 	ImageTransformations::initialize();
 
-	FileRead fr;
 #ifndef _WIN32
-	fr.Open(*g_fs, "pics/wl-ico-128.png");
+	const std::string icon_name = "pics/wl-ico-128.png";
 #else
-	fr.Open(*g_fs, "pics/wl-ico-32.png");
+	const std::string icon_name = "pics/wl-ico-32.png";
 #endif
-	SDL_Surface * s = IMG_Load_RW(SDL_RWFromMem(fr.Data(0), fr.GetSize()), 1);
+	SDL_Surface* s = load_image_as_sdl_surface(icon_name, g_fs);
 	SDL_WM_SetIcon(s, nullptr);
 	SDL_FreeSurface(s);
 }

=== modified file 'src/graphic/render/minimaprenderer.cc'
--- src/graphic/render/minimaprenderer.cc	2014-07-03 19:26:30 +
+++ src/graphic/render/minimaprenderer.cc	2014-07-12 12:35:28 +
@@ -36,7 +36,6 @@
 #include "logic/world/world.h"
 #include "wui/mapviewpixelconstants.h"
 #include "wui/mapviewpixelfunctions.h"
-#include "wui/minimap.h

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/tibor-ai4 into lp:widelands

2014-07-12 Thread SirVer
Review: Needs Fixing

It annoys me telling you the same things again (like not including SDL_types.h 
which I think I did two times before or removing the Default AI comment) 
but I will do it one more time. This time I did it as inline comments, so that 
it will not get lost in the review process. Please fix this so that we can 
merge.
-- 
https://code.launchpad.net/~widelands-dev/widelands/tibor-ai4/+merge/226029
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/tibor-ai4.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/world-stringfix into lp:widelands

2014-07-12 Thread SirVer
Review: Approve


-- 
https://code.launchpad.net/~widelands-dev/widelands/world-stringfix/+merge/226426
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/world-stringfix.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/world-stringfix into lp:widelands

2014-07-12 Thread noreply
The proposal to merge lp:~widelands-dev/widelands/world-stringfix into 
lp:widelands has been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/world-stringfix/+merge/226426
-- 
https://code.launchpad.net/~widelands-dev/widelands/world-stringfix/+merge/226426
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/world-stringfix.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/rtl-reverse-gui into lp:widelands

2014-07-12 Thread noreply
The proposal to merge lp:~widelands-dev/widelands/rtl-reverse-gui into 
lp:widelands has been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/rtl-reverse-gui/+merge/220863
-- 
https://code.launchpad.net/~widelands-dev/widelands/rtl-reverse-gui/+merge/220863
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/rtl-reverse-gui.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1339861 into lp:widelands

2014-07-12 Thread SirVer
Review: Approve

Oversight on my part. Thanks for catching this. 
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1339861/+merge/226570
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1339861.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1339861 into lp:widelands

2014-07-12 Thread noreply
The proposal to merge lp:~widelands-dev/widelands/bug-1339861 into lp:widelands 
has been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1339861/+merge/226570
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1339861/+merge/226570
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1339861.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1293158 into lp:widelands

2014-07-12 Thread noreply
The proposal to merge lp:~widelands-dev/widelands/bug-1293158 into lp:widelands 
has been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1293158/+merge/221434
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1293158/+merge/221434
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1293158.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1293158 into lp:widelands

2014-07-12 Thread SirVer
the problem was that number of players is a uchar (i.e. 0 <= uchar <= 255). 
Boost::format() likes to interpret this though as a 'single char'. I merged 
this and static_cast() the value in question and all is good. 
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1293158/+merge/221434
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1293158.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1324137 into lp:widelands

2014-07-12 Thread SirVer
Cool! Merged in r 7074.
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1324137/+merge/221353
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1324137.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1324137 into lp:widelands

2014-07-12 Thread noreply
The proposal to merge lp:~widelands-dev/widelands/bug-1324137 into lp:widelands 
has been updated.

Status: Needs review => Merged

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1324137/+merge/221353
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1324137/+merge/221353
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1324137.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/freebsd into lp:widelands

2014-07-12 Thread SirVer
what happens with this branch now, hjd?
-- 
https://code.launchpad.net/~widelands-dev/widelands/freebsd/+merge/225867
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/freebsd into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/map_information into lp:widelands

2014-07-12 Thread Hans Joachim Desserud
Sounds interesting, and it definitely sounds like a good idea to have a 
single(, working) implementation for how maps are drawn. Could you give some 
more details on how you see this being handled on the website-side, and what 
will be needed there?

Does this handle old (separate world) maps too? (Will likely be fewer of those 
added once build19 is out, but you never know)

I see that a file in eris has been removed. While that might be the right 
action, I wonder why it happened in this branch. I also think changes like this 
should be documented in a way in third_party when we need to sync/pull in the 
latest version of eris, we have complete track of any changes and/or patches we 
have done.
-- 
https://code.launchpad.net/~widelands-dev/widelands/map_information/+merge/226572
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/map_information into lp:widelands.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/rename_goldweaver into lp:widelands

2014-07-12 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/rename_goldweaver 
into lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/rename_goldweaver/+merge/226580

Renamed a building to make more sense.
-- 
https://code.launchpad.net/~widelands-dev/widelands/rename_goldweaver/+merge/226580
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/rename_goldweaver into lp:widelands.
=== modified file 'campaigns/atl01.wmf/scripting/init.lua'
--- campaigns/atl01.wmf/scripting/init.lua	2014-04-14 20:01:49 +
+++ campaigns/atl01.wmf/scripting/init.lua	2014-07-12 14:23:42 +
@@ -206,7 +206,7 @@
local o = add_obj(obj_spidercloth_production)
 
while not check_for_buildings(p1, {
-  spiderfarm = 1, goldweaver = 1, ["weaving-mill"] = 1
+  spiderfarm = 1, ["gold-spinning-mill"] = 1, ["weaving-mill"] = 1
}) do sleep(6273) end
o.done = true
 

=== modified file 'campaigns/atl01.wmf/scripting/texts.lua'
--- campaigns/atl01.wmf/scripting/texts.lua	2014-04-22 08:11:00 +
+++ campaigns/atl01.wmf/scripting/texts.lua	2014-07-12 14:23:42 +
@@ -72,10 +72,22 @@
name = "obj_spidercloth_production",
title = _ "Build a spider farm and a weaving mill",
number = 3,
+<<< TREE
body = objective_text(_"Spidercloth Production", _[[The weavers produce spidercloth and tabards in the weaving mill. Spidercloth is needed for the construction of some buildings and clothing, while tabards are the uniforms of soldiers. The weaving mill needs gold yarn and spideryarn as raw material. Spideryarn is produced by the spider farm, while gold yarn is produced by the gold weaver out of gold.]] .. paragraphdivider() ..
   listitem_bullet(_[[Build a weaving mill]]) ..
   listitem_bullet(_[[Build a spider farm]]) ..
   listitem_bullet(_[[Build a goldweaver]])
+===
+   body = objective_text(_"Spidercloth Production", _(
+[[The weavers produce spidercloth and tabards in the weaving mill. ]] ..
+[[Spidercloth is needed for the construction of some buildings and clothing, ]] ..
+[[while tabards are the uniforms of soldiers. ]] ..
+[[The weaving mill needs gold yarn and spideryarn as raw material. ]] ..
+[[Spideryarn is produced by the spider farm, while gold yarn is produced by the gold spinning works out of gold.]]) .. "" ..
+[[• ]] .. _[[Build a weaving mill]] .. "" ..
+[[• ]] .. _[[Build a spider farm]] .. "" ..
+[[• ]] .. _[[Build a gold spinning mill]]
+>>> MERGE-SOURCE
  )
 }
 
@@ -310,7 +322,7 @@
 body = jundlina(_ "Jundlina Replies", _(
 [[May Satul warm you too, Opol. I wanted to delay production of spidercloth, but I understand your urgency. ]] ..
 [[Your suggestion sounds fair to me, I will build your weaving mill and spider farm. ]] ..
-[[I will also build a goldweaver so that the golden tabards you make will not be golden by name alone.]]
+[[I will also build a gold spinning mill so that the golden tabards you make will not be golden by name alone.]]
 )) ..  new_objectives(obj_spidercloth_production)
  }
 }
@@ -320,7 +332,7 @@
   title = _ "Opol Seeks Out Jundlina",
   body = opol(_(
 [[May Satul warm you, Jundlina! ]] ..
-[[The weaving mill, goldweaver and spider farm buildings are complete ]] ..
+[[The weaving mill, gold spinning mill and spider farm buildings are complete ]] ..
 [[and are starting their work at this very moment. The weavers’ guild is very grateful for your support ]] ..
 [[and we will stand by our word and deliver the first tabard very soon.]]
   ))

=== modified file 'tribes/atlanteans/conf'
--- tribes/atlanteans/conf	2014-07-03 07:36:22 +
+++ tribes/atlanteans/conf	2014-07-12 14:23:42 +
@@ -163,7 +163,7 @@
 quarry=_Quarry
 woodcutters_house=_Woodcutter’s House
 foresters_house=_Forester’s House
-goldweaver=_Goldweaver
+gold-spinning-mill=_Gold Spinning Mill
 fishers_house=_Fisher’s House
 fish_breeders_house=_Fish Breeder’s House
 hunters_house=_Hunter’s House

=== renamed directory 'tribes/atlanteans/goldweaver' => 'tribes/atlanteans/gold-spinning-mill'
=== modified file 'tribes/atlanteans/gold-spinning-mill/conf'
--- tribes/atlanteans/goldweaver/conf	2014-07-03 20:06:38 +
+++ tribes/atlanteans/gold-spinning-mill/conf	2014-07-12 14:23:42 +
@@ -30,9 +30,9 @@
 produce=goldyarn
 
 [idle]
-pics=goldweaver_i_??.png  # ???
+pics=gold-spinning-mill_i_??.png  # ???
 hotspot=33 64
 
 [working]
-pics=goldweaver_i_??.png  # ???
+pics=gold-spinning-mill_i_??.png  # ???
 hotspot=33 64

=== renamed file 'tribes/atlanteans/goldweaver/goldweaver_i_00.png' => 'tribes/atlanteans/gold-spinning-mill/gold-spinning-mill_i_00.png'
=== renamed file 'tribes/atlanteans/goldweaver/goldweaver_i_00_pc.png' => 'tribes/atlanteans/gold-spinning-mill/gold-spinning-mill_i_00_pc.png'
=== modified file 'tribes/atlanteans/gold/conf'
--- tribes/atlanteans/gold/conf	2014-03-16 20:55:15 +
+++ tribes/atl

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1293158 into lp:widelands

2014-07-12 Thread GunChleoc
Thanks :)
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1293158/+merge/221434
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/bug-1293158.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [recipe build #754483] of ~widelands-dev widelands-daily in saucy: Failed to build

2014-07-12 Thread noreply
 * State: Failed to build
 * Recipe: widelands-dev/widelands-daily
 * Archive: ~widelands-dev/ubuntu/widelands-daily
 * Distroseries: saucy
 * Duration: 5 minutes
 * Build Log: 
https://launchpad.net/~widelands-dev/+archive/widelands-daily/+recipebuild/754483/+files/buildlog.txt.gz
 * Upload Log: 
 * Builder: https://launchpad.net/builders/wani01

-- 
https://launchpad.net/~widelands-dev/+archive/widelands-daily/+recipebuild/754483
Your team Widelands Developers is the requester of the build.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~widelands-dev/widelands/bug-1341112 into lp:widelands

2014-07-12 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/bug-1341112 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)
Related bugs:
  Bug #1341112 in widelands: "Editor line abruption in Noise height tool"
  https://bugs.launchpad.net/widelands/+bug/1341112

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/bug-1341112/+merge/226586

More space for strings in editor - a small redesign on the noise height tool, 
and made some other tools + the main menu wider. If Gaelic fits, everything 
should fit :P
-- 
https://code.launchpad.net/~widelands-dev/widelands/bug-1341112/+merge/226586
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/bug-1341112 into lp:widelands.
=== modified file 'src/editor/ui_menus/editor_main_menu.cc'
--- src/editor/ui_menus/editor_main_menu.cc	2014-06-08 21:47:45 +
+++ src/editor/ui_menus/editor_main_menu.cc	2014-07-12 16:30:30 +
@@ -29,7 +29,7 @@
 #include "ui_fsmenu/fileview.h"
 
 //TODO: these should be defined globally for the whole UI
-#define width 150
+#define width 200
 #define height 20
 #define margin 15
 #define hmargin margin

=== modified file 'src/editor/ui_menus/editor_main_menu_map_options.cc'
--- src/editor/ui_menus/editor_main_menu_map_options.cc	2014-06-18 13:20:33 +
+++ src/editor/ui_menus/editor_main_menu_map_options.cc	2014-07-12 16:30:30 +
@@ -44,7 +44,7 @@
 	:
 	UI::Window
 		(&parent, "map_options",
-		 (parent.get_w() - 200) / 2, (parent.get_h() - 300) / 2, 200, 305,
+		 250, (parent.get_h() - 300) / 2, 200, 305,
 		 _("Map Options"))
 {
 

=== modified file 'src/editor/ui_menus/editor_tool_change_height_options_menu.cc'
--- src/editor/ui_menus/editor_tool_change_height_options_menu.cc	2014-06-08 21:47:45 +
+++ src/editor/ui_menus/editor_tool_change_height_options_menu.cc	2014-07-12 16:30:30 +
@@ -36,7 +36,7 @@
 	 UI::UniqueWindow::Registry  & registry)
 	:
 	Editor_Tool_Options_Menu
-		(parent, registry, 135, 135, _("Height Tools Options")),
+		(parent, registry, 250, 135, _("Height Tools Options")),
 	m_increase_tool(increase_tool),
 	m_change_by_label
 		(this,

=== modified file 'src/editor/ui_menus/editor_tool_change_resources_options_menu.cc'
--- src/editor/ui_menus/editor_tool_change_resources_options_menu.cc	2014-06-18 13:20:33 +
+++ src/editor/ui_menus/editor_tool_change_resources_options_menu.cc	2014-07-12 16:30:30 +
@@ -43,7 +43,7 @@
 		 UI::UniqueWindow::Registry & registry)
 	:
 	Editor_Tool_Options_Menu
-		(parent, registry, 164, 120, _("Resources")),
+		(parent, registry, 250, 120, _("Resources")),
 	m_change_by_label
 		(this,
 		 hmargin(), vmargin(), get_inner_w() - 2 * hmargin(), BUTTON_HEIGHT,

=== modified file 'src/editor/ui_menus/editor_tool_noise_height_options_menu.cc'
--- src/editor/ui_menus/editor_tool_noise_height_options_menu.cc	2014-06-08 21:47:45 +
+++ src/editor/ui_menus/editor_tool_noise_height_options_menu.cc	2014-07-12 16:30:30 +
@@ -39,23 +39,24 @@
 	 UI::UniqueWindow::Registry & registry)
 	:
 	Editor_Tool_Options_Menu
-		(parent, registry, 200, 115, _("Noise Height Options")),
+		(parent, registry, 250, 3 * height + 4 * vspacing() + 2 * vmargin(), _("Noise Height Options")),
 	m_noise_tool(noise_tool),
 	m_lower_label
 		(this,
 		 hmargin(),
-		 vmargin(), (get_inner_w() - 2 * hmargin() - spacing()) / 2, height,
-		 UI::Align_BottomLeft),
+		 vmargin(),
+		 width, height,
+		 UI::Align_Left),
 	m_upper_label
 		(this,
-		 get_inner_w() / 2,
-		 vmargin(), m_lower_label.get_w(), height,
-		 UI::Align_BottomLeft),
+		 hmargin(),
+		 m_lower_label.get_y() + m_lower_label.get_h() + 2 * vspacing(),
+		 width, height,
+		 UI::Align_Left),
 	m_lower_decrease
 		(this, "decr_lower",
-		 hmargin() +
-		 (get_inner_w() - 2 * hmargin() - hspacing() - 4 * width) / 4,
-		 m_lower_label.get_y() + m_lower_label.get_h() + vspacing(),
+		 get_inner_w() - 2 * width - hspacing(),
+		 m_lower_label.get_y(),
 		 width, height,
 		 g_gr->images().get("pics/but0.png"),
 		 g_gr->images().get("pics/scrollbar_down.png"),
@@ -63,8 +64,8 @@
 		 0 < noise_tool.get_interval().min),
 	m_lower_increase
 		(this, "incr_lower",
-		 m_lower_decrease.get_x() + m_lower_decrease.get_w(),
-		 m_lower_decrease.get_y(),
+		 get_inner_w() - width - hspacing(),
+		 m_lower_label.get_y(),
 		 width, height,
 		 g_gr->images().get("pics/but0.png"),
 		 g_gr->images().get("pics/scrollbar_up.png"),
@@ -72,11 +73,8 @@
 		 noise_tool.get_interval().min < MAX_FIELD_HEIGHT),
 	m_upper_decrease
 		(this, "decr_upper",
-		 m_lower_decrease.get_x() + width
-		 +
-		 (get_inner_w() - 2 * hmargin() - hspacing() - 4 * width) / 2 +
-		 hspacing(),
-		 m_lower_decrease.get_y(),
+		 get_inner_w() - 2 * width - hspacing(),
+		 m_upper_label.get_y(),
 		 width, height,
 		 g_gr->images().get("pics/but0.png"),
 		 g_gr->images().get("pics/scrollbar_down.png"),
@@ -84,8 +82,8 @@
 		 0 < noise_tool.get_interval().max),
 	m_upper_incr

[Widelands-dev] [Merge] lp:~widelands-dev/widelands/fix_world_names into lp:widelands

2014-07-12 Thread GunChleoc
GunChleoc has proposed merging lp:~widelands-dev/widelands/fix_world_names into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~widelands-dev/widelands/fix_world_names/+merge/226592

Some of the skeletons are actually seashells, so I did some renaming.
-- 
https://code.launchpad.net/~widelands-dev/widelands/fix_world_names/+merge/226592
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/fix_world_names into lp:widelands.
=== modified file 'src/map_io/s2map.cc'
--- src/map_io/s2map.cc	2014-07-05 14:22:44 +
+++ src/map_io/s2map.cc	2014-07-12 20:29:25 +
@@ -785,8 +785,8 @@
 			case BOB_STANDING_STONES7: bobname = "sstones7";  break;
 
 			case BOB_SKELETON1:bobname = "skeleton1"; break;
-			case BOB_SKELETON2:bobname = "skeleton2"; break;
-			case BOB_SKELETON3:bobname = "skeleton3"; break;
+			case BOB_SKELETON2:bobname = "seashell2"; break;
+			case BOB_SKELETON3:bobname = "skeleton2"; break;
 
 			case BOB_CACTUS1:
 bobname = m_worldtype != S2_Map_Loader::WINTERLAND ? "cactus1" : "snowman";

=== renamed directory 'world/immovables/skeleton4' => 'world/immovables/seashell1'
=== modified file 'world/immovables/seashell1/init.lua'
--- world/immovables/skeleton4/init.lua	2014-05-03 08:40:59 +
+++ world/immovables/seashell1/init.lua	2014-07-12 20:29:25 +
@@ -1,8 +1,8 @@
 dirname = path.dirname(__file__)
 
 world:new_immovable_type{
-   name = "skeleton4",
-   descname = _ "Skeleton",
+   name = "seashell1",
+   descname = _ "Seashell",
editor_category = "miscellaneous",
size = "none",
attributes = {},

=== renamed directory 'world/immovables/skeleton2' => 'world/immovables/seashell2'
=== modified file 'world/immovables/seashell2/init.lua'
--- world/immovables/skeleton2/init.lua	2014-05-03 08:40:59 +
+++ world/immovables/seashell2/init.lua	2014-07-12 20:29:25 +
@@ -1,8 +1,8 @@
 dirname = path.dirname(__file__)
 
 world:new_immovable_type{
-   name = "skeleton2",
-   descname = _ "Skeleton",
+   name = "seashell2",
+   descname = _ "Seashell",
editor_category = "miscellaneous",
size = "none",
attributes = {},

=== renamed directory 'world/immovables/skeleton3' => 'world/immovables/skeleton2'
=== modified file 'world/immovables/skeleton2/init.lua'
--- world/immovables/skeleton3/init.lua	2014-05-03 08:40:59 +
+++ world/immovables/skeleton2/init.lua	2014-07-12 20:29:25 +
@@ -1,7 +1,7 @@
 dirname = path.dirname(__file__)
 
 world:new_immovable_type{
-   name = "skeleton3",
+   name = "skeleton2",
descname = _ "Skeleton",
editor_category = "miscellaneous",
size = "none",

=== modified file 'world/immovables/track_winter/init.lua'
--- world/immovables/track_winter/init.lua	2014-05-03 08:40:59 +
+++ world/immovables/track_winter/init.lua	2014-07-12 20:29:25 +
@@ -2,6 +2,7 @@
 
 world:new_immovable_type{
name = "track_winter",
+   -- TRANSLATORS: This track is made of footprints in the snow
descname = _ "Track",
editor_category = "miscellaneous",
size = "none",

=== modified file 'world/init.lua'
--- world/init.lua	2014-06-22 10:58:43 +
+++ world/init.lua	2014-07-12 20:29:25 +
@@ -93,10 +93,10 @@
 include "world/immovables/ruin3/init.lua"
 include "world/immovables/ruin4/init.lua"
 include "world/immovables/ruin5/init.lua"
+include "world/immovables/seashell1/init.lua"
+include "world/immovables/seashell2/init.lua"
 include "world/immovables/skeleton1/init.lua"
 include "world/immovables/skeleton2/init.lua"
-include "world/immovables/skeleton3/init.lua"
-include "world/immovables/skeleton4/init.lua"
 include "world/immovables/track_winter/init.lua"
 
 -- Standing Stones

=== modified file 'world/map_generation.lua'
--- world/map_generation.lua	2014-06-10 18:02:00 +
+++ world/map_generation.lua	2014-07-12 20:29:25 +
@@ -111,7 +111,7 @@
   {
  name = "wasteland_doodads",
  immovables = {
-"skeleton1", "skeleton2", "skeleton3", "cactus1",
+"seashell2", "skeleton1", "skeleton2", "cactus1",
 "cactus2", "fallentree", "deadtree1", "deadtree2",
 "deadtree3", "deadtree4"
  },
@@ -299,7 +299,7 @@
   {
  name = "wasteland_doodads",
  immovables = {
-"skeleton1", "skeleton2", "skeleton3", "cactus1",
+"seashell2", "skeleton1", "skeleton2", "cactus1",
 "cactus2", "fallentree", "deadtree1", "deadtree2",
 "deadtree3", "deadtree4"
  },
@@ -469,7 +469,7 @@
   {
  name = "wasteland_doodads",
  immovables = {
-"skeleton1", "skeleton2", "skeleton3", "cactus1",
+"seashell2", "skeleton1", "skeleton2", "cactus1",
 "cactus2", "fallentree", "deadtree1", "deadtree5",
 "deadtree6", "deadtree4"
  },
@@ -656,7 +656,7 @@
   {
  name = "w

Re: [Widelands-dev] [Merge] lp:~widelands-dev/widelands/tibor-ai4 into lp:widelands

2014-07-12 Thread Tibor Bamhor
All right you probably said it, I am not arguing...

two comments to latest revision:

a) animation.cc - I reverted this file to status in trunk, I am not able to
fix it properly, I just needed to prevent crashes when testing AI

b) in regard to this:
 NOCOM(#tiborb): move this safe_ware_index() to the intitalization of the
AI to blow up early.

I made no change as I think it is done on right place, it is indeed part of
initialization of AI (=done once in game)

Tibor






2014-07-12 14:53 GMT+02:00 SirVer :

> Review: Needs Fixing
>
> It annoys me telling you the same things again (like not including
> SDL_types.h which I think I did two times before or removing the Default AI
> comment) but I will do it one more time. This time I did it as inline
> comments, so that it will not get lost in the review process. Please fix
> this so that we can merge.
> --
> https://code.launchpad.net/~widelands-dev/widelands/tibor-ai4/+merge/226029
> Your team Widelands Developers is subscribed to branch
> lp:~widelands-dev/widelands/tibor-ai4.
>
> ___
> Mailing list: https://launchpad.net/~widelands-dev
> Post to : widelands-dev@lists.launchpad.net
> Unsubscribe : https://launchpad.net/~widelands-dev
> More help   : https://help.launchpad.net/ListHelp
>

-- 
https://code.launchpad.net/~widelands-dev/widelands/tibor-ai4/+merge/226029
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/tibor-ai4.

___
Mailing list: https://launchpad.net/~widelands-dev
Post to : widelands-dev@lists.launchpad.net
Unsubscribe : https://launchpad.net/~widelands-dev
More help   : https://help.launchpad.net/ListHelp


[Widelands-dev] [Merge] lp:~f-thiessen/widelands/bug-1307844 into lp:widelands

2014-07-12 Thread Ferdinand T.
Ferdinand T. has proposed merging lp:~f-thiessen/widelands/bug-1307844 into 
lp:widelands.

Requested reviews:
  Widelands Developers (widelands-dev)

For more details, see:
https://code.launchpad.net/~f-thiessen/widelands/bug-1307844/+merge/226596

Fixed Bug 1307844 - Enhancement-system
Tested without problems.
-- 
https://code.launchpad.net/~f-thiessen/widelands/bug-1307844/+merge/226596
Your team Widelands Developers is requested to review the proposed merge of 
lp:~f-thiessen/widelands/bug-1307844 into lp:widelands.
=== modified file 'src/ai/defaultai.cc'
--- src/ai/defaultai.cc	2014-07-08 18:25:49 +
+++ src/ai/defaultai.cc	2014-07-12 23:55:42 +
@@ -1269,7 +1269,7 @@
 		// but I do not know how to identify such buildings
 		if (bo.cnt_built_ == 1
 		and game().get_gametime() > 60 * 60 * 1000
-		and !bo.desc->enhancements().empty()
+			and bo.desc->enhancement() != INVALID_INDEX
 		and !mines_.empty()) {
 			prio = max_preciousness + bulgarian_constant;
 		}
@@ -2204,60 +2204,60 @@
 
 	// Check whether building is enhanceable and if wares of the enhanced
 	// buildings are needed. If yes consider an upgrade.
-	std::set enhancements = productionsite->enhancements();
+	Building_Index enhancement = productionsite->enhancement();
 	int32_t maxprio = 0;
 	Building_Index enbld = INVALID_INDEX;
 	BuildingObserver* bestbld = nullptr;
-	container_iterate_const(std::set, enhancements, x) {
-		// Only enhance buildings that are allowed (scenario mode)
-		if (player->is_building_type_allowed(*x.current)) {
-			const Building_Descr& bld = *tribe->get_building_descr(*x.current);
-			BuildingObserver& en_bo = get_building_observer(bld.name().c_str());
-
-			// do not build the same building so soon (kind of duplicity check)
-			if (gametime - en_bo.construction_decision_time_ < kBuildingMinInterval)
-continue;
-
+
+	// Only enhance buildings that are allowed (scenario mode)
+	if (player->is_building_type_allowed(enhancement)) {
+		const Building_Descr& bld = *tribe->get_building_descr(enhancement);
+		BuildingObserver& en_bo = get_building_observer(bld.name().c_str());
+
+		// do not build the same building so soon (kind of duplicity check)
+		if (gametime - en_bo.construction_decision_time_ >= kBuildingMinInterval)
+			{
 			// Don't enhance this building, if there is already one of same type
 			// under construction or unoccupied_
-			if (en_bo.cnt_under_construction_ + en_bo.unoccupied_ > 0)
-continue;
-
-			// don't upgrade without workers
-			if (!productionsite->has_workers(*x.current, game()))
-continue;
-
-			// forcing first upgrade
-			if ((en_bo.cnt_under_construction_ + en_bo.cnt_built_ + en_bo.unoccupied_) == 0
-			and (productionsite_observer.bo->cnt_built_ -
-			  productionsite_observer.bo->unoccupied_) >= 1
-			and (game().get_gametime() - productionsite_observer.built_time_) > 30 * 60 * 1000
-			and !mines_.empty()) {
-if (kUpgradeDebug)
-	log(" UPGRADE: upgrading (forcing as first) %12s at %3d x %3d: age %d min.\n",
-	productionsite_observer.bo->name,
-	productionsite->get_position().x,
-	productionsite->get_position().y,
-	(game().get_gametime() - productionsite_observer.built_time_) / 6);
-
-game().send_player_enhance_building(*productionsite, (*x.current));
-return true;
+			if (en_bo.cnt_under_construction_ + en_bo.unoccupied_ <= 0)
+{
+// don't upgrade without workers
+if (productionsite->has_workers(enhancement, game()))
+	{
+	// forcing first upgrade
+	if ((en_bo.cnt_under_construction_ + en_bo.cnt_built_ + en_bo.unoccupied_) == 0
+		and (productionsite_observer.bo->cnt_built_ -
+		productionsite_observer.bo->unoccupied_) >= 1
+		and (game().get_gametime() - productionsite_observer.built_time_) > 30 * 60 * 1000
+		and !mines_.empty()) {
+
+		if (kUpgradeDebug)
+			log(" UPGRADE: upgrading (forcing as first) %12s at %3d x %3d: age %d min.\n",
+			productionsite_observer.bo->name,
+			productionsite->get_position().x,
+			productionsite->get_position().y,
+			(game().get_gametime() - productionsite_observer.built_time_) / 6);
+
+		game().send_player_enhance_building(*productionsite, enhancement);
+		return true;
+	}
+}
 			}
-
-			// now, let consider normal upgrade
-
-			if (kUpgradeDebug)
-log(" UPGRADE: %1d: working enhanced buildings (%15s): %1d, statitistics: %2d\n",
-player_number(),
-en_bo.name,
-en_bo.cnt_built_ - en_bo.unoccupied_,
-en_bo.current_stats_);
-
-			// do not upgrade if candidate production % is too low
-			if ((en_bo.cnt_built_ - en_bo.unoccupied_) ==
-			0 or(en_bo.cnt_under_construction_ + en_bo.unoccupied_) > 0 or en_bo.current_stats_ <
-			   50)
-continue;
+		}
+
+		// now, let consider normal upgrade
+
+		if (kUpgradeDebug)
+			log(" UPGRADE: %1d: working enhanced buildings (%15s): %1d, statitistics: %2