[Freeciv-Dev] Sound support - patch for the brave of heart
[Top] [All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index] [Thread Index]
Hi,
I am currently working on sound support in Freeciv. I have it partially
done and as I need some comments, advice and to keep you interested,
here is a rather crude first version of the patch which adds sound
support to FC.
IT IS NOT READY FOR CVS YET.
How does it work?
Some events like clicking on a unit, opening city dialog box and others
(currently just these two :)) call function sound() with parameters
consisting of player, action type and involved objects (in the case of
clicking on unit it is the unit)
In data directory is a file default.sounds which defines which sounds
are used for what. For example,
selectunit/settlers/french = "ouimessieur.wav"
selectunit/* = "yessir.wav"
Something like that. It is not complete atm, but not far from it. This
file is read on startup and after all rulesets are loaded the strings
are translated to numbers.
When the sound event arrives (i.e. sound() is called), the parameters
are translated to numbers and the right sound is found in the tree. It
is then passed to sound plugin for playing. Don't hold your breath, the
only plugin implemented now requires ESound and is veeeery stupid :))
After applying this patch run autoheader (iirc), aclocal, automake and
autoconf, change paths in data/default.sounds and in plugin.c, compile
and pray for it to work :))
The things I need some help with:
- How is it possible to use AM_CONDITIONAL() in acinclude.m4?? automake
issues warnings, fortunately it seems to work nonetheless
- Is there a place in client called repeatedly several times per second?
I would need it for sound libraries running in the same process (e.g.
plib)
What is still not done:
- translation to numbers of anything except unit names
- unit type classes (sea, air ...)
- inteligent configuration of plugins
- static linking of plugins
- more hooks for sound events
- more sound plugins
- documentation
- much more ... :(
Your comments will be VERY appreciated
Regards and happy screaching.
Edheldil
patch-freeciv-1.11.0-sounds-2.diff.gz
Description: GNU Zip compressed data
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Freeciv-Dev] Sound support - patch for the brave of heart,
Jarda Benkovsky <=
|
|