Commit Graph

1885 Commits (244842406c255db95de9b015a0ccbcf4833eb4be)

Author SHA1 Message Date
Giel van Schijndel cdc92ebfe6 * Apply ListNode<T>::iterator in class CBTEditDoc
* Initialize CHeightMap's member variables using the constructor's initalization list rather than its body

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2254 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-28 17:54:08 +00:00
Roman C 37a658ef06 Target selection routine update:
- units attached to a commander will now tend to attack units that attack their commander, when they have no explicit target. The higher rank the commander has, the bigger is the chance that attacker of the commander will be attacked.

- units attached to a commander will give more priority to the targets that are already attacked by other members of the same commander group.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2253 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-28 16:39:20 +00:00
Ari Johnson 993ae8e46f Added nettypes.[ch] to Xcode project file
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2252 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-28 14:40:17 +00:00
Giel van Schijndel d50c04ef6b * Replace usage of ListNode<C3DObjectInstance> by class CBTEditDoc by std::list<C3DObjectInstance>
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2251 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-28 14:34:28 +00:00
Giel van Schijndel bca3e1f535 * Some const correctness
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2250 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-28 14:30:05 +00:00
Dennis Schridde 1ade603eb1 Some more minor adjustments.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2249 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-28 14:05:21 +00:00
Giel van Schijndel 4ef9247c6a * Move CBTEditDoc's member initialisation from the constructor's body into the initialization list
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2248 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-28 14:05:19 +00:00
Dennis Schridde 27f505a3f5 Some renamings and cleanups to simplify the upcoming float uv patch.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2247 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-28 13:50:16 +00:00
Per Inge Mathisen 9f3301f22a Use anisotropic filtering, if available.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2246 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-28 13:49:52 +00:00
Giel van Schijndel 393e753f60 * Update buildsystems for the addition of lib/netplay/nettypes.[ch] in r2160:
* autoconf/automake buildsystem
  * raw makefiles
  * Code::Blocks project file
 * lib/netplay/nettypes.[ch]:
  * set svn:eol-style and svn:mime-type
  * add a GPL header to the file
  * add include guards to the header file (nettypes.h)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2245 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-28 13:41:51 +00:00
