Commit Graph

14 Commits (3c6c7b5b5152229da1e1f7cb5ee6e78d399993c7)

Author SHA1 Message Date
Giel van Schijndel 99153c743c * remove some dead code (resource preload callback stuff)
* 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
2007-04-08 21:39:24 +00:00
Giel van Schijndel 10964ceca2 * remove unused function pointer fileLoad from struct RES_TYPE in lib/framework/frameresource.h (there is code that sets this member, but none that uses it)
* 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
2007-04-08 17:15:56 +00:00
Stefan Huehner 7c9f1d19af Remove some unused function prototypes.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1356 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-03 17:33:38 +00:00
Gerard Krol 42ed587327 Per's removal of the memory heap system. Now MALLOC is just malloc, and not some wrapper around a wrapper that will allocate it from a specific pool.
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
2007-04-03 10:33:26 +00:00
Dennis Schridde 49ceba7503 Add GPL notices to all sourcecode files.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1014 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-15 20:09:25 +00:00
Stefan Huehner da14eaf2ad Add some more const to char* function parameters,
which aren't modified inside the called function.



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@853 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-23 13:28:38 +00:00
Dennis Schridde d3cd44148d Patch by Gerard Krol: Replace STRING with char (STRING was confusingly defined to char)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@804 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-03 21:35:50 +00:00
Stefan Huehner 532ada3156 Add doxygen style headers to .h files to document
their meaning.



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@759 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-25 16:46:28 +00:00
Stefan Huehner 30f6dc392e mark some Strings an read-only by adding const.
On the way replace STRING with char



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@756 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-24 19:11:34 +00:00
Dennis Schridde 27b07a0ba1 Patch by Stefan Huehner: "code cleanup: const 2"
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
2006-09-13 21:16:17 +00:00
Dennis Schridde 728b9a9913 - Commit patches "code cleanup: void" and "code cleanup: const" by Stefan Huehner
- 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
2006-09-13 09:09:05 +00:00
Per Inge Mathisen 2149739999 Almost all strings and buffers are now of type char. This fixes
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
2006-08-12 16:52:37 +00:00
Dennis Schridde eb7ba7e41d - Again revised the modloading(restrictions were stupid) (src/levels.c,src/init.[ch],src/multiint.c,src/main.c)
- Fixed case problem with noVideo.rpl (lib/sequence/sequence_stub.c)
- Fixed some G++ 4.1 compile problems (mostly invalid conversions) (lib/script/script_parser.y,lib/framework/frame.h,lib/framework/frameresource.c,lib/framework/frameresource.h,lib/framework/input.c,lib/framework/configfile.c,lib/framework/frame.c)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@455 4a71c877-e1ca-e34f-864e-861f7616d084
2006-07-04 13:35:01 +00:00
No Author 5ba7ddac6b Create final repository structure.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@362 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-28 17:47:08 +00:00