Commit Graph

22 Commits (502c8a19ac44b723722a39b759f2b3adf0c307e3)

Author SHA1 Message Date
Buginator edb644a03b Fix (and add missing) headers to files.
2009  Warzone Resurrection Project -> 2010  Warzone 2100 Project

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11298 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-28 18:58:33 +02:00
Buginator 2c03546f87 partial revert of r5763
Clean up and fix 3D sound.
We now have true 3D sound that works correctly.

See ticket:920 for more information about the revert.

fixes ticket:220


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8098 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-28 22:21:01 +02:00
Dennis Schridde aac41748dc Bump copyright
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6617 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 18:01:48 +00:00
Dennis Schridde 52b07e9cf0 Move piefixedpoint.h and pievector.h out of ivis, since they are quite generic
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6615 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:18 +00:00
Giel van Schijndel a293a90e76 * Rename audio_Get3DPlayerPos to audio_GetPlayerPos and change it to return a Vector3f instead
* Rename audio_Get3DPlayerRotAboutVerticalAxis to audio_GetPlayerOrientation and change it to return two Vector3f's with a forward and upward pointing vector in it (which can be directly used by OpenAL)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5763 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-03 17:51:43 +00:00
Giel van Schijndel 4a17aeeec7 * Delete unused and empty function StartTacticalScroll()
* Mark the parameters for several functions as WZ_DECL_UNUSED (for those functions that require the parameter as part of their interface)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4701 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 17:17:50 +00:00
Giel van Schijndel 6ddb4af1d5 Clean up header files of sound library:
* Change file-specific comments into Doxygen comments
 * Remove a whole load of unused and unnecessary macros
 * When compiling as C++ make sure to use C linkage


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3627 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-01 20:43:11 +00:00
Giel van Schijndel 6de5602631 * Make sound_PlayStream and audio_PlayStream return a AUDIO_STREAM* pointer instead of a bool
This pointer can later on be used to stop, pause & resume playing of the given stream


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3577 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-27 21:28:35 +00:00
Giel van Schijndel 3d245df0f9 * Provide an implementation of sound_PlayStream
* Modify audio_PlayStream's prototype to match sound_PlayStream's implementation & prototype
 * In cdspan_PlayInGameAudio use sasprintf instead of a statically sized array and snprintf
 * Add some Doxygen comments

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3276 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-31 15:16:59 +00:00
Giel van Schijndel db3d933791 * Add a new cheat/debug-command "showsamples"
* This command will cause the amount of samples in the sound library's queues & lists to be constantly displayed (until turned off) on screen

Patch #887 by Buginator


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3107 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-19 20:17:54 +00:00
Giel van Schijndel 99c55dbf74 * Try to encapsulate knowledge about AUDIO_SAMPLE's internal representation in openal_track.c (i.e. don't use it in client code!)
* Look at sound_StopSample specifically
 * Use a function to manipulate the linked list of audio samples (i.e. get rid of duplicated code)
 * Allow printing of OpenAL vendor, version, renderer and extensions data on multiple debug "channels" to reduce code duplication
 * Add openal_error.[ch] for error detection (and producing debug messages for them!)
 * Add TOSTRING and AT_MACRO macros to macros.h
 * Get rid of some super-nested if-branches where one of them would return (so we don't actually need an else-branch because the function is left anyway)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3047 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-13 23:16:03 +00:00
Per Inge Mathisen ec232d7e0f Actually use audio.cfg configuration of sound volume. Patch by Buginator in patch #822
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2677 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-02 18:47:22 +00:00
Giel van Schijndel 84a07b03a5 * Remove unused (and sometimes empty) functions sound_SetSamplePan, sound_SetSampleVolAll, sound_GetMaxVolume, audio_GetMixVol, audio_Get3DVolume
* Remove global var g_i3DVolume and audio_Set3DVolume which would set its value since g_i3DVolume was never ever read (well audio_Get3DVolume read it, but this function never got called)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1976 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-25 19:04:33 +00:00
Giel van Schijndel 3c874190c7 * remove the (unused) ability to decode tracks from memory buffers
* move construction (allocation and initialization) of struct TRACK to openal_track.c where it is also decoded

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1401 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-09 12:16:31 +00:00
Giel van Schijndel 99153c743c * remove some dead code (resource preload callback stuff)
* turn a one-statement function into an inline (resDoResLoadCallback)
 * revive resource loading from file (the function pointer for this was removed in r1394, to actually use this pointer new code had to be written)
 * modify resDataInit to handle memory allocation as well as data initialization
 * modify struct RES_DATA to not have a fixed size char array to contain the filename (is now dynamically allocated together with the rest of the struct, see resDataInit)
 * modify some argument lists to take `const char*` instead of `char*`
 * change resLoadFile to use RES_TYPE.fileLoad if available, also remove an unused if statement (well actually the condition could never be false)
 * resource type "WAV" (see data.c) now directly loads from a file (rather than copying the file entirely into memory and then to operate on that)
 * fix sound_ConstructTrack (track.c) where I used the wrong source to copy the filename from
 * fix sound_LoadTrackFromBuffer (track.c) to *not* add the track to the tracklist because this breaks other code
 * modify sound_ReleaseTrack (track.c) to gracefully deal with NULL pointers
 * remove dataAudioRelease (data.c) and instead just use sound_ReleaseTrack

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1397 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-08 21:39:24 +00:00
Giel van Schijndel dfa8d64f27 * modify construction functions of TRACK to return pointers instead of BOOLs (and if we return a NULL pointer we first free the original memory, previous code would leak if errors would occur during construction)
* remove wrapping function audio_LoadTrackFromFile from lib/sound/audio.c
 * move similar code in sound_LoadTrackFromBuffer and sound_LoadTrackFromFile to a static inline: sound_ConstructTrack (lib/sound/track.c)
  * this code also allocates memory for a TRACK and a string using one malloc call, this to make one free call sufficient for cleaning those up (they should _always_ be free'd together anyway, which previously was *not* always the case: memleaks)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1395 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-08 18:51:15 +00:00
Dennis Schridde 49ceba7503 Add GPL notices to all sourcecode files.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1014 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-15 20:09:25 +00:00
Dennis Schridde a432f5628f Patches by Christian Ohm:
010 - Remove unused sound compression code
011 - Remove unused audio parameter VagID


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@863 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-26 11:45:04 +00:00
Stefan Huehner 30f6dc392e mark some Strings an read-only by adding const.
On the way replace STRING with char



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@756 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-24 19:11:34 +00:00
Per Inge Mathisen 2149739999 Almost all strings and buffers are now of type char. This fixes
more than half the warnings on gcc4, and makes sure we do not
get signedness problems between platforms where char is defined
with different signedness. Also set line-ending properites for
some bison/flex files that did not have it set.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@563 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-12 16:52:37 +00:00
Per Inge Mathisen a3df2ad6c8 Another force fix. Remove more references to DirectX.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@552 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-10 13:53:26 +00:00
No Author 5ba7ddac6b Create final repository structure.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@362 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-28 17:47:08 +00:00