This patch will create crashes where the code expects FREE to set the pointer to NULL! (Those problems should be fixed anyway.)
The only occassion where I saw this is when quiting a game, so it is not too much of an issue.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1459 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
* 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
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
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
debug builds. Hopefully this will not cause too much pain, but
rather increase code quality for the future.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1144 4a71c877-e1ca-e34f-864e-861f7616d084
Patch marks several read-only function parameters and datastructures as such by adding const.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@709 4a71c877-e1ca-e34f-864e-861f7616d084
- Replace every occurence of VOID with void (and LPVOID with void*)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@703 4a71c877-e1ca-e34f-864e-861f7616d084
- Simplify definition of ASSERT(). Now is the same for GCC and MSVC.
This may not work on versions older than MSVC 2005. If you experience this, please report it!
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@613 4a71c877-e1ca-e34f-864e-861f7616d084
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
Also big amount of whitespace changes, sorry for the inconvenience...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@400 4a71c877-e1ca-e34f-864e-861f7616d084