Complete.Org: Mailing Lists: Archives: freeciv-dev: January 2002:
[Freeciv-Dev] Re: Numbered tile markers
Home

[Freeciv-Dev] Re: Numbered tile markers

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: Teemu Kurppa <tkurppa@xxxxxxxxxx>
Cc: freeciv-dev <freeciv-dev@xxxxxxxxxxx>
Subject: [Freeciv-Dev] Re: Numbered tile markers
From: Raimar Falke <hawk@xxxxxxxxxxxxxxxxxxxxxxx>
Date: Wed, 9 Jan 2002 17:22:15 +0100
Reply-to: rf13@xxxxxxxxxxxxxxxxxxxxxx

On Tue, Jan 08, 2002 at 07:12:39PM +0200, Teemu Kurppa wrote:
> On Tue, 8 Jan 2002, Raimar Falke wrote:
> > > There are some problems with Xserver and GTK key events to catch shift+key
> > > events. I'll discuss these in another message. So, if shift+<some number>
> > > doesn't work, try keypad numbers instead. 
> > 
> > What about using F1-F12 instead?
> 
> The basic problem is still there: people may have modified keymaps that
> produce some other key events than F12 when shift+F12 is pressed. We can
> use F1-F12, if people prefer them over number keys. I usually use a lot
> CTRL+F? for other purposes, that's why I chose plain number keys. 
>  
> > > Marker data is persistent, if server has "attributes" capability
> > > (1.12.1-devel). So, if you disconnect and reconnect, markers are 
> > > restored. 
> > > However, you can use them also on servers without "attributes" capability,
> > > but then marker data is lost, if you disconnect. 
> > >  
> > > Once small technical problems are solved, I'll send this to patch tracking
> > > system.
> > 
> > IMHO it should be easy to convert it to use a single attibute.
> 
> I was about to do that, but then I noticed that it's not that easy to just
> dump whole list, because it's linked structure, not continuous memory
> block... 
> 
> Look at my initial solution. Is it okay ? 

Smaller problems (besides the attribute stuff and the keymap problem): 

 - some functions in markers.c should be static
 - change 
+  struct tile_marker *pmarker;
+
+  if( (pmarker = find_marker_at(x,y)) ) {

into
+  struct tile_marker *pmarker = find_marker_at(x,y);
+
+  if(pmarker) {

 - maybe action should be called toggle?
 - can't some the functions be folded together? There are three
 add_marker methods.
 - "struct tile_marker" and "extern struct tile_marker_list markers"
 doesn't have to be published

        Raimar

-- 
 email: rf13@xxxxxxxxxxxxxxxxx
 "These download files are in Microsoft Word 6.0 format. After
  unzipping, these files can be viewed in any text editor, including
  all versions of Microsoft Word, WordPad, and Microsoft Word Viewer."
    -- http://www.microsoft.com/hwdev/pc99.htm


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