* 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
* This way updates to this file will automatically modify the above automatically
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1392 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
If you find a different fix other than adding this file here: Feel free to revert.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1381 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
- Tiny update to german translation
- make -C po update-po
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1376 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
new gettext style. As per Mailinglist post
'Gettext - part2'
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1355 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
Remove the block.c and mem.c lines from POTFILEs.in as
well, as these files where removed completely.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1346 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