Commit Graph

2470 Commits (e8be7978e62dc551892e2492d7d9bc81dbb3e94b)

Author SHA1 Message Date
Giel van Schijndel e8be7978e6 * Make some functions const correct
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3151 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 11:59:47 +00:00
Giel van Schijndel 97991eab77 * Make sure that buildings we cheated ourselves (in debug mode with the "CTRL+O" menu) will be sent to the other players in a multiplayer game as well
* Also send a console text message to all players when a user does cheat himself a building

Patch #898 by Buginator; comments written by me

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3150 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 11:36:21 +00:00
Giel van Schijndel 4ed296cbcd * Don't allocate a string buffer from the heap
* and especially don't use the wrong delete operator!! (delete [] String; was necessary not without the '[]')
Greater ease in porting to wxWidgets:
 * Rename class CExportInfo to ExportInfo
 * Pass the string to display to ExportInfo's constructor rather than funking around with its member variables (encapsulation!)
 * Clean up & remove large portions of ExportInfo's (unnecessary) code

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3149 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 01:17:50 +00:00
Giel van Schijndel 811f62370c * Add another ported dialog: AboutDialog; to directory wxDialogs
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3148 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 00:40:28 +00:00
Giel van Schijndel 9ef5a36aaa * Add a wxWidgets XML Resource Handler for wxHyperLink (is a member class of wxHyperLink itself: wxHyperLink::XmlHandler)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3147 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 00:19:19 +00:00
Giel van Schijndel 3b2417bddd * Fix a small error where we would use the wrong class name for DECLARE_DYNAMIC_CLASS
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3146 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 00:15:14 +00:00
Giel van Schijndel 4e784c5c02 * Add wxHyperLink class (copied from the wxCode project)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3145 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-23 23:39:16 +00:00
Dennis Schridde 09a8e33f61 Rename PACKAGE_MAINTAINER to PACKAGE_DISTRIBUTOR to clarify.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3144 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-23 21:14:02 +00:00
Dennis Schridde 4dd10fd6bb clparse.c:262: warning: enumeration value ‘CLI_CONFIGDIR’ not handled in switch
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3143 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-23 21:13:06 +00:00
Dennis Schridde 94548aa9db Enhanced authors file:
- Added some names/nicks where they were missing
- List area of main contribution (:)
- Include credits for major achievements (+)
Feel free to enhance...


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3142 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-23 20:14:46 +00:00
Giel van Schijndel 06f01e129a * #Define PACKAGE_VERSION instead of VERSION in the raw Makefiles (synonymous to r3125 which was for the Code::Blocks project file)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3141 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-23 19:58:20 +00:00
Dennis Schridde d21c8a2753 Correcting germanified Gerard...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3140 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-23 18:43:43 +00:00
Dennis Schridde c9e197c902 Improved MasterServer by Gerhard Schaden, patch #893.
Depends on Python 2.5, but we should have that on the server very soon.
Should effectively help fight ghostgames and also be easily extensible in the future. (Gerhard talked about a web-interface with admin functions. :) )


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3139 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-23 18:40:10 +00:00
Giel van Schijndel 6a5a93076c * Add a command line option "--configdir" which enables the user to select another configuration directory than the default ~/.warzone2100-2.1
* This directory currently __needs__ to exist already!

Patch #896 by Buginator with some changes by me:
 * Renamed "userdir" to "configdir"
 * Split up PhysicsFS initialisation so that we call PHYSFS_init before gettext initialisation and select the write directory __after__ early command line parsing

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3138 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-23 17:01:42 +00:00
Giel van Schijndel ee3b875b7d * Use an ASSERT instead of an assert for (size >= MAX_PATH) so that we can provide the values of both variables to make debugging on this assertion easier
* Used this for the change in r3136 though I accidentally didn't commit it there...

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3137 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-23 16:54:14 +00:00
Giel van Schijndel 798d10c6d8 * Guarantee that PATH_MAX is large enough to use as the size for Windows API calls (since with MinGW it is 159 bytes while it should be 160)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3136 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-23 16:44:36 +00:00
Giel van Schijndel 67d902a841 * Use snprintf "%s%s%s%s" instead of a single strlcpy followed by multiple strlcat calls
* Make sure to pass the buffer size as well to getPlatformUserDir (so that we can use strlcpy & strlcat instead of strcpy & strcat respectively)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3135 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-23 16:04:09 +00:00
Per Inge Mathisen 000dab7d3c Correctly calculate highest point for defensive structures larger than one tile.
This only applies to LASSAT in the current rules.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3134 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-23 10:27:39 +00:00
Giel van Schijndel 9fe5736f41 * Remove macro FRACTdiv and all places where it was used (all it did was casting both of its parameters to (float) and dividing the first by the second)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3133 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 23:37:30 +00:00
Giel van Schijndel ae90bd9c0c * Remove macro FRACTmul and all places where it was used (all it did was casting both of its parameters to (float) and multiply them)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3132 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 23:29:25 +00:00
Giel van Schijndel aeecc95088 * Remove macro MAKEFRACT and all places where it was used (all it did was casting to (float))
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3131 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 23:13:05 +00:00
Giel van Schijndel 846dfa9efa * Get rid of cheap modulus calculating macro MODFRACT and use function fmodf instead
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3130 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 21:39:31 +00:00
Giel van Schijndel bc73882d7e * Set bugtraq:* properties on all directories
* Convert the tilesets 4, 5, 6 and 7 to the separate tile per-file tilesets (using the tile_texpage2mipmap_tileset tool)
  * Purposefully skipped 1, 2 and 3 since I think those are __exactly__ the same to the WZ's original tileset


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3129 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 21:19:20 +00:00
Giel van Schijndel 14f2fe750a * Make sure not to use if (incorrect-condition) { ASSERT(FALSE, ...); }; instead use ASSERT(correct-condition, ...);
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3128 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 21:10:51 +00:00
Giel van Schijndel 94481386e4 * Add the Newst tileset to the raw Makefiles and autotools buildsystems (to build a ZIP file out of it)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3127 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 20:01:10 +00:00
Giel van Schijndel b83a5f9368 * Set svn:eol-style to native for the doc/text files for the Newst tileset mod
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3126 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 19:51:52 +00:00
Giel van Schijndel 16ebf893ba * #Define PACKAGE_VERSION instead of VERSION in the Code::Blocks project file
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3125 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 19:48:10 +00:00
Giel van Schijndel 7d884c4835 * Add the Makefiles produced by automake and configure respectively Makefile.in and Makefile to the svn:ignore list
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3124 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 19:29:29 +00:00
Giel van Schijndel b133979966 * Backport changes to src/multigifts.c and dependent changes to other files from netcode branch to trunk
* Utilize the net primitives API for sending & receiving of different types of gifts

