Giel van Schijndel
623044cf7c
Add some debug messages when failing to create an AUDIO_STREAM in sound_PlayStreamWithBuf
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5467 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 15:47:27 +00:00
Per Inge Mathisen
1f831ebd3d
Add beginnings of self-test to openal and general audio subsystems.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5456 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 19:07:42 +00:00
Per Inge Mathisen
2aeda4d91e
Improve playlist selftest. It now covers the entire playlist API. Remove unused
...
playlist declaration from header file.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5448 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 16:19:57 +00:00
Per Inge Mathisen
ee6452eb64
Revert r5426. It will not work quite like that, since the pointers refer
...
to a list in audio.c. The horror! The horror!
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5428 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 18:24:42 +00:00
Per Inge Mathisen
74aeca0093
Change current_queue_sample to a pointer to an AUDIO_SAMPLE instead of
...
an integer value. This fixes the problem of AL_INVALID being used for
invalid values, while it is really a perfectly valid ID for a sample.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5426 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 17:45:33 +00:00
Per Inge Mathisen
4d1d5b4c11
Add an error check to patch #1082 : Fix AL_INVALID_NAME bug, to catch the
...
currently impossible case of the sample not being in the active list.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5425 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 17:11:58 +00:00
Per Inge Mathisen
22d4eb3fe1
patch #1082 : Fix AL_INVALID_NAME bug, sans one no good assert.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5422 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 16:12:14 +00:00
Dennis Schridde
302a557478
Rename "raw" Makefiles to "win32" Makefiles
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5402 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-06 14:29:04 +00:00
Dennis Schridde
fec1f446d3
Use clipf to clip float values
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5349 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-29 12:07:32 +00:00
Dennis Schridde
45f23a4926
Merge commit 'HEAD@{3}'
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5347 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-28 22:32:44 +00:00
Per Inge Mathisen
5ea6c60eee
Do not initialize music sound system when --nosound option given.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5343 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-28 15:32:06 +00:00
Giel van Schijndel
bc810ca2e2
Reset to the start of the playlist when we've reached the end of it, don't move past the end first. This addresses bug #11879 in part (by preventing it even further from occuring).
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5333 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-25 20:15:20 +00:00
Giel van Schijndel
1c6ff360db
Use if (condition) something; else something-else; instead of if (condition) something; if (!condition) something-else;
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5329 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-25 14:01:18 +00:00
Giel van Schijndel
da0b168df3
Don't pass a NULL pointer to cdAudio_OpenTrack
...
This should fix bug #11879
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5328 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-25 14:00:20 +00:00
Giel van Schijndel
9fcaf6c08f
Slight refactoring of cdAudio_PlayTrack to use a switch on the enum, instead of an if, if-else structure
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5327 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-25 13:56:17 +00:00
Dennis Schridde
050ec39c11
Use the (also new in this commit) relative variants of the directories almost everywhere.
...
Exception is when generating the .wz files, where we need the path to the build directory and building a reverse relative path to $(srcdir) will be messy.
Also silence submake.mk a great deal.
Bug #11883 should be fixed now for the most part.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5325 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 23:41:52 +00:00
Dennis Schridde
fd2bfb0e0f
Prepare for another fix for parts of bug #11883 : Issues with the improved raw Makefiles
...
- Rename Makefile.raw to lowercase
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5321 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 22:48:45 +00:00
Dennis Schridde
73b35ab8d6
Rename top_srcdir/top_builddir to abs_top_srcdir/abs_top_builddir, to make this more obvious.
...
Their use is currently flawed, since it will not work in directories with spaces in them... (
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5319 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 20:19:54 +00:00
Dennis Schridde
9bd8b24921
Boost raw Makefiles
...
- Use PACKAGE, PACKAGE_VERSION, remove VERSION
- Allow out-of-source-dir builds (mkdir build && cd build && make -f ../Makefile.raw)
- Move config.mk from $(top_srcdir)/makerules/config.mk to $(top_builddir)/config.mk
When keeping current behaviour (srcdir=builddir), this means: Move it from makerules into the main directory
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5308 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-23 13:54:47 +00:00
Giel van Schijndel
91c7638ddb
Check malloc's return value
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5294 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-21 21:51:35 +00:00
Giel van Schijndel
8987ee3aff
Slight refactoring to return as soon as possible, thus not damaging code-readability by large amounts of scope-nesting (specifically if-branches)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5293 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-21 21:51:29 +00:00
Giel van Schijndel
952cd00d05
Only iterator over the linked list `songList` once to determine the end. Then store a pointer to the last ->next pointer and use it to append to the list instead.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5292 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-21 21:51:26 +00:00
Giel van Schijndel
f7ead00bb0
* Don't use strtok to separate out lines from files as the line reading loop already takes care of that
...
* Remove now double variable filename and rename line_buf to filename
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5291 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-21 21:51:21 +00:00
Per Inge Mathisen
d3123eaac4
Fix issue in patch #1075 - use "/" separator for physfs paths.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5282 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-21 16:35:24 +00:00
Per Inge Mathisen
a1c47bccf8
patch #1075 : Simplify playlist code. Thanks to Giel for patch review.
...
The playlist file is no a simple list of files to play during the game.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5281 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-21 15:40:56 +00:00
Dennis Schridde
c9b9e98dc9
Fix "Create default playlist file; This is an ugly HACK which should be FIXME'd into oblivion some other time" by adding a default playlist file to base.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5263 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-18 18:25:35 +00:00
Per Inge Mathisen
925c3daced
Quick fix for crash if --nosound is used together with a soundtrack file
...
(which is now created by default). Someone should look more carefully at
this code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5262 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-18 16:29:10 +00:00
Per Inge Mathisen
1c3835ce23
Add original music soundtracks. If you have a playlist already, you need to delete it
...
or add the music to it manually.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5261 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-17 19:32:17 +00:00
Giel van Schijndel
5828b26a10
* Add functions for changing the volume of an already created AUDIO_STREAM: sound_GetStreamVolume and sound_SetStreamVolume
...
* Use these functions in cdaudio.c to change the volume of the currently playing AUDIO_STREAM in function sound_SetMusicVolume
This fixes bug #11579 ("Music volume slider dont work")
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5101 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-13 14:01:25 +00:00
Giel van Schijndel
44986c3473
* Make sure to actually set the volume of an AUDIO_STREAM we're creating
...
* Indentation fixes
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5100 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-13 13:50:08 +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
85d51e6a32
Rather than pretending that our UserMusicPath isn't hardcoded, lets just admit it and make it a `static const char`
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4576 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-12 21:31:29 +00:00
Per Inge Mathisen
274ae7c9a4
Enforce strict function prototypes for autoconf builds, and fix function prototype problems.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4487 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 15:34:55 +00:00
Roman C
35233a1f9b
Added a sound for beacons (based on ecmtower.ogg). Use f12 to make wz take you to the beacon location.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4450 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-31 18:25:58 +00:00
Giel van Schijndel
359efe39ac
Const fix
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4402 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-28 23:09:32 +00:00
Dennis Schridde
10f2ccfd56
TRUE->true, FALSE->false (except in scripts)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4311 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 16:51:17 +00:00
Roman C
a1008c093d
Reduce amount of junk in the MSVC compilation output by about 70%.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4279 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 22:15:28 +00:00
Giel van Schijndel
8d15dc2ba1
* Log a warning when we've just decoded an empty OggVorbis track
...
* On DEBUG builds free() the memory associated with that track and return NULL (which __will__ cause program termination if it occurs)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4254 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 16:14:28 +00:00
Dennis Schridde
87f3224fa6
The preprocessor checks never really worked...
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4249 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 15:16:29 +00:00
Dennis Schridde
2537bfc61c
Cleanup #includes a bit
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4107 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-16 12:39:08 +00:00
Dennis Schridde
74bb1a185b
Revert r4061 (accidential commit)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4062 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-15 15:04:27 +00:00
Dennis Schridde
7e93a664b8
Move packaging -> pkg
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4061 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-15 14:57:35 +00:00
Dennis Schridde
cb2f0a30df
Patch MSVC Solution file to depend on SQLite and change eol-style to native for them, since otherwise patches will not apply.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4044 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-14 18:16:04 +00:00
Giel van Schijndel
33216b2e9d
Move all stuff that actually belongs in CPPFLAGS (but is called CFLAGS) to AM_CPPFLAGS
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3988 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-10 10:50:58 +00:00
Dennis Schridde
d8409c9819
- Don't define CFLAGS anymore, export WZ_CFLAGS instead, which can be overridden by make commandlines
...
- Set -DYY_NO_INPUT only in those places where needed
- Add some previously forgotten CFLAGS where needed
- Remove extranous -lintl from WIN32_LIBS
- Remove apparently unnecessary directory from Mac include (png_util doesn't need it either)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3986 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-10 02:01:46 +00:00
Dennis Schridde
9f44219b1c
Move addition of CFLAGS from configure.ac to the places they are actually needed.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3983 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-09 20:08:42 +00:00
Dennis Schridde
3858daf4a1
Reset MSVC version from 9 to 8, since otherwise MSVC8 will refuse to load the project files. (bug #11219 )
...
Does MS provide some kind of templating system? Like autotools generate Makefiles from Makefile.am.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3950 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-08 11:28:40 +00:00
Dennis Schridde
d3455b699a
Properly set include/library directories for MSVC
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3949 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-08 01:45:45 +00:00
Dennis Schridde
da462b4511
More float specialisation and generic cleanup
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3937 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-07 12:42:42 +00:00
Giel van Schijndel
3e2af0fc87
Don't assert on unused sound IDs as that's a valid condition sound is disabled; fixes bug #10989
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3809 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-16 22:22:21 +00:00