Dennis Schridde 822edbc150 Some long lost change to the NSIS installer.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2244 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-28 12:45:15 +00:00
Dennis Schridde 765ad996cb update-po
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2243 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-28 12:38:50 +00:00
Dennis Schridde 2c7fcf0cc8 inputdoubleclick.patch by Watermelon. (I merged his comments from the email into the patch.)
This patch fixes the following tempting features: ;)
1. Doubleclick to select all droids of the same template.
2. Doubleclick construct droid to open up build menu.
3. Double pressing numeric keys '1,2,3,4,5,6,7,8,9' to center view/align camera to the group 1-9 you assigned.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2242 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-28 11:54:20 +00:00
Dennis Schridde ebb1d7a918 Translate3.patch by Martin Koller. Had to Wiggle names.txt, but it seems to have cleanly applied.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2241 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-28 11:35:26 +00:00
Dennis Schridde 8b891888c9 Fix a compilation error (unused variable 'i')
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2240 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-28 11:33:55 +00:00
Dennis Schridde 0463b3be26 Version 1.1a of Kage's pie_import.py: fixed a bug that prevented team colors from ever importing correctly.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2239 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-28 10:42:33 +00:00
Giel van Schijndel ceceb0c57b * Add function countAssignedDroids which counts the amount of droids assigned to a structure
* Use this new function printStructureInfo to display the amount of droids assigned to selected structure
Patch #775 by ohyeh

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2238 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-28 00:34:01 +00:00
Giel van Schijndel 7abcb85aa2 * Fix compile error caused by not #including <cassert>
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2237 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-28 00:13:18 +00:00
Giel van Schijndel 92d0f946bb * Add a safety assert to ListNode<T>::iterator to make sure null pointers are asserted on
* Update the TODO list since SaveSegmentDialog has been ported from MFC to wxWidgets already
 * Remove some commented out occurances of "ListNode<.*>.*\*" (yes regexp), to decrease the search context for refactoring code to use iterators

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2236 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-28 00:06:12 +00:00
Giel van Schijndel 21e85b4e62 * Add copy constructor to class scrollLimitStringIterator
* Apply ListNode<T>::iterator for some for-loops
 * Make CHeightMap::GetScrollLimits return "ListNode<CSrollLimits>::iterator" instead of "ListNode<CSrollLimits>*" (effectively forcing all clients of this function to work in iterator style)
 * Fix ListNode<T>::iterator::operator=
 * Add function "void goToBegin()" to ListNode<T>::iterator (shouldn't be at the iterator I know, but this is the most intuitive intermediate solution)
 * Add an own implementation of std::advance to limitsdialog.cpp (it is needed there);
  * since apparently MSVC's STL developers can't even write something like: "for(; n ; --n) ++i;" correctly!!!

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2235 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-27 23:53:07 +00:00
Giel van Schijndel 7e2a03a022 Greater ease in porting to wxWidgets:
* Rename class CInitialLimitsDlg to InitialLimitsDlg
 * Add templated constructor to InitialLimitsDlg
  * This constructor initializes an std::deque<std::string> (_stringList) with a list of strings
  * This constructor depends on InputIterators (as defined by the C++ standard in section 24.1.1) for its initialization
 * InitialLimitsDlg::OnInitDialog() now initializes its ComboBox with strings that have been loaded by the constructor from _stringList
 * Add a proxy class that serves as an InputIterator for the initialization of InitialLimitsDlg
  * This class is a proxy to ListNode<CScrollLimits>::iterator such that it extracts CScrollLimits.ScriptName and constructs an std::string from it
 - These changes decouple InitialLimitsDlg from the implementation and interface of CHeightMap and CScrollLimits

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2234 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-27 23:07:17 +00:00
Giel van Schijndel d6ee80ee25 * Remove annoying usage of DEBUG_NEW since it seems to be causing compile errors at seemingly random times (which is _no_ fun)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2233 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-27 22:42:59 +00:00
Giel van Schijndel 84f7676349 * Add class ListNode<T>::iterator so that we can iterator over a linked list of ListNode<T>s (this will ease porting of code that uses class ListNode<T> to std::list<T> instead
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2232 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-27 22:29:46 +00:00
Giel van Schijndel 8010de593a * Put implementation in class declaration of template class ListNode<T> for increased locality and readability
* Enable compilation of RTTI (RunTime Type-Information) compilation (not using any of it, .., yet)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2231 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-27 21:11:57 +00:00
Roman C 0e4c52b890 - added some new templates for AI
- fixed some template names

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2230 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-27 18:19:54 +00:00
Roman C d2846c56e5 - made some scripting functions return control to interpRunScript() and report a script error instead of asserting
- added a scripting function to read out droid rank

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2229 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-27 18:18:37 +00:00
Roman C de3555c3bc - make EMP weapon more useful by making it avoid structures and "EMPed" droids
- decrease radius that is used to detect targets of friendly units (might completely disable it later, since it causes some problems with unit AI)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2228 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-27 18:14:43 +00:00
Per Inge Mathisen 57f9c5f17f Sorry, forgot some non-users of texture type in the last commit...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2227 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-27 17:38:50 +00:00
Per Inge Mathisen 31fd7b3a8f Remove unused texture 'type'
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2226 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-27 17:35:08 +00:00
Per Inge Mathisen c9fbb60e50 Remove unused code and resource parameter
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2225 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-27 17:30:44 +00:00
Per Inge Mathisen b2291c9143 Remove weapon turret placement hack that would sometimes put a weapon on heavy bodies
midway between two connectors, as suggested by Watermelon.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2224 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-27 17:19:44 +00:00
Per Inge Mathisen 8937d19e43 Free texture data from normal memory immediately after uploading to VRAM.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2223 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-27 16:57:41 +00:00
Per Inge Mathisen 8953d16fbd Projectiles bugfix from Watermelon. Now projectiles should hit their targets more often again.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2222 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-27 16:44:44 +00:00
Giel van Schijndel f73e4e6488 * Remove some spaces which caused problems with svn:keywords
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2221 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-27 15:34:26 +00:00
Giel van Schijndel b4afe5b827 * Use wxStdDialogButtonSizer for the default buttons instead of a wxBoxSizer with some wxButtons in it
* Rename the dialog in savesegmentdialog.xrc from "Dialog" to "Save Map Segment"

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2220 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-27 15:33:15 +00:00
Per Inge Mathisen 176be97ec3 Remove the code to remake terrain tiles. Instead just free them and make them anew.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2219 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-27 14:58:17 +00:00
Giel van Schijndel 3c24ae3d6f * Rename AutoFlagDialog::OnDegree to OnRotate
* Give all parameters of AutoFlagDialog a default value
 * Fix typo (used _TogXFlip and _TogYFlip instead of _ToggleXFlip and _ToggleYFlip respectively)
 * Rename buttons ID_OK and ID_CANCEL to wxID_OK and wxID_CANCEL respectively; this causes wxWidgets' default handlers to be used for these

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2218 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-27 14:30:07 +00:00
Giel van Schijndel 4a34916549 * Fix some syntax errors (missing semi-colons, or semi-colons where they shouldn't be)
* Add a default constructor for wxNumericTextValidator
 * class wxNumericTextValidator:
  * add DECLARE_DYNAMIC_CLASS, DECLARE_EVENT_TABLE and IMPLEMENT_DYNAMIC_CLASS
  * fix BEGIN_EVENT_TABLE (use wxNumericTextValidator instead of wxTextValidator)
 * return *this in copy assignment operator
 * Some other minor fixes

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2217 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-27 14:20:34 +00:00
Per Inge Mathisen 695c0796e8 More texture cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2216 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-27 12:27:21 +00:00
Per Inge Mathisen e6ed6b0cde De-globalize the terrain tiles loader code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2215 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-27 12:10:31 +00:00
Giel van Schijndel d8b7837c3b * Add another ported dialog: SaveSegmentDialog; to directory wxDialogs
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2214 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-26 22:28:55 +00:00
Giel van Schijndel 22712ec8d1 * Remove our own "custom" event handler for the cancel button "ID_CANCEL" and use wxDialog::OnCancel instead
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2213 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-26 22:22:34 +00:00
Giel van Schijndel 31c4a1de54 * Use wxDialog::OK and wxDialog::Cancel in the handlers for ID_OK and ID_CANCEL respectively
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2212 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-26 22:16:41 +00:00
Giel van Schijndel 18bf3bfa9c * Add special wxValidator derivation: wxNumericTextValidator
* This class validates input for wxTextCtrl to be numeric only
  * Also upon initialization of the window that contains the "validated" text controls; these controls will be filled with a number given by a passed pointer
  * Upon closing of this window the current value from these text controls will be written back into that pointer

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2211 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-26 22:11:35 +00:00
Dennis Schridde 962a6db92c Version 1.1 of the Blender scripts by Kage.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2210 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-26 20:53:20 +00:00
Giel van Schijndel e684aed3b6 Greater ease in porting to wxWidgets:
* Rename class CSaveSegmentDialog to SaveSegmentDialog
 * Don't allow public access to private data members anymore
 * Initialize private data members with constructor
 * Add public access, member functions for private data members
 * Don't define functions in a header file
 * Add a header guard

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2209 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-26 20:04:46 +00:00
Roman C 7501f09cff 1.10 AI Update:
-before starting building a cyborg engineer, make sure it is already researched
-fixed bug #9601

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2208 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-26 15:59:07 +00:00
Giel van Schijndel e7ff6f8af0 * Update TODO file: we already converted one dialog from MFC to wxWidgets: yay!
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2207 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-26 14:42:55 +00:00
Giel van Schijndel c355c4dcdf * Add directory wxDialogs; I'll use this as a temporary storage for dialogs which have been ported from MFC to wxWidgets
* Add first converted dialog: AutoFlagDialog; to directory wxDialogs

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2206 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-26 14:38:22 +00:00
Giel van Schijndel 90ca240964 Greater ease in porting to wxWidgets:
* Rename class CAutoFlagDialog to AutoFlagDialog
 * Don't allow public access to private data members anymore
 * Initialize private data members with constructor
 * Add public access, read-only, member functions for private data members
 * Upon initialization add button "handlers" to private pointers; rather than retrieving these pointers each time again
 * Use only one function OnRotate() rather than four functions OnRot0, OnRot90, OnRot180 and OnRot270 which all have the exact same definition

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2205 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-26 14:12:20 +00:00