patchFreeciv - Patches: patch #1662, use specenum_gen for enum...

 
 
Show feedback again

patch #1662: use specenum_gen for enum unit_flag_id / unit_role_id

Submitted by:  Matthias Pfafferodt <syntron>
Submitted on:  Sun 02 May 2010 09:45:12 PM UTC  
 
Category: generalPriority: 5 - Normal
Status: DonePrivacy: Public
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Planned Release: 2.5.0

Add a New Comment (Rich MarkupRich Markup):
   

You are not logged in

Please log in, so followups can be emailed to you.

 

(Jump to the original submission Jump to the original submission)

Wed 02 Jan 2013 02:48:27 AM UTC, SVN revision 22109:

Turned unit roles to specenum.

See gna patch #1662

(Browse SVN revision 22109)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun 30 Dec 2012 03:02:19 AM UTC, comment #10:

- Patch for unit roles side.

(file #16880)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun 30 Dec 2012 02:31:31 AM UTC, SVN revision 22103:

Turned unit_type_flags specenum.

See gna patch #1662

(Browse SVN revision 22103)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Wed 26 Dec 2012 12:49:29 AM UTC, comment #8:

- Patch for flags (not roles)

(file #16871)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 04 Aug 2012 12:40:20 AM UTC, comment #7:

patch #3394 makes it possible to add user flags to actual unit flag enumeration. That makes it possible to write this patch in a lot simpler way (omitting wrapper layer that calls either static or user flag functions)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun 13 Feb 2011 12:10:43 AM UTC, comment #6:

rewritten patch - do not try to merge both enums but do only a cleanup; no network changes!

(file #12419)

Matthias Pfafferodt <syntron>
Project Member
Sat 12 Feb 2011 04:24:27 PM UTC, comment #5:

> What is the big advantage of having these as specenum? There's
> several downsides, and with ruleset defined flags you get no
> advantage of being able to use _by_name() for instance.


IMO, specenums allow a clearer definition of the variable as well as of the name. In this case it is ahrd as the two enums as well as the user flags are interconnected. I think that the presented solution, especially with the different function, provide a clean way to handle this values.

Matthias Pfafferodt <syntron>
Project Member
Sat 12 Feb 2011 04:22:19 PM UTC, comment #4:

Ups, that's why there were no comments ;-)

I did find the old patch and rebased it to trunk (a lot of changes!). I hope all changes/renames are correct. Please test!

use specenum_gen for enum unit_flag_id and enum unit_role_id

  • rework handling of unit properties
  • cleanup role/flag/uflag usage in function names
  • unit_props: roles + flags + user flags
  • changed network protocol

(file #12407)

Matthias Pfafferodt <syntron>
Project Member
Sat 12 Feb 2011 02:46:10 PM UTC, comment #3:

What is the big advantage of having these as specenum? There's several downsides, and with ruleset defined flags you get no advantage of being able to use _by_name() for instance.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sat 12 Feb 2011 08:51:52 AM UTC, comment #2:

where is the patch?

Vijay Kiran Kamuju <infyquest>
Project Member
Tue 23 Nov 2010 08:46:23 AM UTC, comment #1:

this patch has to be addapted to the current codebase; it is work for 2.4.0

Matthias Pfafferodt <syntron>
Project Member
Sun 02 May 2010 09:45:12 PM UTC, original submission:

here I need some help:

  • at the moment these two enums are connected (unit_flag_id: 0-63; unit_role_id: 64...). Is this needed or can these two be separated?
  • user defined flags are possible for unit_flag_id. How can user defined flags be available while using specenum? Define them as F_USER_FLAG_1 to F_USER_FLAG_4?
Matthias Pfafferodt <syntron>
Project Member

 

(Note: upload size limit is set to 1024 kB, after insertion of the required escape characters.)

Attach File(s):
   
   
Comment:
   

 

Depends on the following items: None found

Digest:
   patch dependencies.

 

Carbon-Copy List
  • -unavailable- added by cazfi (Posted a comment)
  • -unavailable- added by infyquest (Posted a comment)
  • -unavailable- added by syntron (Submitted the item)
  •  

    Do you think this task is very important?
    If so, you can click here to add your encouragement to it.
    This task has 0 encouragements so far.

    Only logged-in users can vote.

     

    Please enter the title of George Orwell's famous dystopian book (it's a date):

     

     

    Follow 12 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 02 Jan 2013 02:48:43 AM UTCcazfiStatusReady For Test=>Done
      Open/ClosedOpen=>Closed
    Sun 30 Dec 2012 03:02:19 AM UTCcazfiAttached File-=>Added SpecenumUnitRoles.patch, #16880
    Wed 26 Dec 2012 12:49:29 AM UTCcazfiAttached File-=>Added SpecenumUnitTypeFlags.patch, #16871
    Sat 04 Aug 2012 12:40:20 AM UTCcazfiPriority3 - Low=>5 - Normal
      Assigned tosyntron=>cazfi
      Planned Release2.4.0=>2.5.0
    Sun 13 Feb 2011 12:10:43 AM UTCsyntronAttached File-=>Added 20110212-use-specenum_gen-for-enum-unit_flag_id-and-enum-unit.patch, #12419
    Sat 12 Feb 2011 04:22:19 PM UTCsyntronAttached File-=>Added 20110212-use-specenum_gen-for-enum-unit_flag_id-and-enum-unit.patch, #12407
      StatusIn Progress=>Ready For Test
    Tue 23 Nov 2010 08:46:23 AM UTCsyntronPlanned Release2.3.0=>2.4.0
    Sun 02 May 2010 09:45:30 PM UTCsyntronDependencies-=>patch #1446 is dependent
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup