Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] map_adjust_x (was: Profiling Civserver again)
Home

[Freeciv-Dev] map_adjust_x (was: Profiling Civserver again)

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Reinier Post <rp@xxxxxxxxxx>
Cc: Freeciv-Dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] map_adjust_x (was: Profiling Civserver again)
From: Mike Kaufman <mkaufman@xxxxxxxxxxxxxx>
Date: Thu, 2 Aug 2001 12:12:09 -0500

On Thu, Aug 02, 2001 at 02:54:48PM +0200, Reinier Post wrote:
> On Wed, Aug 01, 2001 at 06:31:27PM -0500, Mike Kaufman wrote:
> > Perhaps someone could answer this for me: why do we _have_ to assume 
> > possible X values outside [-map.xsize,2*map.xsize] ? When would this 
> > (legitimately) happen?
> 
> The screen can be much wider than the map.  The last time I tried this out
> was 2 years ago, and the screen updating was broken then (see
> 
>   http://www.freeciv.org/~hop/examples/wrap1.jpg
>   http://www.freeciv.org/~hop/examples/wrap2.jpg
>
> ).  With the tinydent tiles, it's easy to wrap around several times.

I get different behaviour (on gtk+): log in as "user" with the attached 
savegame. hit return, make your civclient as wide as possible. I get a line of 
blackness on the right side. You can still move the map by right-clicking in 
the black (though is this the behaviour we want?) but the map does not wrap 
around.

> 
> 
> > If a function is (naughtily) setting X too big or small, let's correct the 
> > function. Grepping through the code, I don't see a massive number of places 
> > where map_adjust_x() is called. Ought not be that hard to track down. 
> > Someone please correct my naivete
> 
> Would it be helpful to turn absolute screen coordinates, relative
> coordinates and map coordinates into different C types?  That way
> the type checker could help out.

perhaps.
> 
> > -mike
> 
> -- 
> Reinier

Attachment: wrapgame1.gz
Description: Binary data


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