Commit Graph

5258 Commits (0c5d56b35a40f5e16bc77f3a548d170cf558ffa0)

Author SHA1 Message Date
Giel van Schijndel 9a2788aca8 * structuredef.h depends on basedef.h so make sure to #include it
* Ignore ./src/stats-db2.tpl.sql.c from the Doxygen documentation (as it'll get included in stats-db2.c
 * Generate an alphabetical "compound" index for the Doxygen documentation
 * Make the typedef name of a struct, union and enum the entity's name in Doxygen

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6330 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 14:35:19 +00:00
Giel van Schijndel 5dc4adb8d5 Add Doxygen comments to the produced STATS_(BASE|COMPONENT) macros as well, to give Doxygen a chance to properly document structures that use these macros
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6329 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 14:08:23 +00:00
Giel van Schijndel 879f129703 Exclude the Makefiles from base.wz and mp.wz for the Windows raw Makefile build system as well
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6328 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 13:45:41 +00:00
Giel van Schijndel db0253a0d8 * Use the database-meta-language code generator to generate a new stats loading function: loadSensorStatsFromDB
* Get rid of the previous (handcrafted) version for loadSensorStatsFromDB
 * Get rid of the old `sensor` table in the database and replace it with the autogenerated `SENSOR` table

This addresses #2


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6327 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 03:52:34 +00:00
Giel van Schijndel b918d96671 * Stuff the CONSTRUCT stats in the SQLite database
* Use the database-meta-language code generator to generate a new stats loading function: loadConstructStatsFromDB
 * Add a new resource type, DBCONSTR, which uses loadConstructStatsFromDB to load the construction stats
 * Employ this new type in "base"

This addresses #2


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6326 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 03:43:29 +00:00
Giel van Schijndel 139e643311 Fix a bug where the wrong variable is checked for an IMD filename
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6325 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 03:39:26 +00:00
Giel van Schijndel 4e43102df3 Add the ability to retrieve the current row number by means of $rowNum
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6324 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 03:33:43 +00:00
Giel van Schijndel 47eb9bd6bc * Make sure to use "FROM" before "INNER JOIN"
* Assign the return value of sqlite3_step to "rc" not the result boolean of that return value compared with SQLITE_ROW
 * For enums allow the enumerator's name with undersquores ''and'' spaces


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6323 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 03:08:04 +00:00
Giel van Schijndel 1835d9aa04 Add a new code generator to generate a series of INSERT statements from the CSV files to fill a database with
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6322 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 02:20:42 +00:00
Giel van Schijndel 4b0072ffb5 * Remove unused parameters
* Remove duplicated code


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6321 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 02:18:53 +00:00
Giel van Schijndel 903b23ce7f Store SENSOR->location as "enum LOC" instead of an UDWORD
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6320 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 01:45:44 +00:00
Giel van Schijndel 31f8183789 Forgotten to update in r6318
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6319 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 01:42:43 +00:00
Giel van Schijndel 001f2f90ea Store enums as text
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6318 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 01:41:48 +00:00
Giel van Schijndel 8a8bc660ee Use string comparison for enums instead of stuffing integers in the database
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6317 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 01:20:02 +00:00
Giel van Schijndel b2602011e6 Use %valsuffix instead of manual suffix appending
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6316 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 01:18:35 +00:00
Giel van Schijndel 5b1c63f31c Mark optional IMD_model fields as such
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6315 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 00:34:39 +00:00
Giel van Schijndel 91dbb225df Use .schema.sql as default output extension for SQL CREATE TABLE definitions
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6314 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 00:22:10 +00:00
Giel van Schijndel d57d5d5001 Generate the SQL table definition as well
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6313 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-15 22:02:30 +00:00
Giel van Schijndel d2c8fbc5a8 * Change the database meta language script parser such that it's first parameter has to be a valid relative path to the code generator to use
* Change the make rules for all files produced from the database meta language such that they have the language parser and code generator as dependency as well (i.e. if they change their files will be rebuilt)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6312 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-15 21:39:00 +00:00
Gerard Krol 40c0b26930 Add the possibility to disable God Mode back in, on request from Giel. It should even look nice.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6308 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-15 15:43:18 +00:00
Gerard Krol 624838ea8c Clean up the God Mode ("deity") code. It is reduced to one line in visibility.c, instead of a lot of || godMode terms all over the
source. It looks better now as all effects are shown even for areas you officially can't see. The only disadvantage is that disabling it 
again looks really bad (structures remain visible). As I do not expect a lot of people to disable God Mode, you now can not turn it off 
anymore. 


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6307 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-15 14:28:04 +00:00
Gerard Krol 7c6366f930 Fix a bug in the Skirmish AI that caused it to build loads of bunkers at oil derricks. Also change the type of a variable from PUBLIC to
PRIVATE, as it is not defined in the .vlo. The current scripting engine does not seem to notice, but this helps 
the wz2lua converter.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6306 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-15 13:00:27 +00:00
Gerard Krol 7f62ffded9 Actually draw the software cursor when enabled & in the main menu. This fixes #146 (no mouse cursor in main menu with coloured cursors enabled).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6304 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-15 09:06:12 +00:00
Per Inge Mathisen 3d065b820c Add notice to Changelog about ticket #97
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6300 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-14 20:03:27 +00:00
Per Inge Mathisen ba2163be9d Latest patch from ticket #97 - Smarter Structure Targeting Patch. Both droids and
structures should now be smarter about their automatic targetting.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6299 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-14 19:40:29 +00:00
Giel van Schijndel 7c05598cc1 * Use a for-loop instead of a while-loop to loop over a linked list of droid templates
* Don't constantly maintain a bool (bEqual) to see whether the current template is equal to the given template
  - Instead "continue" and skip to the next one instead when we've determined the current template isn't equal


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6298 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-14 18:56:40 +00:00
Giel van Schijndel 62b65404f1 * Don't loop over asParts and asBits arrays by using DROID_MAXCOMP as limit
- Use ARRAY_SIZE(array) as limit


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6297 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-14 18:47:55 +00:00
Giel van Schijndel e177b639f4 Make the "inherited" members from the BASE_OBJECT and BASE_STATS hierarchies visible in the Doxygen documentation by expanding their macros
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6295 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-14 15:49:51 +00:00
Dennis Schridde 5f95b528f2 Update ChangeLog with r6267 and r6280
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6293 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-14 15:39:44 +00:00
Giel van Schijndel 53fa475f5f Fix an out-of-bounds error resulting from using the wrong constant
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6291 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-14 14:34:57 +00:00
Giel van Schijndel b55c28e697 asprintf's return value indicates whether it failed; not it's first parameter -> use the return value instead
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6290 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-14 14:34:32 +00:00
Giel van Schijndel ccc6206247 Add Doxygen documentation for v?asprintf
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6289 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-14 14:30:12 +00:00
Giel van Schijndel e061f7c3ac When generating Doxygen documentation #define DOXYGEN to allow conditional inclusion/exclusion of code specifically for Doxygen
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6288 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-14 14:29:46 +00:00
Giel van Schijndel 7b37001471 Make v?asprintf return -1 on all errors (similar to GNU's implementation)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6287 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-14 14:28:21 +00:00
Giel van Schijndel 05a709a3b3 * Make getPlayerName and getPlayerColourName const correct
* Fix a buffer overflow in getPlayerColourName resulting from translations for player colours being larger than the string buffer that was reserved for them
  - Instead just return gettext()'s return value (because "The resulting string is statically allocated and must not be modified or freed.")

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6283 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-13 22:42:05 +00:00
Giel van Schijndel 316335099d * Use ssprintf instead of sprintf to prevent potential buffer overflows
* Use a single call to ssprintf to create a string instead of ssprintf followed by strcat

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6282 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-13 22:42:02 +00:00
Giel van Schijndel a4b116eb00 Only compile the translations when $(TRANSLATION) is "yes" not just when it's defined
This addresses #130 and should fix it


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6280 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-13 12:33:04 +00:00
Gerard Krol 0e32c90ff5 The tile drawer now properly caps mountains at the edge of the map so you can no longer look through them. This patch also reduces the vertex array in
size. The tile drawer was allocating and using a vertex array the size of the whole map, now it only has one big enough to fit the visible tiles.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6270 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-11 00:05:44 +00:00
Gerard Krol 83beae8abe Add lots of Doxygen comments to display3d.c and clean it up a little.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6269 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-10 22:50:08 +00:00
Gerard Krol 1e39e46869 Allow a droid to pick a new target while auto-repairing. This fixes #35 and gna bug 12217 where droids would just let themselves be shot to
death while repairing themselves slowly.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6267 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-10 22:07:30 +00:00
Giel van Schijndel 8ab253165f Portugues translation:
* Add 29 newly translated messages (100% translated)

This closes #132, patch by Arthur Filipe <trivial>


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6265 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-10 21:04:28 +00:00
Giel van Schijndel 36d743ae65 Russian translation:
* Add 135 newly translated messages (46% translated)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6263 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-10 20:32:10 +00:00
Giel van Schijndel 11e378ccce Allow WZ_ASSERT_STATIC_STRING to work when compiled as C++ as well
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6262 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-09 23:49:39 +00:00
Giel van Schijndel 57ea72c23d Prevent a potential buffer overflow in function enumerateMultiMaps by altering its interface
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6261 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-09 23:18:18 +00:00
Giel van Schijndel c99a123b50 * Remove unused list macros: LIST_INIT and LIST_ADD
* Rename LIST_ADDEND to LIST_APPEND (because that's what it does: append to a list)
 * Clean up the assertion in LIST_REMOVE
 * Prevent a potential bug in LIST_APPEND by not initialising the psNext pointer to NULL
  - doesn't ever occur right now, for one simple reason: the only place where this macro is used is on a structure that's initialised with memset(0)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6260 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-09 22:58:04 +00:00
Giel van Schijndel 17a0228d18 Remove unused function endian_fract
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6259 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-09 22:58:01 +00:00
Giel van Schijndel 2391ddd622 * Make the endian_*word class of functions/macros inline functions (and the type checking of their parameter) on ''all'' platforms!
* Fix several parameters that got passed wrong and didn't get caught due to the different definitions

Caught by EvilGuru

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6256 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-09 19:21:20 +00:00
Giel van Schijndel ef994389f5 Bump release date of 2.1_rc1 to today
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6254 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-09 15:49:47 +00:00
Gerard Krol be9e1706cd Do not show the intelligence screen after playing a mission update FMV anymore. This was previously done because the
FMV's were missing. A message "New Intelligence Report" is shown to remind people who abort the movie that they can see 
it again in the intelligence screen.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6253 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-08 22:47:49 +00:00
Gerard Krol 03c11abefb Hide the mouse cursor during loading screens and movies.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6252 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-08 21:37:32 +00:00