[Freeciv-Dev] (PR#4691) replace regular_map_pos_is_normal users with nat
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: |
undisclosed-recipients: ; |
Subject: |
[Freeciv-Dev] (PR#4691) replace regular_map_pos_is_normal users with native coordinates |
From: |
"Jason Short" <jdorje@xxxxxxxxxxxxxxxxxxxxx> |
Date: |
Mon, 15 Sep 2003 12:50:27 -0700 |
Reply-to: |
rt@xxxxxxxxxxxxxx |
[glip - Thu Sep 11 11:47:37 2003]:
> [jdorje - Fri Jul 25 20:13:08 2003]:
>
> > This patch removes the regular_map_pos_is_normal macro, and replaces
its
> > users (in savegame.c) with native coordinates instead.
> >
> > This means the savegames will be stored in native coordinates. For an
> > iso-map this is a big savings versus using map coordinates since the
> > native coordinates are rectangular.
>
> In SAVE_NORMAL_MAP_DATA, where does y (or nat_y) come from? Where are
> they defined?
These exist (and must match) both inside and outside the macro. This is
a significant hack; on the other hand, that's how it's already been done.
In the current code y is used at all three levels (caller,
SAVE_NORMAL_MAP_DATA definition, SAVE_MAP_DATA definition):
SAVE_NORMAL_MAP_DATA(file, terrain_chars[map_get_tile(x, y)->terrain],
"map.t%03d");
#define SAVE_NORMAL_MAP_DATA(secfile, get_xy_char, secfile_name) \
SAVE_MAP_DATA(get_xy_char, \
secfile_insert_str(secfile, line, secfile_name, y))
#define SAVE_MAP_DATA(get_xy_char, secfile_insert_line) \
{ \
char *line = fc_malloc(map.xsize + 1); \
int x, y; \
It may be possible to decrease this hack by adding it as a parameter.
Hmm...
jason
- [Freeciv-Dev] (PR#4691) replace regular_map_pos_is_normal users with native coordinates, Gregory Berkolaiko, 2003/09/11
- [Freeciv-Dev] (PR#4691) replace regular_map_pos_is_normal users with native coordinates,
Jason Short <=
- [Freeciv-Dev] (PR#4691) replace regular_map_pos_is_normal users with native coordinates, Jason Short, 2003/09/15
- [Freeciv-Dev] (PR#4691) replace regular_map_pos_is_normal users with native coordinates, Jason Short, 2003/09/15
- [Freeciv-Dev] (PR#4691) replace regular_map_pos_is_normal users with native coordinates, Jason Short, 2003/09/15
- [Freeciv-Dev] (PR#4691) replace regular_map_pos_is_normal users with native coordinates, Gregory Berkolaiko, 2003/09/30
|
|