GiGi future

Programmers discuss here anything related to FreeOrion programming. Primarily for the developers to discuss.

Moderator: Committer

Post Reply
Message
Author
User avatar
vincele
Space Dragon
Posts: 341
Joined: Sun Mar 23, 2014 6:10 pm

GiGi future

#1 Post by vincele »

Hello,

After seeing patch removing some code from GG, I was wondering if any discussion on the topic of GG code future happened, I found nothing in the forum, at least recently, so here it is.

What are we doing with this code ?
Has something been decided ?
To what extent are we ripping unused things ?
Upstream seems dead, so are we allowing ourselves from massive diversions ?

I'm interested in the answers to those questions, because I touched the UI code lately, and it was rather a pain to fight against GG. I also added some small methods to help myself, and will probably submit them for review in the future... I'd like to know if the way to go is open-coding inside UI/ better than extending GG's interfaces ?
All the patches I'll provide for freeorion will be released under the GPL v2 or later license.
Let's unleash the dyson forest powa!

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: GiGi future

#2 Post by Geoff the Medio »

vincele wrote:Upstream seems dead, so are we allowing ourselves from massive diversions ?
Yes.
I'd like to know if the way to go is open-coding inside UI/ better than extending GG's interfaces ?
If a change is a FreeOrion-specific UI implementation, then keep it in FreeOrion code. If it's a general-purpose GUI widget, feature, or bug fix, then it can go into GG code.

User avatar
vincele
Space Dragon
Posts: 341
Joined: Sun Mar 23, 2014 6:10 pm

Re: GiGi future

#3 Post by vincele »

OK, thanks for the info, that's good to know. I'm all for cleanups, that almost always make code easier to understand and maintain.

My changes are just simple missing operators on GG::Pt that make code easier to write on the application side, nothing big, but really for GG.

In fact, I can just as well post it today...

[The extension diff has been deactivated and can no longer be displayed.]

That's useful for scaling vectors...
All the patches I'll provide for freeorion will be released under the GPL v2 or later license.
Let's unleash the dyson forest powa!

User avatar
Geoff the Medio
Programming, Design, Admin
Posts: 13603
Joined: Wed Oct 08, 2003 1:33 am
Location: Munich

Re: GiGi future

#4 Post by Geoff the Medio »

Is there anywhere in particular where having these functions would be helpful?

User avatar
vincele
Space Dragon
Posts: 341
Joined: Sun Mar 23, 2014 6:10 pm

Re: GiGi future

#5 Post by vincele »

Geoff the Medio wrote:Is there anywhere in particular where having these functions would be helpful?
Yes in the unposted patch I have that scales down the sidepanel planets...

Maybe you want to defer that to when I'm done coding this patch and post it for review, it'll be easier to see the usage pattern then
All the patches I'll provide for freeorion will be released under the GPL v2 or later license.
Let's unleash the dyson forest powa!

User avatar
adrian_broher
Programmer
Posts: 1156
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: GiGi future

#6 Post by adrian_broher »

vincele wrote:
Geoff the Medio wrote:Is there anywhere in particular where having these functions would be helpful?
Yes in the unposted patch I have that scales down the sidepanel planets...

Maybe you want to defer that to when I'm done coding this patch and post it for review, it'll be easier to see the usage pattern then
Is there a particular reason why you use / instead of *? I would prefer the latter.
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

User avatar
vincele
Space Dragon
Posts: 341
Joined: Sun Mar 23, 2014 6:10 pm

Re: GiGi future

#7 Post by vincele »

adrian_broher wrote:Is there a particular reason why you use / instead of *? I would prefer the latter.
No particular reason appart that I'm dividing. Do you want me to update the patch to also include "operator*" ?
All the patches I'll provide for freeorion will be released under the GPL v2 or later license.
Let's unleash the dyson forest powa!

User avatar
adrian_broher
Programmer
Posts: 1156
Joined: Fri Mar 01, 2013 9:52 am
Location: Germany

Re: GiGi future

#8 Post by adrian_broher »

vincele wrote:
adrian_broher wrote:Is there a particular reason why you use / instead of *? I would prefer the latter.
No particular reason appart that I'm dividing. Do you want me to update the patch to also include "operator*" ?
I would prefer if you use * instead of /. So

Code: Select all

new_pt = old_pt / 2;
would become

Code: Select all

new_pt = old_pt * 0.5;
Resident code gremlin
Attached patches are released under GPL 2.0 or later.
Git author: Marcel Metz

Post Reply