[Freeciv-Dev] Re: [PATCH] city_map_size fix and idea
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
On Wed, Aug 22, 2001 at 06:43:58PM -0400, Ross W. Wetmore wrote:
> I'm sure the patch will only get bigger until it is committed. There are
> a lot of these sort of bugs lurking in the current codebase that need to
> be fixed.
I'm sorry I meant: "I just hope the patch wouldN'T be so big."
> For example here is another one to add to 06a that cored on me a day or
> so ago. It will be part of the next corecleanup_07 :-).
>
> tilespec.c:
> @@ -1530,10 +1540,15 @@
> if(ptile->known==TILE_KNOWN_FOGGED && draw_fog_of_war) *sprs++ =
> sprites.tx.f
> og;
>
> if(!citymode) {
> - tileno = INDEX_NSEW((tile_is_known(abs_x0, abs_y0-1)==TILE_UNKNOWN),
> - (tile_is_known(abs_x0, abs_y0+1)==TILE_UNKNOWN),
> - (tile_is_known(abs_x0+1, abs_y0)==TILE_UNKNOWN),
> - (tile_is_known(abs_x0-1, abs_y0)==TILE_UNKNOWN));
> + tileno = INDEX_NSEW(
> + (is_real_tile(abs_x0, abs_y0-1)
> + && (tile_is_known(abs_x0, abs_y0-1)==TILE_UNKNOWN)),
> + (is_real_tile(abs_x0, abs_y0+1)
> + && (tile_is_known(abs_x0, abs_y0+1)==TILE_UNKNOWN)),
> + (is_real_tile(abs_x0+1, abs_y0)
> + && (tile_is_known(abs_x0+1, abs_y0)==TILE_UNKNOWN)),
> + (is_real_tile(abs_x0-1, abs_y0)
> + && (tile_is_known(abs_x0-1, abs_y0)==TILE_UNKNOWN)));
> if (tileno)
> *sprs++ = sprites.tx.darkness[tileno];
> }
But constructs aren't very nice. What do they do? Can't this be put
into a macro/function?
> Actually if you like I could send you one of these every five minutes until
> you had the whole of corecleanup_06a. But it is probably more efficient to
> process most of these similar things in a single pass, rather than 129
> separate 20 line emails :-).
No as I pointed you. Make one patch for each _iter replacement.
Raimar
--
email: rf13@xxxxxxxxxxxxxxxxx phone: +49 351 4415773 icq: 54420251
pgp 2: id: 0F9D7955 len: 1024 fingerprint: 7760F933D5478009 4FA0C56F1DC2FB8E
Microsoft does have a year 2000 problem. I'm part of it. I'm running Linux.
- [Freeciv-Dev] Re: [PATCH] city_map_size fix and idea, (continued)
- [Freeciv-Dev] Re: [PATCH] city_map_size fix and idea, Ross W. Wetmore, 2001/08/22
- [Freeciv-Dev] Re: [PATCH] city_map_size fix and idea, Raimar Falke, 2001/08/22
- [Freeciv-Dev] Re: [PATCH] city_map_size fix and idea, Ross W. Wetmore, 2001/08/22
- [Freeciv-Dev] Re: [PATCH] city_map_size fix and idea, Trent Piepho, 2001/08/22
- Message not available
- [Freeciv-Dev] Re: [PATCH] city_map_size fix and idea, Ross W. Wetmore, 2001/08/22
- [Freeciv-Dev] Re: [PATCH] city_map_size fix and idea, Trent Piepho, 2001/08/22
- [Freeciv-Dev] Re: [PATCH] city_map_size fix and idea, Gregory Berkolaiko, 2001/08/24
- [Freeciv-Dev] Re: [PATCH] city_map_size fix and idea,
Raimar Falke <=
[Freeciv-Dev] Re: [PATCH] city_map_size fix and idea, Ross W. Wetmore, 2001/08/22
[Freeciv-Dev] Re: [PATCH] city_map_size fix and idea, Trent Piepho, 2001/08/22
|
|