Commit Graph

2227 Commits (a57b33f800b50b0d992095c6bea3c32ca492dbcf)

Author SHA1 Message Date
Giel van Schijndel ff28313711 Patch #834 by Buginator:
* deleteSaveGame():
   * Make sure to delete files from the subdirectory they're in
   * Check the return value of PHYSFS_delete() and output with debug(LOG_ERROR) when an error occurred
 * _runLoadSave():
   * Make sDelete static, so that its value is preserved in between function calls (yes this is a dirty function which breaks Curly's law more than once)
   * Only attempt to delete a savegame is there is one

Meself:
 * Change the "size-specifier" of sRequestResult & sDelete to PATH_MAX instead of a magic number and a wrong constant respectively
 * Utilize snprintf instead of sprintf at some places
 * Add some comments to the above patch


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2802 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-11 20:23:38 +00:00
Giel van Schijndel a08e6f07f8 * Provide alloca() on GCC, MinGW and MSVC (and all other WZ_OS_UNIX compilers that provide <alloca.h>
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2801 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-11 20:04:50 +00:00
Giel van Schijndel ed950825a9 * Utilize the Popt library for command line parsing
* Add popt as a build dependency to build systems:
   * autotools
   * Debian package build-depends
   * raw Makefiles
   * Code::Blocks project file
 * Make ParseCommandLine and ParseCommandLineEarly const correct
 * Rewrite ParseCommandLine and ParseCommandLineEarly to utilize Popt


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2800 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-11 17:59:32 +00:00
Per Inge Mathisen 9472fee6ef Fix a typo from my last commit.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2799 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-11 17:56:06 +00:00
Giel van Schijndel 8f3ba5029b * Don't --disable-quesoglc while building a Debian package as that isn't an option to configure anymore
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2798 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-11 17:54:46 +00:00
Per Inge Mathisen c3f5cd3183 Only psDroid->psActionTarget is actually used for multiweapon targetting.
psDroid->psTarget is only used for orders, where multiweapon has no meaning.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2797 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-11 17:20:25 +00:00
Giel van Schijndel aef7af381e * Make function NETsetupTCPIP const correct
* Don't #include <unistd.h> in source:trunk/src/clparse.c as we don't need it
 * Rename a debug message to use the correct function name as prefix (bitimage.c)
 * Utilize snprintf instead of sprintf, at two locations


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2796 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-11 17:08:41 +00:00
Per Inge Mathisen 8f9d1b640b We do not give droids orders to attack multiple targets with multiple weapons, so there
is no need to store multiple targets in order code. Reverting this addition.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2795 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-11 16:52:50 +00:00
Per Inge Mathisen 01b13c8df3 Remove DACTION_ATTACK_M, attack with multiple weapons order. Why would you ever
want to attack without multiple weapons, if you have them? In any case, it was
unused.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2794 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-11 15:33:03 +00:00
Per Inge Mathisen 9caf914534 The convoluted targetting code in actionUpdateTransporter was actually never used.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2793 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-11 15:13:48 +00:00
Per Inge Mathisen c49f899b13 Fix wrong weapon enumeration in new savegame format, leading to an assert. Sorry, guys!
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2792 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-11 00:12:29 +00:00
Per Inge Mathisen dfac006aa5 Extend new savegame format to save game messages.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2791 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 23:26:19 +00:00
Per Inge Mathisen ae9a987d92 Properly add structures and features to new savegame format.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2790 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 22:34:07 +00:00
Per Inge Mathisen a204e399d3 Remove unused gfxScaling of features
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2789 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 22:13:58 +00:00
Per Inge Mathisen feb9dbdce6 Factories do not have a formation, oddly enough! So remove it.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2788 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 21:20:15 +00:00
Per Inge Mathisen c6316b31d2 Remove unused structure variables
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2787 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 20:42:49 +00:00
Per Inge Mathisen 6e163d9003 Extend new savegame code to save game objects. Droids saved fully, while structures
and features still have a way to go.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2786 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 20:28:28 +00:00
Per Inge Mathisen f50b4d11dd The old armour system had a single armour value for structures and features,
while droids had one armour value for each weapon class (there are only two 
weapon classes now, though). The new armour system by Watermelon has for droids
one for droids one set of armour values, in which there is one armour value for 
each weapon class, for each six side of the droid. This patch generalizes the 
armour systems into one, and puts it into the base object definition 
(BASE_OBJECT). This makes it easier to maintain, and is one step toward a more 
advanced armour system for structures as well.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2785 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 19:27:08 +00:00
Giel van Schijndel 9f114081fb * Update Doxygen comment for version_getFormattedVersionString (forgot to include this change in r2783)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2784 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 18:46:03 +00:00
Giel van Schijndel bad236f4a9 * Make the <BUILD DATE> part of the formatted version string optional
* Don't include it when we're building from a tag


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2783 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 18:42:32 +00:00
Per Inge Mathisen 8b14087c3a Remove multiweapon orders. Multiple weapons do not need separate orders.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2782 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 17:31:37 +00:00
Giel van Schijndel 45ea795b10 * Move sDelete into local scope (was only used in one function anyway)
* Move sTemp into a __more__ local scope
 * Don't strip an extension from a string we aren't going to use anyway...


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2781 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 16:21:26 +00:00
Per Inge Mathisen caa5e02217 A droid never has more than one target stats type, so revert the addition of
multiple target stats for droids from r857.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2780 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 15:26:10 +00:00
Per Inge Mathisen 3b07b90160 New function objCount which counts the number of objects in the game.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2779 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 13:59:05 +00:00
Per Inge Mathisen ff13be0b96 Do not disable lighting if it was never enabled in the first place, to avoid
doing unnecessary OpenGL state changes. Also make sure we turn off normalization.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2778 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 13:56:14 +00:00
Dennis Schridde 1dd2b54431 wzglobal.h never belonged to Eidos. Instead large parts of the code are copied from Qt and thus belong to Trolltech.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2776 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 13:25:02 +00:00
Dennis Schridde 5ccaa17971 Correct WZ_CC_TINYC check. (Note the namechange!)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2775 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 12:10:54 +00:00
Dennis Schridde 3a56a479b3 - Extend compiler detection with TinyCC
- Add window system detection
- Remove MSDOS from supported OSes


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2771 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 00:31:43 +00:00
Dennis Schridde 4ec3e1c03a update-po
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2767 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-09 23:37:10 +00:00
Giel van Schijndel 24969666e1 * Remove incorrect text/plain mime-types
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2765 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-09 23:27:03 +00:00
Giel van Schijndel 9e6242b67f * Remove the 3rdparty dir as it (and its contents) isn't used right now
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2764 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-09 23:11:45 +00:00
Dennis Schridde 1d3ed30822 More UI ptr<->int fixes. !!WIP!!
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2763 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-09 21:01:23 +00:00
Dennis Schridde cd586193d3 - Use UserData instead of pUserData to store non-pointer data in GUI system.
- Replace several occurances of (void*)0 with NULL.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2762 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-09 20:07:12 +00:00
Dennis Schridde 364a32d1de Remove QuesoGLC from the buildsystem. Reasons:
- It builds examples, etc. by default, which is annoying
- It will install along with Warzone, which is dangerous


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2761 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-09 19:32:01 +00:00
Freddie Witherden 17e60608cd Applied patch #839 by Buginator, which fixes a missing file close in map.c
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2760 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-09 18:16:03 +00:00
Dennis Schridde 223bc803e8 Use OLD_TEXTURE_SIZE_FIX instead of 256.0f to scale texcoords, to make clear that this is a fix for the old ...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2759 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-09 17:43:50 +00:00
Dennis Schridde d3c341421d src/wrappers.c: Simplify function and always display fireworks. (bug #5958 / patch #838) -> Should go into branches/2.0 !
src/keymap.c: Use function to access debug-mapping-status instead of global-var.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2758 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-08 23:49:43 +00:00
Dennis Schridde cc7840e866 change_int64_t_to_intptr_t.patch from patch #837 by <cybersphinx> Christian Ohm.
(Make WZ compile with the Tiny-C-Compiler by using the correct type for storing pointers as ints)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2757 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-08 23:11:59 +00:00
Dennis Schridde b7daedee14 Replaced NULL ptr with dummy kf_NOOP function so we don't crash on startup...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2756 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-08 23:01:13 +00:00
Dennis Schridde 9a06997527 Replace const + #define hackery with an enum.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2753 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-07 22:54:19 +00:00
Giel van Schijndel 7b0a6d7686 * Add a MSVC project file for AutoRevision
* Add it to the MSVC Workspace/Solution
 * Set svn:eol-style on the MSVC project & solution files to CRLF

Patch #832 by Buginator.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2752 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-07 15:13:09 +00:00
Giel van Schijndel 94b04775fb * Make sure that AutorRevision can be compiled even when using Unicode (makes lots of WINAPI functions accept UTF-16 LE instead of ASCII)
* Use SetEnvironmentVariableA instead of SetEnvironmentVariable which is a macro
Issue pointed out by Buginator

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2748 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-06 19:24:48 +00:00
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