Complete.Org: Mailing Lists: Archives: freeciv-dev: October 2001:
[Freeciv-Dev] Re: GUI PATCH: refresh_tile_mapcanvas cleanup
Home

[Freeciv-Dev] Re: GUI PATCH: refresh_tile_mapcanvas cleanup

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: jdorje@xxxxxxxxxxxx
Cc: freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: GUI PATCH: refresh_tile_mapcanvas cleanup
From: Andreas Kemnade <akemnade@xxxxxxxxxxx>
Date: Wed, 10 Oct 2001 20:33:24 +0200

Jason Dorje Short writes:
 > Andreas Kemnade wrote:
 > > 
 > > Jason Dorje Short writes:
 > >  > The function refresh_tile_mapcanvas() is absolutely identical in every
 > >  > GUI.
 > >  >
 > >  > So, in the process of cleaning up the map_adjust_[xy] calls I moved it
 > >  > into common client code.  Two problems:
 > >  >
 > >  > - There is no client/mapview.[ch], where it should properly go, so I put
 > >  > it into client/climisc.[ch].
 > > You should put it into client/mapview_generic.[ch]. (Create that file).
 > > Other stuff will appear there, too.
 > > I have thought about cleaning up
 > > gui-*/mapview.c, too.
 > 
 > Why mapview_generic.c instead of just mapview.c?  The former is more
 > descriptive but the latter seems to be the standard.

I don't want to have the same source file name twice in one executable
(mapview in client and in client/gui-*). What happens if you debug
the client and have to set the path to the source using the dir
command in gdb? Does gdb know in which file it has to look? Does gcc
know in which case it has to include the mapview.h in client or the
one in client/gui-*?

 > 
 > > Result: The Xaw client has isometric mode (without correct numpad and
 > > scrollbar handling). During cleanup there were many patches that touch
 > > every gui-*/mapview.c. That means a high risk of damaging a
 > > client. Ideally the guy who does such a patch should have the ability to
 > > check every client. But if these steps described above you can change
 > > lots of things without touching code you probably cannot check.
 > 
 > Yes, it would give very good result.
 > 
 > Unfortunately in this particular case I later realized that the BeOS
 > client uses a completely different structure for this code.  I haven't
 > quite been able to track it down, but it's not something I could change
 > anyway.
AFAIK the BeOS client is not usable yet anyway. You can check this on
the project page of that port. The stuff in mapview.cpp seems only
forward things.

Greetings
Andreas Kemnade 


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