Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2004:
[Freeciv-Dev] Re: (PR#2957) is ocean as a function with oceanness read f
Home

[Freeciv-Dev] Re: (PR#2957) is ocean as a function with oceanness read f

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: kayeats@xxxxxxxxxxxx
Subject: [Freeciv-Dev] Re: (PR#2957) is ocean as a function with oceanness read from ruleset
From: "Raimar Falke" <i-freeciv-lists@xxxxxxxxxxxxx>
Date: Sun, 18 Jan 2004 10:08:19 -0800
Reply-to: rt@xxxxxxxxxxx

<URL: http://rt.freeciv.org/Ticket/Display.html?id=2957 >

On Sun, Jan 18, 2004 at 09:23:10AM -0800, Jason Short wrote:
> 
> <URL: http://rt.freeciv.org/Ticket/Display.html?id=2957 >
> 
> > [jdorje - Sat Jan 17 17:40:43 2004]:
> > 
> > Here is a patch that does the exact same thing, but uses a terrain flag
> > instead of adding a new boolean terrain value.
> 
> Here's the same patch, but with documentation.

Very nice.

>  enum terrain_flag_id {
>    TER_NO_BARBS, /* No barbarians summoned on this terrain. */
> +  TER_OCEANIC, /* This is an ocean terrain. */

The comment is almost redundant.

> -#define is_ocean(x) ((x) == T_OCEAN)
> -#define is_ocean_near_tile(x, y) is_terrain_near_tile(x, y, T_OCEAN)
> +#define is_ocean(x) (terrain_has_flag((x), TER_OCEANIC))
> +#define is_ocean_near_tile(x, y) is_terrain_flag_near_tile(x, y, TER_OCEANIC)
>  #define adjacent_ocean_tiles4(x, y) adjacent_terrain_tiles4(x, y, T_OCEAN)
>  #define count_ocean_near_tile(x,y) count_terrain_near_tile(x,y, T_OCEAN)

Inline functions for all of them.

> +                         units.  Most terrain improvements can only be built
> +                         on land.  Oceanic terrain has no zones of control.

Which terrain improvements can be build on ocean tiles?

> diff -u -r1.6 README.rulesets
> --- doc/README.rulesets       2002/11/02 13:33:54     1.6
> +++ doc/README.rulesets       2004/01/18 17:21:50
> @@ -168,6 +168,12 @@
>  The civstyle option will be removed in the near future.
>  
>  ----------------------------------------------------------------------
> +terrain.ruleset:
> +----------------
> +
> +
> +
> +----------------------------------------------------------------------

Huh?

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
  The Software is not designed or licensed for use in on-line control
  equipment in hazardous environments, such as operation of nuclear
  facilities, aircraft navigation or control, or direct life support
  machines. 
    -- Java Compiler Compiler Download and License Agreement




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