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

2016-03-08 Thread GunChleoc
@bunnybot merge
-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/beautiful_correct_lines.

___
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/beautiful_correct_lines into lp:widelands

2016-03-08 Thread GunChleoc
No problem - I will take care of it :)

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

___
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/beautiful_correct_lines into lp:widelands

2016-03-08 Thread SirVer
That Should be removed. Sorry for that. 

> Am 08.03.2016 um 10:25 schrieb GunChleoc :
> 
> Beautiful :)
> 
> Just 1 question before I merge: what is this line for?
> 
>draw_rect(Rect(5, 7, 3, 4), RGBColor(0, 255, 0), screen_.get());
> 
> in void Graphic::refresh(), src/graphic/graphic.cc, line 217.
> -- 
> https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
> You proposed lp:~widelands-dev/widelands/beautiful_correct_lines for merging.

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

___
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/beautiful_correct_lines into lp:widelands

2016-03-08 Thread GunChleoc
Beautiful :)

Just 1 question before I merge: what is this line for?

draw_rect(Rect(5, 7, 3, 4), RGBColor(0, 255, 0), screen_.get());

in void Graphic::refresh(), src/graphic/graphic.cc, line 217.
-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/beautiful_correct_lines.

___
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/beautiful_correct_lines into lp:widelands

2016-03-07 Thread SirVer
This is ready for merging now. I would like to wait for another travis run 
though. If travis is green this can be merged. 

Since I have no internet at home for the foreseeable future, could somebody 
else merge this for me, please?
-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/beautiful_correct_lines.

___
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/beautiful_correct_lines into lp:widelands

2016-02-22 Thread SirVer
This needs some cleanup. I'll look into that soonish. 
-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/beautiful_correct_lines.

___
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/beautiful_correct_lines into lp:widelands

2016-02-11 Thread GunChleoc
I am still trying to play with it to get rid of the jaggies. Slow going though.
-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/beautiful_correct_lines.

___
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/beautiful_correct_lines into lp:widelands

2016-02-10 Thread SirVer
Gun, this still waits for your testing approval before I can clean it up and 
get it in.
-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/beautiful_correct_lines.

___
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/beautiful_correct_lines into lp:widelands

2016-02-06 Thread Klaus Halfmann
Review: Approve testing

Revied the code and plyed for quit a while,
all fine for me
-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/beautiful_correct_lines.

___
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/beautiful_correct_lines into lp:widelands

2016-02-05 Thread GunChleoc
Right-angles lines look better with alpha 30, but slanted lines look better 
with alpha 80 slanted lines with alpha 80 suffer from jaggies.

https://en.wikipedia.org/wiki/Jaggies

Is there a way to make the alpha dependent on the angle of the line?
-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/beautiful_correct_lines.

___
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/beautiful_correct_lines into lp:widelands

2016-02-05 Thread SirVer
If you want to play around a little bit more, go for it. I will not code 
anymore tonight, so I will only clean this up tomorrow anyways. There are the 
parameters you can play with

- In the last commit I removed the code that draws the circles to connect to 
lines, so lines are not connected anymore. You might bring that back.
- the fuzzyness of the lines is defined through this line:
  float alpha = pow(cos(var_color.a * PI / 2), 1.5);
the corners of each line quad are alpha = 1, opposite are -1, so the shader 
gets a linear interpolated value between -1 and 1 across the line. This 
function turns that into a non linear function that defines the falloff. You 
can replace that or tweak the 1.5 to different values you like.
- glDepthFunction(GL_LEQUAL) vs glDepthFunction(GL_LESS) defines overdraw 
behavior for overlapping lines. If two lines overlap, it defines if the second 
lines pixel are drawn over the first line pixels or not - that obviously only 
makes a difference if the pixel is partially transparent. 
- The thickness of the lines in the plot area. 

It might help to bring back this line in graphic:

screen_->draw_line_strip(
{FloatPoint(20, 300), FloatPoint(700, 500), FloatPoint(250, 
50)}, RGBColor(255, 0, 0), 30, LineDrawMode::kAntialiased);

directly before:
RenderQueue::instance().draw(screen_->width(), screen_->height());

