Complete.Org: Mailing Lists: Archives: freeciv-dev: February 2004:
[Freeciv-Dev] (PR#7416) RFC: death to earth
Home

[Freeciv-Dev] (PR#7416) RFC: death to earth

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: undisclosed-recipients: ;
Subject: [Freeciv-Dev] (PR#7416) RFC: death to earth
From: "Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx>
Date: Thu, 12 Feb 2004 01:06:05 -0800
Reply-to: rt@xxxxxxxxxxx

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

The field map.is_earth is really quite rediculous.  I know I've 
complained about this before, but here's the formal RFC.


I'm guessing most people have no idea what this field does.  Well, it 
only does one thing: when drawing the mapview in orthogonal view, the 
following code is called:

   if(map.is_earth &&
      abs_x0>=34 && abs_x0<=36 && abs_y0>=den_y && abs_y0<=den_y+1) {
     mysprite = sprites.tx.denmark[abs_y0-den_y][abs_x0-34];
   }

a particular scenario that is supposed to be "earth" can set the 
is_earth flag to trigger the above code.  This will cause a 3x2 grid of 
tiles to be drawn using the "denmark" tiles instead of the normal 
terrain drawing.  The denmark tiles, of course, are just a nice drawing 
of the terrain of Denmark.  All orthogonal-view tilesets are required to 
have these tiles in case the above code gets triggered.  The X values of 
34...36 are hard-coded; the scenario has to have its x==0 at the right 
place to fit.  den_y is calculated from the lattitude of denmark.

Two things about this are awful:
   - The tilesets are _required_ to have the tiles.
   - It is hard-coded in an incomprehensible way.


My proposal is this: a scenario may give, for each tile, the name of a 
sprite to use for that tile.  If this sprite name is given and if the 
tileset contains that sprite, it is used instead of the normal terrain 
drawing provided by the tileset.  It is easy to make this mimic the 
current behavior.  But it could also be used to do some really cool 
things: you could take a map of all earth, split it up into tiles, and 
play an entire game on this "accurate" map (with an appropriate scenario).

This is not something I plan to immediately address.  Patches welcome.

jason




[Prev in Thread] Current Thread [Next in Thread]
  • [Freeciv-Dev] (PR#7416) RFC: death to earth, Jason Short <=