* "table" will now attempt to load the given resource type from the given table (in the currently opened database)
* Maintain the current database's name (for error message, etc.)
* Pass the table name to the database loading functions and use it (in combination with sqlite3_mprintf) to produce the SQL statements
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5189 4a71c877-e1ca-e34f-864e-861f7616d084
* Add two new keywords to the .wrf files: "database" and "table"
* "database" will cause the given filename to be opened as a database file (using SQLite3)
* "table" will attempt to load the given resource type from the currently opened database
* Don't open the database in the file loading functions (src/data.c) anymore; turn them in table loading functions instead (which get the current database passed as a paramter)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5188 4a71c877-e1ca-e34f-864e-861f7616d084
* Turn some signed integers ("int" or "SDWORD") into unsigned integers where it made more sence (and signed integers caused warnings about comparing signed with unsigned integers)
* At some places cast to an unsigned integer (where the type of the expression is a signed integer but the result of it logically _always_ is an absolute value)
* Remove unused struct-type EVENT_INIT
* Convert use of malloc->memcpy->free to one single realloc call (and now make sure to actually check realloc's return value, which wasn't done with the malloc call)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3037 4a71c877-e1ca-e34f-864e-861f7616d084
* Document the "fileName" parameter of makeLocaleFile in the Doxygen comment
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2639 4a71c877-e1ca-e34f-864e-861f7616d084
* In this bug-report calling free() twice (once on psRes->aID then on psRes) was proposed
* Instead just ''over allocate'' the memory for psRes so that a single free() call on psRes will suffice
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2614 4a71c877-e1ca-e34f-864e-861f7616d084
more. Remove unused GetLastHashName() and SetLastHashName().
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1544 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
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
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
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