Commit Graph

5081 Commits (2b11839902f3e913ace63cdf62e41f5dd36f51ed)

Author SHA1 Message Date
Freddie Witherden 2b11839902 Fix an indentation error in table.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6361 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-22 13:55:01 +00:00
Freddie Witherden 5bca9c8df9 Add support for setting the horizontal/vertical padding of a table and fix a bug in the padding alignment code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6360 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-21 18:51:34 +00:00
Freddie Witherden 4d163dd309 Provide a complete, mostly working, table widget implementation. Unit tests are still required.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6357 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-21 18:10:56 +00:00
Freddie Witherden b278bbb4ee Add the concept of a NUL size to betawidget which is needed to allow widgets to be added to a parent-less container.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6356 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-21 17:52:21 +00:00
Giel van Schijndel 266d51bbb5 configure script:
* Use `test -n "$STRING"` instead of `test ! -z "$STRING"` to test a string for non-zeroness
 * Use `text -z "$STRING"` instead of `test "x$STRING" = "x"` to test a string for zeroness
 * Add some influential environment variables to AC_ARG_VAR so that it gets documented in --help and automatically AC_SUBST'ed
 * Use the AS_IF macro for conditional code execution

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6349 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-19 10:03:07 +00:00
Gerard Krol d2c8082c87 Change the way the edges of the map fade. With fog of war enabled they fade to transparency so that mountains in the distance will fade
in instead of pop in. The transparency did not play well with the distance fog and in that case the tiles fade to the fog color. All 
terrain tiles are now drawn as alpha enabled textures, which could have an impact on the performance for some people. Remember this 
commit when complaints about reduced performance start coming in.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6348 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-17 10:39:44 +00:00
Gerard Krol 71af833dd5 Add an urban sky and (for now) also use it for the Rockies.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6347 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-17 10:02:28 +00:00
Giel van Schijndel d11d2411bd * Prevent writing to regex-capture variables, e.g. \$1
- Use a temporary variable instead


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6346 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-17 08:51:07 +00:00
Gerard Krol a5128f0d6d Rename the current skybox texture page to page-25-sky-arizona and use the entire texture, instead of only the bottom half of
it. This will make it easier to change the sky for the different areas.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6345 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-17 08:06:49 +00:00
Giel van Schijndel 91cf8eeabd Bugfix: mark Perl as available only when it is, and vice versa
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6344 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 19:19:08 +00:00
Giel van Schijndel 5f05dd99e6 Check for Perl in the configure script, rather than just assuming it's installed
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6343 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 19:13:39 +00:00
Giel van Schijndel 67b80c973d Regenerate stats-db2.c to get rid of old field data from a C-only-field (which since r6341 gets ignored properly)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6342 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 18:49:23 +00:00
Giel van Schijndel fb91a247d5 Handle C-only-fields properly when they're at the end of a struct
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6341 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 17:43:32 +00:00
Giel van Schijndel 25a9402757 Add loading-specifications for enums MOVEMENT_MODEL and WEAPON_EFFECTS
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6340 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 17:25:43 +00:00
Giel van Schijndel bec2172caa Allow passing of multiple strings for an enum value
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6339 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 17:25:40 +00:00
Giel van Schijndel bcca523e55 Remove unused SQL files
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6338 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 16:29:14 +00:00
Giel van Schijndel 3cc8d0e1a2 * Use the database-meta-language code generator to generate a new stats loading function: loadPropulsionStatsFromDB
* Get rid of the (previous) handcrafted version for loadPropulsionStatsFromDB
 * Get rid of the old (handcrafted) `propulsion` table and replace it with the autogenerated `PROPULSION` table

NOTE: Only src/data.c src/stats-db.[ch] src/stats-db2.tpl got changed manually, the other changes where generated from these

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6337 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 16:28:23 +00:00
Giel van Schijndel 83b2440a3d Don't produce lines filled with only spaces (produce an empty one instead)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6336 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 16:28:20 +00:00
Giel van Schijndel 167510f3e7 * Add the option to specify custom string values for enums (which are * used when processing the database contents)
- New enum-field level qualifier: `%string "<string to use>";`
 * Use this to specify the custom strings for enum SENSOR_TYPE

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6335 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 16:28:17 +00:00
Giel van Schijndel 02183a272a Use the amount of rows instead of the highest ID number to determine the amount of SENSOR_STATS to allocate
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6334 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 16:28:15 +00:00
Giel van Schijndel 27856b5de5 * Make sure to wrap the produced SQL INSERT statements in a TRANSACTION
* At the start of a new struct's data place the name of that struct

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6333 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 16:28:12 +00:00
Giel van Schijndel bfdc0728be Remove unused SQL files
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6332 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 16:28:09 +00:00
Giel van Schijndel 8db7db8f8e Exclude config-macosx.h and exceptionhandler/include/* from the Doxygen documentation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6331 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 16:28:06 +00:00
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