It draws a big fat line across your screen that is much bigger than any we use 
in Widelands, but it gives you a feeling for your parameters. 

It is fun to play around with that, but I did it too much now. Maybe you find 
better parameters. 
-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/beautiful_correct_lines.

___
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/beautiful_correct_lines into lp:widelands

2016-02-05 Thread SirVer
You are a hard audience :). I tried another shading approach - source is not 
cleaned up, but could you all give it another shot?
-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/beautiful_correct_lines.

___
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/beautiful_correct_lines into lp:widelands

2016-02-05 Thread SirVer
What I meant to say is that it is fully functional, just the source code 
contains NOCOMs still.
-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/beautiful_correct_lines.

___
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/beautiful_correct_lines into lp:widelands

2016-02-05 Thread Klaus Halfmann
Hello SirVer:

Id like to move the 0.5 * line_width invariant in tesselate_line_strip out of 
the loop.
(I tend to optimize all the code I see)

--
Hasi50


> Am 05.02.2016 um 20:19 schrieb SirVer :
> 
> If you want to play around a little bit more, go for it. I will not code 
> anymore tonight, so I will only clean this up tomorrow anyways. There are the 
> parameters you can play with
> 
> - In the last commit I removed the code that draws the circles to connect to 
> lines, so lines are not connected anymore. You might bring that back.
> - the fuzzyness of the lines is defined through this line:
>  float alpha = pow(cos(var_color.a * PI / 2), 1.5);
> the corners of each line quad are alpha = 1, opposite are -1, so the shader 
> gets a linear interpolated value between -1 and 1 across the line. This 
> function turns that into a non linear function that defines the falloff. You 
> can replace that or tweak the 1.5 to different values you like.
> - glDepthFunction(GL_LEQUAL) vs glDepthFunction(GL_LESS) defines overdraw 
> behavior for overlapping lines. If two lines overlap, it defines if the 
> second lines pixel are drawn over the first line pixels or not - that 
> obviously only makes a difference if the pixel is partially transparent. 
> - The thickness of the lines in the plot area. 
> 
> It might help to bring back this line in graphic:
> 
> screen_->draw_line_strip(
>   {FloatPoint(20, 300), FloatPoint(700, 500), FloatPoint(250, 
> 50)}, RGBColor(255, 0, 0), 30, LineDrawMode::kAntialiased);
> 
> directly before:
>   RenderQueue::instance().draw(screen_->width(), screen_->height());
> 
> It draws a big fat line across your screen that is much bigger than any we 
> use in Widelands, but it gives you a feeling for your parameters. 
> 
> It is fun to play around with that, but I did it too much now. Maybe you find 
> better parameters. 
> -- 
> https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
> Your team Widelands Developers is subscribed to branch 
> lp:~widelands-dev/widelands/beautiful_correct_lines.
> 
> ___
> 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/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/beautiful_correct_lines.

___
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/beautiful_correct_lines into lp:widelands

2016-02-05 Thread Klaus Halfmann
WL crashed on me after I tried to open a games and iternet game I save some 
versions ago,
Ill try a new game tomorrow unless this should work?
-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/beautiful_correct_lines.

___
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/beautiful_correct_lines into lp:widelands

2016-02-05 Thread GunChleoc
Please don't jump off a bridge now, but I get some fuzzy lines now - the 
culprit seems to be interpolation of the edges with horizontal/vertical lines 
(0°, 90°, 180° and 270°).

https://launchpadlibrarian.net/236372160/fuzzy_lines.png
-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/beautiful_correct_lines.

___
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/beautiful_correct_lines into lp:widelands

2016-02-05 Thread SirVer
That anti aliasing is intended. :). 

Maybe it is too strong. You ca tweak the value yourself. In surface function a 
second line is drawn with a lower alpha. Just try it out, maybe another value 
is better. 