Patch #888 by EvilGuru


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3123 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 18:51:45 +00:00
Freddie Witherden 2e6bf47a94 Make psDroid->numKills a float and rename it to psDroid->experience. Commits patch #894
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3122 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 17:07:26 +00:00
Per Inge Mathisen 08d665fe1c Remove unused palette defines
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3121 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 16:55:39 +00:00
Dennis Schridde 3c7898d1c3 Add fancy author/version/doc headers to masterserver
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3120 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 15:21:11 +00:00
Giel van Schijndel 50c444f6e6 * Apply a large quantity of style changes from patch #888 by EvilGuru (it's a backport from the netcode branch btw) (to reduce the diff-size of it)
* Remove some useless casts
  * Rewrite some "else { if (X) { } }" statements to "else if (X) { }"
  * Rewrite several "if (X) { if (Y) { } }" statements to "if (X && Y) { }"
  * Remove some commented out (and sometimes also duplicated) code
  * Add some tiny bits of comments here & there


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3119 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 00:30:27 +00:00
Giel van Schijndel 75753bc3f8 * Replace two uses of strcpy() with the safer strlcpy()
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3118 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 00:00:16 +00:00
Gerard Krol 49958fcc6b Expire games that were updated > 1 hour ago.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3114 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-21 20:51:06 +00:00
Per Inge Mathisen 393dc79a05 Fix crash when combat units are assigned to commanders. See bug #10536.
Patch #891 by Thomas Frauendorfer <caotic>.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3113 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-21 18:28:46 +00:00
Per Inge Mathisen 921520d04b Remove dead code. Patch #890 by Thomas Frauendorfer <caotic>.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3112 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-21 18:23:18 +00:00
Per Inge Mathisen 53aa930d6e Turn IMD min and max dimensions into vectors.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3111 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-21 17:34:23 +00:00
Per Inge Mathisen cd415282be Cleanup renderStructure()
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3110 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-21 17:14:18 +00:00
Freddie Witherden f85cadbdd2 Fix a bug with cursor trapping that would prevent it working when loading a saved game
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3109 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-20 20:15:34 +00:00
Per Inge Mathisen 35277a4b82 Temporary fix for bug introduced with commit 3065 that made direct weapons unable to hit. Patch #886 by Buginator.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3108 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-19 20:18:37 +00:00
Giel van Schijndel db3d933791 * Add a new cheat/debug-command "showsamples"
* This command will cause the amount of samples in the sound library's queues & lists to be constantly displayed (until turned off) on screen

Patch #887 by Buginator


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3107 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-19 20:17:54 +00:00
Gerard Krol ddca71af93 Fixes the broken save game loading from r3100.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3106 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-19 18:36:05 +00:00
Giel van Schijndel 29139cc6da * Fix crashes due to failing to call the callback when sounds are removed from the queue/list
Part of patch #887 by Buginator


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3105 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-18 23:25:32 +00:00
Giel van Schijndel 41c602ca60 * Don't prefix the FPS rate displayed with leading zeros (there's no need for it)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3104 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-18 23:17:33 +00:00
Giel van Schijndel 008266c41f * Make showFPS a bool instead of an integer (as it can only be enabled or disabled)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3103 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-18 23:07:41 +00:00
Giel van Schijndel a419479ed8 * Remove some usage of macros MAKEINT (just a cast-to-SDWORD macro) and PERCENT (a / b * 100)
* ASSERT that our denominator isn't zero to prevent a divide by zero error (which I encountered, thus this patch)
  * In the main time provide a work around for when the denominator is zero (which due to the above ASSERT will only be useful for release builds, which is intentionally)
 * Move variable percent into a more local scope


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3102 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-18 22:54:10 +00:00
Giel van Schijndel 0fa3850cc3 * Remove commented out code (was only active if HARDWARE_TEST was defined, looks like PSX stuff)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3101 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-18 22:48:34 +00:00
Gerard Krol 718bff04f9 Removal of duplicate code. No changes should be observed.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3100 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-18 21:11:04 +00:00
Gerard Krol 1e7bf56eba Fix the horizontal line in the sky that could be seen when using "mist" by increasing the height of the fogbox.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3091 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-17 20:42:13 +00:00