Commit Graph

2688 Commits (720fc7fceca92146379330ae69d030048dd52c8a)

Author SHA1 Message Date
Giel van Schijndel efba7fe2c4 * Rename the "url" tag of wxHyperLink to "href"
* Remove warzone2100.png from the current directory (it was just a (cheap) copy from icons/warzone2100.png anyway)
  * In aboutdialog.xrc refer to the warzone2100.png from icons/ instead...

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3169 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 21:20:34 +00:00
Giel van Schijndel 3ebbf43b9f * Add another ported dialog: InfoDialog; to directory wxDialogs
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3168 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 20:52:59 +00:00
Giel van Schijndel ae79afb9a4 * Use sasprintf in combination with sendTextMessage instead of DBCONPRINTF followed by sendTextMessage; which A) wouldn't work on non-debug builds, and B) would send the message twice to the local player on debug builds
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3167 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 20:23:55 +00:00
Giel van Schijndel cbb1011be9 * Fix a slight error I made in runningMultiplayer() where I swapped true & false
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3166 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 20:12:33 +00:00
Gerard Krol fbe50e45ff Update for the removal of optimisepath.c and the cleanup of the sequence code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3165 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 18:24:26 +00:00
Giel van Schijndel f2d8ba9617 * Rename class ExportInfo to InfoDialog and exportinfo.[ch]pp to infodialog.[ch]pp since other than being __used__ to display export info it has on its own nothing to do with export info
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3164 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 16:50:14 +00:00
Giel van Schijndel 06dab81c11 * Update Code::Blocks and MSVC project files to complement the cleanup of sequence code in r3162
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3163 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 16:31:51 +00:00
Gerard Krol 58b82f44ad Remove all RPL cruft from the sequence code. The new sequence code can be added to sequence.c easily. Projects will need to be updated.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3162 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 15:57:29 +00:00
Freddie Witherden 8f5fb1c714 Commit the final part of patch #897 (send/recvDestroyStructure)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3161 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 15:15:10 +00:00
Giel van Schijndel 776babad75 * Use a function to check for true multiplayer games (i.e. neither single player nor skirmish); rather than using a lot of copy-pasted code
* Allow cheating in true multiplayer games, but only when the debug keymap is enabled (which can only be enabled in debug builds)
Patch #899 by Buginator with some modifications by me (mainly adding all runningMultiplayer() calls)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3160 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 15:10:43 +00:00
Freddie Witherden 7e9b108645 Commit part 4 of patch #897 (send/recv structure demolished messages.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3159 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 15:10:34 +00:00
Freddie Witherden ea9d378131 Commit part 3 of patch #897 (and there is still more to come!).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3158 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 14:57:58 +00:00
Giel van Schijndel fd9d44e1d3 * Mark some strings for gettext translation
* Change rangeOnScreen to a bool

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3157 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 14:48:44 +00:00
Freddie Witherden 3bc0d30be1 Commit part two of patch #897 by Buginator along with some small changes by myself.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3156 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 14:47:44 +00:00
Freddie Witherden 838e9f6009 Commit the first patch of patch #897 by Buginator and myself with some additional changes by myself
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3155 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 14:41:25 +00:00
Giel van Schijndel 84202107e7 * Remove #include "optimisepath.h" from src/move.c (didn't see this while committing r3153)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3154 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 14:05:31 +00:00
Giel van Schijndel bffd531dd7 * Remove unused file src/optimisepath.[ch]
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3153 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 14:02:13 +00:00
Giel van Schijndel fbf03af195 * Remove macros:
* ROUND: replace by a static inline function (math_round) instead
  * FRACTCONST: this macro just cast both of its arguments to float and then divide the first by the second
  * MAKEFRACT_D: this macro would cast to FRACT_D (which was typedef'd as float but should have been typedef'd as double); so cast to double instead (where required)
  * FRACTmul_D: would cast both of its arguments to FRACT_D and multiply them
  * FRACTdiv_D: would cast both of its arguments to FRACT_D and divide the first by the second
  * MAKEINT & MAKEINT_D (where #defined the same); this macro would just cast to SDWORD (aka "int" or "signed int")

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