> Am 05.02.2016 um 11:38 schrieb GunChleoc :
> 
> Please don't jump off a bridge now, but I get some fuzzy lines now - the 
> culprit seems to be interpolation of the edges with horizontal/vertical lines 
> (0°, 90°, 180° and 270°).
> 
> https://launchpadlibrarian.net/236372160/fuzzy_lines.png
> -- 
> https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
> Your team Widelands Developers is subscribed to branch 
> lp:~widelands-dev/widelands/beautiful_correct_lines.
> 
> ___
> 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/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/beautiful_correct_lines.

___
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/beautiful_correct_lines into lp:widelands

2016-02-05 Thread kaputtnik
Review: Approve testing

Fantastic :-) Really great job :-)

https://bugs.launchpad.net/widelands/+bug/1531114/+attachment/4564387/+files/shot0002.png


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

___
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/beautiful_correct_lines into lp:widelands

2016-02-04 Thread SirVer
Review: Resubmit

This is ready for another test run / look. 
-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is subscribed to branch 
lp:~widelands-dev/widelands/beautiful_correct_lines.

___
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/beautiful_correct_lines into lp:widelands

2016-02-02 Thread kaputtnik
An enlarged image should show what is wrong. The left image shows a red area 
where the lines normally should be (borders left and top). The right image 
shows how it should look like, imho.

https://bugs.launchpad.net/widelands/+bug/1296889/+attachment/4562221/+files/1_pixel.png
-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/beautiful_correct_lines 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/beautiful_correct_lines into lp:widelands

2016-02-02 Thread SirVer
To accommodate the overshooting, I had to change the way line joints work. This 
also completely changed the code again. Could I get one more round of testing 
end code review?

Gun, I could not track down your issue. Could you retry this version? Maybe it 
has just vanished.
-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/beautiful_correct_lines 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/beautiful_correct_lines into lp:widelands

2016-02-02 Thread kaputtnik
The lines look not as smooth as before, but they fit now into the diagram :-)

For the soldiers health bar: The top line isn't continuous, ends where the top 
field begins. If you enlarge the image the left border of the health bar is 1 
pixel too wide on the left. The top line is one pixel too wide above.

https://bugs.launchpad.net/widelands/+bug/1531114/+attachment/4562133/+files/lines_new.png
-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/beautiful_correct_lines 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/beautiful_correct_lines into lp:widelands

2016-02-02 Thread GunChleoc
The healthbar issue in the screenshot looks like an overlap - make the bar 1-2 
pixels thinner and it should fit.
-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/beautiful_correct_lines 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/beautiful_correct_lines into lp:widelands

2016-02-02 Thread GunChleoc
I just had a loser look, the Rectangle program needs to draw the upper line a 
bit lower, that should fix it.
-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/beautiful_correct_lines 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/beautiful_correct_lines into lp:widelands

2016-02-01 Thread Tino
The lines look very good! I do not get any crashes, but can confirm kaputtniks 
discovery in the wares production window.
-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/beautiful_correct_lines 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/beautiful_correct_lines into lp:widelands

2016-01-31 Thread kaputtnik
I also couldn't confirm the problem GunChleoc described. Here it works fine, 
but the lines in the wares statistic does not fit in the diagram.

See 
https://bugs.launchpad.net/widelands/+bug/1531114/+attachment/4560624/+files/lines.png
-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/beautiful_correct_lines 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/beautiful_correct_lines into lp:widelands

2016-01-31 Thread GunChleoc
No crashes now, but another bug in the general stats - looks like the assert 
wasn't that silly, maybe?

https://launchpadlibrarian.net/235815511/stats_lines.png
-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/beautiful_correct_lines 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/beautiful_correct_lines into lp:widelands

2016-01-31 Thread SirVer
No, the assert was silly.

I cannot reproduce this error - do you have a repro case? Is that always the 
problem, all the time? Or only sometimes?

-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/beautiful_correct_lines 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/beautiful_correct_lines into lp:widelands

2016-01-31 Thread GunChleoc
All I have to do is start a game, open the statistics window and wait. As soon 
as a line gets plotted, it gets a diagonal downwards left added to the end node.
-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/beautiful_correct_lines 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/beautiful_correct_lines into lp:widelands

2016-01-30 Thread GunChleoc
I am getting another crash. To reproduce, start a new game and click on general 
statistics.

