Commit Graph

2135 Commits (6a2d26babdf3a4e5ea190c70484d368bf8bc12d6)

Author SHA1 Message Date
Giel van Schijndel 6a2d26babd * Try '''harder''' to detect Windows platforms
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2747 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-06 19:17:36 +00:00
Giel van Schijndel 73d92d135f * Slight update to MSVC project file to decrease the diff-size (i.e. alphabetic ordering)
Part of patch #832 by Buginator


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2746 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-06 18:57:53 +00:00
Giel van Schijndel 96d5054729 * Make sure to #include <stdio.h> when compiling on MSVC so that those inline replacements for snprintf and vsnprintf will actually compile....
* Lets terminate statements with a semi-colon!!


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2745 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-06 18:36:37 +00:00
Giel van Schijndel 7b2530306c * On MSVC make sure to #define inline __before__ using it!!
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2744 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-06 18:30:19 +00:00
Giel van Schijndel 9f9cc3b697 * When compiling AutoRevision on MSVC make sure to #define popen and pclose as _popen and _pclose respectively
Fix provided by Buginator in bug #10269


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2743 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-06 14:32:17 +00:00
Giel van Schijndel 92e013e406 * Add static inline functions vsnprintf and snprintf when compiling with MSVC
* These functions comply to the C99 specification and return the amount of characters they would have written if no truncation occurred
Slightly modified form of patch file #3146 attached to bug #10269 by Buginator; applied the changes of this patch to wzglobal.h instead of version.c


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2742 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-06 14:07:50 +00:00
Giel van Schijndel dc2e343a3b * "Unbreak" the keymap files which I broke in r2737
* Move the group 0 keymappings to the end of the keymapping function table


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2739 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-05 22:05:43 +00:00
Per Inge Mathisen 492784a667 Remove dead code to make water shadows move. It was probably not used because
it looked even more fake.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2738 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-05 21:59:21 +00:00
Giel van Schijndel b86a46d117 * Add the posibility to use the zero-key ('0') to assign groups to as well
NOTE: This __will__ break existing keymaps: please remove ~/.warzone2100-2.1/keymap.map
Patch #828 by Christian Ohm <cybersphinx>
PS: r2734 was based upon patch #829 (also by Christian Ohm <cybersphinx>); forgot that in that commit message, so adding it here instead


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2737 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-05 21:58:50 +00:00
Per Inge Mathisen bfdd5e66ca Make water blue in minimap. Please let me know how you like this change.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2736 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-05 21:42:59 +00:00
Per Inge Mathisen 0c9eb16089 Adjust water shadows a bit to make them softer and less obvious.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2735 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-05 21:40:47 +00:00
Giel van Schijndel 08c7de7a8c * Don't add/remove droids to/from groups upon selecting/deselecting them
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2734 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-05 21:38:24 +00:00
Per Inge Mathisen 670512cde8 Clear out some old cruft from the radar code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2733 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-05 21:22:25 +00:00
Giel van Schijndel ae6b39d5dc * Prevent a segfault when running on Windows;
* Make sure to initialize PhysicsFS __before__ calling PHYSFS_getBaseDir() 

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2732 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-05 20:41:28 +00:00
Giel van Schijndel 854c5eba1c * In revision information extraction class RevSVNVersionQuery (uses "svnversion"), ignore its output if the word "exported" is encountered (that way compiling from an exported working copy is possible also)
* Parse the "/autorevision.conf" file as last
 * Add template class assign_once<T> which wraps a T object so that it can only be assigned to once (all following assignments will simply be NO-OPS)
 * Make all RevisionInformation members an assign_once<T> object instead of a T object
 * Make sure src/version.c can compile when there is little revision information available
 * Add autorevision.conf which will provide a sane default for wc_uri ("trunk")


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2731 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-05 18:43:30 +00:00
Giel van Schijndel 7bb4fedb98 * Don't strip binaries when building Debian packages
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2730 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-05 17:29:11 +00:00
Giel van Schijndel 043fc0ba63 * Call PHYSFS_init() in initialize_PhysicsFS() instead of before calling PHYSFS_init() before calling initialize_PhysicsFS()
* Initialize the NLS system __before__ parsing command line arguments; that way the output of some command line args can be translated as well (e.g. --version, --help, etc.)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2729 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-05 17:24:11 +00:00
Giel van Schijndel 87f96d327e * Make compilation of QuesoGLC optional (i.e. add a --disable-quesoglc to the configure script)
* Disable compiling of QuesoGLC when creating a Debian package


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2728 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-05 17:04:30 +00:00
Giel van Schijndel 48d2483de6 * Bump upstream version number (revision number)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2727 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-05 15:53:15 +00:00
Giel van Schijndel 9fd3c1a7f1 * Make conversion tool "imgfile" also output the file-format-version
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2726 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-05 15:49:43 +00:00
Giel van Schijndel 811eafc0af * Add a directory for conversion tools (conversion from some internal WZ format to another format)
* Add conversion tool '''imgfile'''
  * This tool will read in an "IMG" file ("IMG" is the WRF identifier) from standard intput; it'll then reformat it as XML and output it to standard output


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2725 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-05 15:41:27 +00:00
Giel van Schijndel bb1fd8660a * Enlarge mission timer field to be able to contain the text
* Enlarge transportation timer field to be able to contain the time text

