[Freeciv-Dev] Re: (PR#8627) best overview for iso-maps
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
<URL: http://rt.freeciv.org/Ticket/Display.html?id=8627 >
Marcelo Burda wrote:
> void overview_to_map_pos(int *map_x, int *map_y,
> int overview_x, int overview_y)
> {
> - int nat_x = overview_x / OVERVIEW_TILE_WIDTH + overview.map_x0;
> - int nat_y = overview_y / OVERVIEW_TILE_HEIGHT + overview.map_y0;
> + int ntl_x = overview_x / OVERVIEW_TILE_WIDTH,
> + ntl_y = overview_y / OVERVIEW_TILE_HEIGHT;
>
> - native_to_map_pos(map_x, map_y, nat_x, nat_y);
> + /* if there are no wraps in x axes, we need to correct
> + return value of the unused(black) space in iso view */
> + if(topo_has_flag(TF_ISO) && !topo_has_flag(TF_WRAPX)) {
> + int dx = (ntl_y & 1);
> + if ( ntl_x >= map.xsize * 2 - 2 + dx ) {
> + ntl_x -= 1;
> + } else if (ntl_x < dx ) {
> + ntl_x += 1;
> + }
> + }
This code is too much of a hack.
If we use natural coordinates outright, we need to do it correctly.
Don't hard-code the natural system in the overview code. Like I said
before, this will be hard.
I'm okay with using "modified native coordinates" here for now. That's
just as much of a hack but it's much smaller.
jason
- [Freeciv-Dev] Re: (PR#8627) best overview for iso-maps, (continued)
- [Freeciv-Dev] Re: (PR#8627) best overview for iso-maps, Marcelo Burda, 2004/05/06
- [Freeciv-Dev] Re: (PR#8627) best overview for iso-maps, Jason Short, 2004/05/06
- [Freeciv-Dev] Re: (PR#8627) best overview for iso-maps, Marcelo Burda, 2004/05/06
- [Freeciv-Dev] Re: (PR#8627) best overview for iso-maps, Marcelo Burda, 2004/05/06
- [Freeciv-Dev] (PR#8627) best overview for iso-maps, Jason Short, 2004/05/07
- [Freeciv-Dev] Re: (PR#8627) best overview for iso-maps, Jason Short, 2004/05/08
- [Freeciv-Dev] Re: (PR#8627) best overview for iso-maps, Marcelo Burda, 2004/05/08
- [Freeciv-Dev] Re: (PR#8627) best overview for iso-maps, Marcelo Burda, 2004/05/08
- [Freeciv-Dev] (PR#8627) best overview for iso-maps, Marcelo Burda, 2004/05/08
- [Freeciv-Dev] Re: (PR#8627) best overview for iso-maps, Marcelo Burda, 2004/05/09
- [Freeciv-Dev] Re: (PR#8627) best overview for iso-maps,
Jason Short <=
- [Freeciv-Dev] Re: (PR#8627) best overview for iso-maps, Marcelo Burda, 2004/05/09
- [Freeciv-Dev] Re: (PR#8627) best overview for iso-maps, Marcelo Burda, 2004/05/09
- [Freeciv-Dev] Re: (PR#8627) best overview for iso-maps, Jason Short, 2004/05/09
- [Freeciv-Dev] Re: (PR#8627) best overview for iso-maps, Marcelo Burda, 2004/05/09
- [Freeciv-Dev] Re: (PR#8627) best overview for iso-maps, Jason Short, 2004/05/09
- [Freeciv-Dev] Re: (PR#8627) best overview for iso-maps, Marcelo Burda, 2004/05/09
- [Freeciv-Dev] Re: (PR#8627) best overview for iso-maps, Marcelo Burda, 2004/05/09
- [Freeciv-Dev] Re: (PR#8627) best overview for iso-maps, Jason Short, 2004/05/10
- [Freeciv-Dev] Re: (PR#8627) best overview for iso-maps, Marcelo Burda, 2004/05/12
- [Freeciv-Dev] Re: (PR#8627) best overview for iso-maps, Jason Short, 2004/05/12
|
|