Complete.Org: Mailing Lists: Archives: freeciv-dev: December 2002:
[Freeciv-Dev] Re: (PR#2516) introducing an enum citizen_type
Home

[Freeciv-Dev] Re: (PR#2516) introducing an enum citizen_type

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2516) introducing an enum citizen_type
From: "Rafa³ Bursig via RT" <rt@xxxxxxxxxxxxxx>
Date: Mon, 9 Dec 2002 08:23:05 -0800
Reply-to: rt@xxxxxxxxxxxxxx

Dnia 2002.12.09 06:01 Jason Short via RT napisa³(a):
> On Sun, 2002-12-08 at 22:45, Jason Short via RT wrote:
> > On Sun, 2002-12-08 at 10:12, Mike Kaufman via RT wrote:
> > > On Sun, Dec 08, 2002 at 02:16:39AM -0800, Raimar Falke via RT
> wrote:
> > > > >
> > > > > Good point.  Can we ever see enemy citizens?  If so, a player
> parameter
> > > > > is needed, which will be passed city_owner(pdialog->pcity) in
> most
> > > > > cases.
> > > >
> > > > Yes. Diplomat investigating an enemy city.
> > >
> > > what, are we going to make them look mean? If this is the only
> time and
> > > only reason, it's silly. Don't bother.
> >
> > Rafal's patch (PR#2495) provides different citizen sprites based on
> the
> > city style.  For this to work, get_citizen_sprite must know the
> player
> > or the city that the citizen belongs to.  More generally, this
> should
> > work with most/all conceivable differentiations of citizens
> (including
> > making "enemy" citizens look mean).
> 
> New patch attached.  This adds pcity as a parameter to
> get_citizen_sprite (reserved for future use...), as well as making the
> other changes pointed out by Raimar.
> 
The idea is nice but I see 2 problens.

1) Male and Female separation - if you remove this there should be 
precise rules to all creator of tile themes with male and female 
graphic. (Exp. Female first Male secound ) That code could proper load 
and draw it.

2) Setup Sprite Array moment - if it is done on start client ( now ) 
and you want use citizens styles (connect with city style ) you must 
use numbers to define gfx ( this is now ) in tilespec files. Creator of 
this themes must synhronise those numbers of tiles with city styles. 
IMO my solution is better becouse in tilespec files we use name of 
citizens style ( not number ). In this case setup moment should be do ( 
partial ) with setup city styles after game start.

somting like that ...

tilespec_setup_citizens_tiles( int style )
{
   if (!sprites.citizen[0].sprite[0]) {/* check generic elvis */
     int i;
     char buffer[64];
     for (i = 0; i < NUM_TILES_CITIZEN; i++) {
       my_snprintf(buffer, sizeof(buffer), "citizen.%s_%s",
                  city_styles[style].citizens_graphic, 
get_citizen_name(i) );
       sprites.citizen[i].sprite[ style + 1 ] = 
hash_lookup_data(sprite_hash, buffer);
       if (!sprites.citizen[i].sprite[ style + 1]) {
         break;
       }
       sprites.citizen[i].count++;
     }
   }
}

this funct should be call at end of handle_ruleset_city(...) or in 
tilespec_setup_city_tiles(...)
( here still lack solution on Male/Femal problem )

Rafal

---------------------------------------------------------------------------
Pocztowki przez SMS? Zobacz:
>>> http://pocztowki.interia.pl <<<





[Prev in Thread] Current Thread [Next in Thread]