[Freeciv-Dev] Re: (PR#2576) enum citizen_type and get_citizen_sprite use
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Sat, Dec 14, 2002 at 05:32:50PM -0800, Rafa³ Bursig via RT wrote:
>
> This patch sync. SDLClient with last citizens code.
> - pWidget->gfx = pCity_Icon->pBIG_Spec_Tax;
> + pWidget->gfx = (SDL_Surface *)get_citizen_sprite( CITIZEN_TAXMAN, 0,
> pCityDlg->pCity );
Please follow the style guide.
Why do you have to cast the result? *looking*
struct Sprite {
struct SDL_Surface;
};
*shudder*
Please change this to
struct Sprite {
struct SDL_Surface surface;
};
And then the line above will become
pWidget->gfx =
&get_citizen_sprite(CITIZEN_TAXMAN, 0, pCityDlg->pCity)->surface;
You may want to add an access macro for this if you with.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx
"Like the ad says, at 300 dpi you can tell she's wearing a
swimsuit. At 600 dpi you can tell it's wet. At 1200 dpi you
can tell it's painted on. I suppose at 2400 dpi you can tell
if the paint is giving her a rash."
-- Joshua R. Poulson
|
|