patchFreeciv - Patches: patch #4393, Support multiple city graphics...

 
 
Show feedback again

patch #4393: Support multiple city graphics providing buildings

Submitted by:  Marko Lindqvist <cazfi>
Submitted on:  Thu 02 Jan 2014 04:48:03 PM UTC  
 
Category: clientPriority: 5 - Normal
Status: DonePrivacy: Public
Assigned to: Marko Lindqvist <cazfi>Open/Closed: Closed
Planned Release: 2.6.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 21 May 2014 04:38:23 PM UTC, SVN revision 24914:

Turn former boolean effect "Visible_Wall" to integer. Value indicates which set of city sprites should be used.
There can be up to 7 sets of walled cities graphics, in addition to the unwalled version, for each city style.

See patch #4393

(Browse SVN revision 24914)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun 18 May 2014 02:45:23 PM UTC, comment #7:

- Make maximum number of Wall Types 7.

(file #20755)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun 18 May 2014 11:41:16 AM UTC, comment #6:

The non-boolean use-case I've created this for is that wall types act as upgrades to previous ones, so that only one is active at the time - EFT_VISIBLE_WALLS value is the "level" of the walls.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun 18 May 2014 11:37:49 AM UTC, comment #5:

Value 5 is completely arbitrary, just something I threw in for testing the implementation. You're right that 8 (or 7, if I recall correctly that non-walled city does not count toward NUM_WALL_TYPES) would be much more sensible.

UINT8 stands for 8-bit unsigned integer so it can contain values 0-255.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun 18 May 2014 11:27:34 AM UTC, comment #4:

This is brilliant, but could NUM_WALL_TYPES be 8 rather than 5, to support another boolean type, so that one could do something like:

City Walls: EFT_VISIBLE_WALLS: 1
Palace: EFT_VISIBLE_WALLS: 2
Television Tower: EFT_VISIBLE_WALLS: 4

Using potential images ilke:
0: Regular city
1: Walled city
2: Regular city with Palace
3: Walled city with Palace
4: Regular city with Television Tower
5: Walled city with Television Tower
6: Regular city with Palace and Television Tower
7: Walled city with Palace and Television Tower

Note that this would require restructuring the guard in packhand.c, as "8" wouldn't fit in UINT8.

That said, if there is a non-boolean intended use of this which I fail to understand,
please share, as I may agree that 5 is a better value.

Emmet Hikory <persia>
Project Member
Sun 18 May 2014 09:37:18 AM UTC, comment #3:

- Updated against svn, and this time tested too

(file #20754)

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Sun 18 May 2014 09:26:47 AM UTC, comment #2:

> Ooh, maybe I can use this to do the thing I've wanted to do for
> ages, of making the capital city obvious on the map.


Should be, if you define three "walls" sets:
1 -> Walls
2 -> Capital
3 (1+2) -> Capital with Walls

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.
Thu 02 Jan 2014 05:17:37 PM UTC, comment #1:

Ooh, maybe I can use this to do the thing I've wanted to do for ages, of making the capital city obvious on the map.

Jacob Nevins <jtn>
Project Administrator
Thu 02 Jan 2014 04:48:03 PM UTC, original submission:

Turn former boolean effect "Visible_Wall" to integer. Value indicates which set of building sprites should be used.
Tilesets can define either up to 5 buildings city sprite sets, or single wall sprite set like before. For positive "Visible_Wall" effect client first tries to display building sprite with that identifier, and if such sprite is not found, generic wall sprite.

Marko Lindqvist <cazfi>
Project AdministratorIn charge of this item.

 

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

Attach File(s):
   
   
Comment:
   

Attached Files
file #20755:  MultiWallGfx-3.patch added by cazfi (10kB - text/x-diff)
file #20754:  MultiWallGfx-2.patch added by cazfi (10kB - text/x-diff)
file #19612:  MultiWallGfx.patch added by cazfi (10kB - text/x-diff)

 

Depends on the following items: None found

Digest:
   patch dependencies.

 

Carbon-Copy List
  • -unavailable- added by persia (Posted a comment)
  • -unavailable- added by jtn (Posted a comment)
  • -unavailable- added by cazfi (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 7 latest changes.

    Date Changed By Updated Field Previous Value => Replaced By
    Wed 21 May 2014 04:38:58 PM UTCcazfiStatusReady For Test=>Done
      Assigned toNone=>cazfi
      Open/ClosedOpen=>Closed
    Sun 18 May 2014 02:48:55 PM UTCcazfiDependencies-=>patch #4699 is dependent
    Sun 18 May 2014 02:45:23 PM UTCcazfiAttached File-=>Added MultiWallGfx-3.patch, #20755
    Sun 18 May 2014 09:37:18 AM UTCcazfiAttached File-=>Added MultiWallGfx-2.patch, #20754
    Thu 02 Jan 2014 04:48:03 PM UTCcazfiAttached File-=>Added MultiWallGfx.patch, #19612
    Show feedback again

    Back to the top


    Powered by Savane 3.1-cleanup