ComputerPlayer(2): initializing (2)
Forcing flag at (43, 59)
Message: adding (wh) (warehouse) 1 
Forcing flag at (42, 21)
Message: adding (wh) (warehouse) 2 
Font file not found. Falling back to serif: condensed
Could not find file: could not find file or directory: i18n/fonts/condensed
widelands: 
/home/bratzbert/sources/widelands/beautiful_correct_lines/src/graphic/surface.cc:99:
 void Surface::draw_line_strip(const LineStripMode&, 
std::vector, const RGBColor&, float): Assertion 
`points.size() > 1' failed.

Program received signal SIGABRT, Aborted.
0x754cbcc9 in __GI_raise (sig=sig@entry=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
56  ../nptl/sysdeps/unix/sysv/linux/raise.c: No such file or directory.
(gdb) backtrace
#0  0x754cbcc9 in __GI_raise (sig=sig@entry=6)
at ../nptl/sysdeps/unix/sysv/linux/raise.c:56
#1  0x754cf0d8 in __GI_abort () at abort.c:89
#2  0x754c4b86 in __assert_fail_base (
fmt=0x75615830 "%s%s%s:%u: %s%sAssertion `%s' failed.\n%n", 
assertion=assertion@entry=0x142b4f9 "points.size() > 1", 
file=file@entry=0x142b4a8 
"/home/bratzbert/sources/widelands/beautiful_correct_lines/src/graphic/surface.cc",
 line=line@entry=99, 
function=function@entry=0x142b560  >, 
RGBColor const&, float)::__PRETTY_FUNCTION__> "void 
Surface::draw_line_strip(const LineStripMode&, std::vector, 
const RGBColor&, float)")
at assert.c:92
#3  0x754c4c32 in __GI___assert_fail (
assertion=0x142b4f9 "points.size() > 1", 
file=0x142b4a8 
"/home/bratzbert/sources/widelands/beautiful_correct_lines/src/graphic/surface.cc",
 line=99, 
function=0x142b560  >, RGBColor 
const&, float)::__PRETTY_FUNCTION__> "void Surface::draw_line_strip(const 
LineStripMode&, std::vector, const RGBColor&, float)") at 
assert.c:101
#4  0x0103418a in Surface::draw_line_strip (this=0x1af3870, 
line_strip_mode=@0x7fffa6f8: kOpen, 
points=std::vector of length 1, capacity 1 = {...}, color=..., 
line_width=2.5)
at 
/home/bratzbert/sources/widelands/beautiful_correct_lines/src/graphic/surface.cc:99
#5  0x00d089a1 in RenderTarget::draw_line_strip (this=0x1b00840, 
line_strip_mode=@0x7fffa6f8: kOpen, 
points=std::vector of length 1, capacity 1 = {...}, color=..., 
line_width=2.5)
at 
/home/bratzbert/sources/widelands/beautiful_correct_lines/src/graphic/rendertarget.cc:123
#6  0x010290a9 in WuiPlotArea::draw_plot_line (this=0x6c29020, 
dst=..., dataset=0x55de380, yline_length=110, highest_scale=271, 
sub=13.33, color=..., yoffset=115)
at 
/home/bratzbert/sources/widelands/beautiful_correct_lines/src/wui/plot_area.cc:437
#7  0x01028e50 in WuiPlotArea::draw (this=0x6c29020, dst=...)
at 
/home/bratzbert/sources/widelands/beautiful_correct_lines/src/wui/plot_area.cc:400
#8  0x00ee85d6 in UI::Panel::do_draw_inner (this=0x6c29020, dst=...)
at 
/home/bratzbert/sources/widelands/beautiful_correct_lines/src/ui_basic/panel.cc:822
#9  0x00ee8798 in UI::Panel::do_draw (this=0x6c29020, dst=...)
at 
/home/bratzbert/sources/widelands/beautiful_correct_lines/src/ui_basic/panel.cc:858
#10 0x00ee85f7 in UI::Panel::do_draw_inner (this=0x6c28f50, dst=...)
at 
/home/bratzbert/sources/widelands/beautiful_correct_lines/src/ui_basic/panel.cc:826
#11 0x00ee8798 in UI::Panel::do_draw (this=0x6c28f50, dst=...)
at 
/home/bratzbert/sources/widelands/beautiful_correct_lines/src/ui_basic/panel.cc:858
#12 0x00ee85f7 in UI::Panel::do_draw_inner (this=0x6c28e40, dst=...)
at 
/home/bratzbert/sources/widelands/beautiful_correct_lines/src/ui_basic/panel.cc:826
#13 0x00ee8798 in UI::Panel::do_draw (this=0x6c28e40, dst=...)
at 
/home/bratzbert/sources/widelands/beautiful_correct_lines/src/ui_basic/panel.cc:858
#14 0x00ee85f7 in UI::Panel::do_draw_inner (this=0x24ff1c0, dst=...)
at 
/home/bratzbert/sources/widelands/beautiful_correct_lines/src/ui_basic/panel.cc:826
#15 0x00ee8798 in UI::Panel::do_draw (this=0x24ff1c0, dst=...)
at 
/home/bratzbert/sources/widelands/beautiful_correct_lines/src/ui_basic/panel.cc:858
#16 0x00ee7383 in UI::Panel::do_run (this=0x24ff1c0)
at 
/home/bratzbert/sources/widelands/beautiful_correct_lines/src/ui_basic/panel.cc:184
#17 0x00c59d30 in UI::Panel::run (
this=0x24ff1c0)
at 
/home/bratzbert/sources/widelands/beautiful_correct_lines/src/ui_basic/panel.h:98
#18 0x00d63056 in Widelands::Game::run (this=0x7fffba90, 
loader_ui=0x7ffface0, start_game_type=Widelands::Game::NewNonScenario, 

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

