* AUDIO_SAMPLE
* remove unused variable iLoops from the struct
* rename bRemove to the more descriptive title of bFinishedPlaying
* change sound_SetupChannel to return a BOOL rather than be return void and throw its output value in a pointer
* make audio_Update() return void (instead of BOOL) since its output value was TRUE always anyway, plus all its callees ignored the output value
* increase readability of lots of functions in audio.c
* remove unused (and nothing doing) functions: audio_StopTrack, audio_SetTrackPan, audio_SetTrackVol and audio_SetTrackFreq
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1444 4a71c877-e1ca-e34f-864e-861f7616d084
* remove ptrlist.c from lib/gamelib/Makefile.raw
* some modifications of char* -> const char*
* modify typedef of audio callback function to take a parameter of `void *psObj` rather than `AUDIO_SAMPLE *psSample` to minimize exposure (psSample->psObj was the only thing used by all callback functions anyway)
* modify all callback functions to match the new typedef's signature
* modify all functions calling callbacks to match the new signature (I think I've got them all, but since passing a pointer to a void* parameter doesn't generate any compiler errors/warnings I might have missed one, which would lead to undefined behaviour)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1442 4a71c877-e1ca-e34f-864e-861f7616d084
The texture file in PIE files can now be up to MAX_PATH chars long.
- Find the reason for WZ discarding everything after the number in "page-123" styled texture references.
This led to the problem with Grim's mod referencing the skybox texture instead of his own wall texture.
- Beautify some code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1438 4a71c877-e1ca-e34f-864e-861f7616d084
- Remove "-%token <sval> TEXT" from audp_parser.y since it clashed with declarations in MinGW's Windows headers. It does still compile and run, but this may have harmed something anyway. Please check!
- Hack around DATADIR being defined by objbase.h in MinGW by undefining it before the inclusion of shlobj.h (incl. in main.c) This only works since the case that DATADIR is actually used on Windows is extremely rare.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1437 4a71c877-e1ca-e34f-864e-861f7616d084
* since gettext_noop is always defined, remove the conditional definition of N_ which checks whether it is or is not defined
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1420 4a71c877-e1ca-e34f-864e-861f7616d084
_GNU_SOURCE can take effect first, to silence stpcpy() warnings from
bison generated code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1416 4a71c877-e1ca-e34f-864e-861f7616d084
* use it in src/droid.c
* throw some hardcoded strings (in a switch statement) in an array of strings instead (using N_ there as well)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1414 4a71c877-e1ca-e34f-864e-861f7616d084
* use proper constness:
* make some functions take arguments of `const char*` rather than just `char*` (also modified some functions' return values to return `const char*` where appropiate)
* modify rank retrieval functions to use a central array instead; currently ranklimits (i.e. the amount of kills required to promote) is hardcoded in switch statements, as is the case with the names of those ranks
* `make -C po update-po`
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1409 4a71c877-e1ca-e34f-864e-861f7616d084
- Add -Wno-nonnull to debug=strict to make it compile (Remove it from AM_CFLAGS)
- Remove -Wno-unused-label as this warning is not generated anymore
- Fix a "... from incompatible pointer type" warning which led to a lot of strings (and associated functions) in the widget area becoming const
- Maybe found the reason for images in UTF-8 strings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1405 4a71c877-e1ca-e34f-864e-861f7616d084
* 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
* resource types ANI and ANIMCFG are now read directly from file
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1400 4a71c877-e1ca-e34f-864e-861f7616d084
* change audp_parser/lexer to be able to read directly from a file (through PHYSFS)
* change data.c's mapping for "AUDIOCFG" to use the parsing directly from file
* rename dataAudioLoadFile to dataAudioLoad
* add a second list with load function mappings to audio.c for load from file mappings
* add a second piece of iteration code for the file mapping list
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1398 4a71c877-e1ca-e34f-864e-861f7616d084
* 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
* Change some calls to FREE(TRACK*) to free(TRACK*), because TRACK is always allocated using malloc
* Change only one instance of MALLOC and only other instance of FREE in lib/sound/track.c to malloc and free respectively
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1396 4a71c877-e1ca-e34f-864e-861f7616d084
* 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
* remove function resAddFileLoad from lib/framework/frameresource.[ch] which was used to set RES_TYPE.fileLoad
* remove only call to resAddFileLoad from src/data.c, function dataInitLoadFuncs
* remove now completely unused function dataSaveGameLoad from src/data.c
* modify function dataInitLoadFuncs in src/data.c:
* modify the struct definition for the list of resource types
* modify the list accordingly
* remove the NULL-item from the end of the list
* modify list iteration code to use a start and end iterator (end being a pointer just past the last valid list-item, begin being the first valid one)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1394 4a71c877-e1ca-e34f-864e-861f7616d084
-simple data types are lowercase on default
-casts using uppercase still allowed for compatibility with campaign scripts
-updated scripting manual accordingly
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1391 4a71c877-e1ca-e34f-864e-861f7616d084
variables. 4. Commented out some unused sound code.
I just love Valgrind :)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1390 4a71c877-e1ca-e34f-864e-861f7616d084
* (probably caused because I was editing this file when r1377 was committed which probably was merged wrongly with my changes)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1379 4a71c877-e1ca-e34f-864e-861f7616d084
* remove an unused variable from lib/ivis_opengl/piemode.c
* some code refactoring to increase readability, change if branches that handle error conditions to the folowing style:
if (error)
{
deal with the error;
return something (usually false or 0);
}
continue with normal execution path;
* previously was something like: if(not error) {normal execution path;} else {deal with error;}; the above way groups error detection and handling which is more easily readable/understandable
* wrap some if branches from r1374 with curly braces according to Per's advice on the dev mailinglist
* completely get rid of iPriority from struct TRACK (also stripped it out of functions' argumentlists) since the only code that seemed to use it is the removed priority queue implementation
PS someone might want to look at lib/gamelib/audp_parser.y to finalize the modification to audio_SetTrackVals there, I'm not sure whether it will break any code/script if I would simply remove values from the parameter list, so I'm leaving it as is for this moment
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1378 4a71c877-e1ca-e34f-864e-861f7616d084
* remove some unnecessary else branches in audio_SetTrackVals (the if respective if branches really only where error handlers which caused the function to return anyway)
* rename some things in audio_id.c to a more explaining name (i.e. the struct and its members)
* fix some serious abuse of tabs ('\t') in audio_id.c, while the file looks partially good with a tabsize of 4, it looks awful with a tabsize of 8
PS audio_id.c's sole duty seems to be to map sound events to audio files, for the sake of moddability I think we ought to move this out of sources and into scripts.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1372 4a71c877-e1ca-e34f-864e-861f7616d084
Remove all callers (which all were commented out)
The 'real' font implementation used lives in ivis_
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1357 4a71c877-e1ca-e34f-864e-861f7616d084
* replace all instances of PTRVALID(ptr,size) by (ptr != NULL)
* remove asserts of style ASSERT( x == NULL || x != NULL ) because they would evaluate to true always anyhow and as such wouldn't ever trigger
* remove macros iV_HeapAlloc and iV_HeapFree and replaced them with MALLOC and FREE respectively (that's what they expanded to anyway)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1348 4a71c877-e1ca-e34f-864e-861f7616d084
* also allow this to be disabled on a per file basis (this code is basically taken from the sound branch: lib/sound/decoding.cpp)
* some minor code cleanups (using a temporary to cast into, rather than casting directly into a function call's parameters, optimizer will optimize this away anyhow)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1345 4a71c877-e1ca-e34f-864e-861f7616d084
The MSVC poject will need to be updated I guess, as some files were deleted.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1343 4a71c877-e1ca-e34f-864e-861f7616d084
- Remove unneeded checks from autogen.sh (all of them are also checked in configure.ac)
- Move AM_CPPFLAGS=-$(top_srcdir), which was included in nearly every Makefile, to configure.ac
- Remove -g from CFLAGS for usual builds. This should be set by the buildscripts instead
- Remove CFLAGS_OVERRIDE, which was rendered obsolete by the above change
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1332 4a71c877-e1ca-e34f-864e-861f7616d084
-fixed local string variables now being cleared between function calls
-implemented a setBit() scripting function to work with bitfields
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1318 4a71c877-e1ca-e34f-864e-861f7616d084