Commit Graph

9 Commits (b1a42e88ee8004de082a5644cab6bd5cedf665d6)

Author SHA1 Message Date
Giel van Schijndel 98e6c05da1 * Allow compilation without sound; when used this eliminates the compile & link time requirement of libvorbisfile, libvorbis, libogg and libopenal
* This conditional compilation is controlled by WZ_NOSOUND (which replaces WZ_NOOGG)
 * Remove an unneed inclusion from oggvorbis.h (track.h)

NOTE: This is currently integrated in none of the build systems

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1832 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-06 17:09:23 +00:00
Dennis Schridde 58e8bda3a9 _ISOC99_SOURCE is a libc macro, we now use WZ_C99 instead (which gets defined via __STDC_VERSION__)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1749 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 14:55:24 +00:00
Dennis Schridde fde0d68082 - (__STDC_VERSION__ >= 199901L) -> defined(_ISOC99_SOURCE)
- Tune lighting and enable by default (This doesn't seem to affect the terrain)
- Declaration updates (Trolltech says that attributes need to go after the "static inline", the GCC manual is a bit unspecific about this)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1744 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 14:09:10 +00:00
Giel van Schijndel 73cf341da5 * Add failsafe to OggVorbis PhysicsFS seek callback to deal with invalid "whence" values
* Use tabulated code indentation for oggvorbis.[ch]
 * Move curPos and fileSize into a more localized scope

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1741 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 10:32:15 +00:00
Giel van Schijndel de4b91e2c3 * Use a forward declaration of `struct OggVorbisDecoderState` instead of a dual typedef (one typedef as void for external functions, one as the struct for the implementation file), only to allow us to take pointers to it
* Drop now unnecessary extern "C" declaration, since C++'s function overloading shouldn't cause problems now
 * Add "struct" keyword in front of all declarations of `struct OggVorbisDecoderState` or pointers to it

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1698 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-25 14:56:18 +00:00
Giel van Schijndel 12078733b8 * Fix usage of `new` which is both a) a keyword in C++, and b) an undescriptive variable name
* Make sure function overloading by a C++ compiler doesn't cause linker errors by declaring affected functions extern "C"

Patch by Christian Ohm (in message <20070523201048.GF3778@localdomain>);
 * applied changes to lib/ivis_common/imdload.c
 * brought linker errors to light caused by function overloading

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1695 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-23 20:57:11 +00:00
Giel van Schijndel c4d97027ba * Fix a memory leak (didn't free the buffer we received, after using it)
* Remove the ability to decode into a specified buffer from sound_DecodeOggVorbis altogether, we now only use a buffer we malloc'ed ourselves
  * this might be slightly slower for streaming (depending on the malloc implementation), but can be easily optimized away by just increasing the buffer size (which IMO is a better optimization, because it's _a_lot_ simpler)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1573 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-01 00:30:37 +00:00
Giel van Schijndel bfad55739b * modularize OggVorbis decoding code:
* remove OpenAL dependency of oggvorbis.[ch]
  * move sound_DecodeOggVorbisTrack to openal_track.c

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1571 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-30 23:52:51 +00:00
Giel van Schijndel bdb506f697 * move OggVorbis decoding functionality to oggvorbis.[ch]
* did _not_ add copyright statement for "Eidos" to new files since Eidos never wrote anything about this OpenAL/OggVorbis code (if anyone thinks I'm wrong in doing this, please say so on the mailinglist)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1566 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-30 17:58:27 +00:00