Complete.Org: Mailing Lists: Archives: freeciv-dev: August 2001:
[Freeciv-Dev] Re: Introduction and Patch Approval Process
Home

[Freeciv-Dev] Re: Introduction and Patch Approval Process

[Top] [All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
To: freeciv-dev@xxxxxxxxxxx
Cc:
Subject: [Freeciv-Dev] Re: Introduction and Patch Approval Process
From: col@xxxxxxxxx
Date: Fri, 17 Aug 2001 09:14:36 +0200

Thue <thue@xxxxxxx> wrote ..
> On Friday 17 August 2001 08:54, col@xxxxxxxxx wrote:
> > Thue <thue@xxxxxxx> wrote ..
> >
> > > On Friday 17 August 2001 00:15, David Weisgerber wrote:
> > > > I am sorry about this but you have first to implement the sound
> > > > functions to the right places in the code. I will do that on the
> > > > latest CVS release GUI - code (GTK)
> > >
> > > In far most cases it should only be neccesary to change things in
> > > the shared client code to enable sound.
> > > Most events start in packhand.c, which then calls the gui specific
> > > layer to display them.
> > > Then you just implement sound by also calling the play function
> > > with the sound for the event.
> >
> > that's right and I did so for testing but this is not the best way I
> > think. But maybe I use both - GUI and packhand.c but the problem is
> > that there should only be sounds played for events you can see ?!
> >
> > CU,
> > David
> 
> Just make a call to is_tile_visible in the gui-specific layer. Fx for 
> moving a unit you would do
> 
> <Receive unit move>
> if (tile_visible_mapcanvas(punit->x, punit->y)) {
>    start_playing_sound(UNIT_MOVE_SOUND); /* asyncrone */
> }
> move_unit_map_canvas()
> 
> Generelly, keep as much code as possible out of the gui-specific part. 
> Otherwise it will have to be duplicated in all the client 
> implementations.

OK, than I will focus on implementing all the sound in control.c && packhand.c.
Do you know other files where I can do so ?
Maybe we can also play just all sounds, also the ones which we don't see...

CU,
David

PS: grrr... why do I forget to set the reply adress every time ?

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