patch #831 by Buginator


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2724 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-05 15:32:52 +00:00
Giel van Schijndel 03c4fd6256 * Add version.[ch]
* this module uses the information extracted from the automatically generated file src/autorevision.h to add revision information to the project
  * provides a function version_getFormattedVersionString() which replaces several pieces of customly crafted code to dump a version string (frontend.c, main.c and clparse.c)
 * update po/POTFILES.in
  * add some recently added files
 * make -C po update-po


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2723 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-05 02:31:09 +00:00
Giel van Schijndel 59c1b8fc11 * Add AutoRevision to raw makefile system
* Set raw makefiles up to use AutoRevision to generate src/autorevision.h

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2722 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-05 02:29:46 +00:00
Giel van Schijndel 71a6991cd7 * Add a new revision info extraction class (subclass of RevisionExtractor): RevConfigFile
* This class extracts revision info from a "var=value" style text file (can be used in tarballs)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2721 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-05 01:41:59 +00:00
Giel van Schijndel eebb1dd97f * Add struct RevisionInformation to bind all revision info together
* Add a new subclass of RevisionExtractor: RevSVNVersionQuery
  * This subclass will use "svnversion" to additionally detect mixed revisions, modifications and switched paths in working copies
 * Add the "low revision", modification and switch state to the output


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2720 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-04 23:08:17 +00:00
Per Inge Mathisen cdeeffb93b Clean out dead code. Allow keymap function table to contain NULL entries for removed
key bindings (list must not be shortened, this to prevent invalidating users' keymaps!).


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2719 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-04 22:51:37 +00:00
Giel van Schijndel 93c387f1fb * Change "failed to open file" error message, when attempting to load a playlist, from LOG_ERROR to LOG_NEVER as it isn't a real error condition
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2717 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-04 18:45:57 +00:00
Giel van Schijndel 39e6d26a1f * Add an abstract base class for the extraction of revision information: RevisionExtractor
* This class uses the "Chain of Responsibility" pattern to delegate a task the current subclass cannot perform to a successor in the chain
 * Make QuerySVN() and ParseFile() part of subclasses derived from RevisionExtractor
  * Also make these functions function properly in the chain of responsibility


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2716 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-04 18:20:00 +00:00
Dennis Schridde c91a285fe6 - Move definitions of special tiles together in display3d.c (Water, riverbed, passable rubbles, unpassable rubbles)
- Provide macors for unpassable rubbles and water, since the underwater and rubble tiles can be overridden by map version 15


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2715 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-04 17:00:28 +00:00
Dennis Schridde 8fd75e854c Only try to build QuesoGLC if we downloaded the svn:external. Should fix it for source tarballs and exotic svn updaters.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2714 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-04 16:59:35 +00:00
Dennis Schridde 7ca4f62452 Recurse into QuesoGLC directory for building. Not fully complete, since we cannot yet use the result of that.
Need to investigate further on howto best setup autotools to accomplish that.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2713 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-04 16:29:20 +00:00
Giel van Schijndel 6268b6fff2 * Don't allocate memory in PlayList_Init() while we don't need it yet
* Make sure to set '''global''' pointers to NULL when free()ing them
 * Also set the "size" variables belonging to these pointers to zero
* Use a swap(a, b) style function for variable swapping (in PlayList_Shuffle()) rather than obfuscating code
* Make sure that PlayList_CurrentSong() and PlayList_NextSong() return "const char*" rather than "char*" to make sure no one touches memory he/she shouldn't
* Some general changes to conform with coding style (most notably: braces on a line of their own)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2712 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-04 16:14:24 +00:00
Giel van Schijndel aa4bb6c529 * Prevent a segfault occuring when quitting from warzone if a non-power of two number of tracks has been loaded into a playlist (due to uninitialized pointers)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2711 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-04 16:05:11 +00:00
Per Inge Mathisen eeae9829cd More cleanup of globals
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2710 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-04 15:52:34 +00:00
Giel van Schijndel 7a01000da9 * Clean up some of the playlist code:
* Make PlayList_Read return a bool instead of char (using 'char' there was a perfect example of premature optimisation; to save memory most likely)
   * Remove macro CURRENT_TRACK which expanded to playlist[current_track] (it did _not_ increase readability)
   * Make sure to free resources from __all__ return paths from PlayList_Read
   * Check realloc's return value
   * Don't bitshift but multiply!
   * Make sure to follow coding style (in PlayList_Read)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2709 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-04 15:24:37 +00:00
Giel van Schijndel 5efc500f88 * Fix a bug where (in some cases) file names in the music.wpl playlist would be truncated
Bug reported by Jessicatz (on IRC)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2708 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-04 15:16:56 +00:00
Per Inge Mathisen 4e594f0f8b Remove unused globals
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2707 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-04 15:04:43 +00:00
Per Inge Mathisen 6d6d3ca817 Remove undocumented --noTranslucent commandline option
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2706 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-04 14:48:20 +00:00
Per Inge Mathisen 7f737d30f1 Fix bug #9652 where water edge would transition to black instead of water when
mouse was positioned over a research or production item.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2705 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-04 13:38:56 +00:00
Per Inge Mathisen e624663f40 Now that we draw water in a separate pass, we can reduce the number of state changes a lot.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2704 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-04 13:26:04 +00:00
Per Inge Mathisen f1e9c680a4 Do not use bucket sort for water tiles, instead draw terrain in two passes.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2703 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-03 23:23:10 +00:00
Per Inge Mathisen 01e24bf6ed Clean up pieblitfunc. Dump dead code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2702 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-03 22:48:46 +00:00
Giel van Schijndel f1d91e0598 * Remove the "Published by EIDOS Interactive" and "Developed by Pumpkin Studios" strings from the ingame pause screen/menu
* Update translation files to have these changes embedded


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2701 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-03 22:44:36 +00:00
Dennis Schridde 3a141f2c82 Add property to bind quesoglc
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2700 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-03 22:34:13 +00:00
Dennis Schridde f851174e8e Proper linking order
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2699 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-03 22:13:35 +00:00
Dennis Schridde 2d94849fbc Update po
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2698 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-03 22:13:05 +00:00
Dennis Schridde 94136efe24 Revert to the non-global static_assert, since MSVC is not ready for the global one, yet.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2697 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-03 21:42:55 +00:00
Per Inge Mathisen e3fcef4ace Complete the implementation of ECM (Electronic Counter Measures) in the code.
This is still a preliminary implementation, but works. If a source object tries
to see a target object whose ECM power is higher than the source object's sensor
power, the source sensor range is reduced by one third. Cyborgs get an innate
ECM power bonus, and enemies now need to be one third closer to hit them.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2695 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-03 20:22:40 +00:00
Per Inge Mathisen c4a30cc54b Remove dead code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2694 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-03 20:01:30 +00:00