2016-01-30 Thread SirVer
That assert was just plain silly. Fixed.
-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/beautiful_correct_lines 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/beautiful_correct_lines into lp:widelands

2016-01-30 Thread GunChleoc
I got an error running the Appveyor build - see screenshot: 
https://bugs.launchpad.net/widelands/+bug/1531114/comments/4

1 tiny code style consistency nit.

Diff comments:

> 
> === modified file 'src/wui/plot_area.cc'
> --- src/wui/plot_area.cc  2016-01-28 21:27:04 +
> +++ src/wui/plot_area.cc  2016-01-30 15:36:48 +
> @@ -225,15 +226,14 @@
>   }
>  
>   //  draw yticks, one at full, one at half
> - dst.draw_line(Point(inner_w - space_at_right, spacing),
> -   Point(inner_w - space_at_right - 3, spacing),
> -   LINE_COLOR,
> -   2);
> - dst.draw_line(
> -Point(inner_w - space_at_right, spacing + ((inner_h - 
> space_at_bottom) - spacing) / 2),
> -Point(inner_w - space_at_right - 3, spacing + ((inner_h - 
> space_at_bottom) - spacing) / 2),
> -LINE_COLOR,
> -2);
> + dst.draw_line_strip(LineStripMode::kOpen, {Point(inner_w - 
> space_at_right, spacing),
> +Point(inner_w - 
> space_at_right - 3, spacing)},
> + kAxisLineColor, kAxisLinesWidth);
> + dst.draw_line_strip(
> + LineStripMode::kOpen, {
> + Point(inner_w - space_at_right, spacing + ((inner_h - 
> space_at_bottom) - spacing) / 2),
> + Point(inner_w - space_at_right - 3, spacing + ((inner_h 
> - space_at_bottom) - spacing) / 2),
> + }, kAxisLineColor, kAxisLinesWidth);

Tiny nit: inconsistent formatting for the }, the other instances have this at 
the end of line.

If this was formatted by clang-format, leave it be.

>  
>   //  print the used unit
>   const Image* xtick = 
> UI::g_fh1->render(xtick_text_style((boost::format(get_unit_name(unit)) % 
> "").str()));


-- 
https://code.launchpad.net/~widelands-dev/widelands/beautiful_correct_lines/+merge/284517
Your team Widelands Developers is requested to review the proposed merge of 
lp:~widelands-dev/widelands/beautiful_correct_lines 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