[Freeciv-Dev] (PR#7261) restructure tileset to avoid explicit terrain me
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] (PR#7261) restructure tileset to avoid explicit terrain mention |
From: |
"Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx> |
Date: |
Sat, 14 Feb 2004 10:16:11 -0800 |
Reply-to: |
rt@xxxxxxxxxxx |
<URL: http://rt.freeciv.org/Ticket/Display.html?id=7261 >
> [i-freeciv-lists@xxxxxxxxxxxxx - Sat Feb 14 07:53:13 2004]:
>
> On Thu, Feb 12, 2004 at 12:54:15AM -0800, Jason Short wrote:
> > >>+ if (draw->match_type == 0 || draw->is_layered ||
is_ocean(terrain)) {
> >
> > >>+ if (draw->match_type != 0 && !is_ocean(terrain)) {
> > >
> > >
> > > What if neither the MARK line or this lines matches? Isn't there
> > > draw->base unset?
> >
> > Logically one of the lines will always match.
>
> Hmm the following form isn't much cleaner:
>
> bool tmp=draw->match_type != 0 && !is_ocean(terrain);
>
> if(tmp || draw->is_layered) {
>
> }
>
> if(!tmp) {
>
> }
I changed the code in the new patch so the logic is cleaner.
if (is_isometric && is_ocean(...)) {
/* special case */
} else {
if (draw->match_type == 0 || draw->is_layered) {
/* Draw base sprite. */
}
if (draw->match_type != 0) {
/* Draw matched sprite. */
}
}
jason
|
|