* Also dynamic_cast<T*> (which is compiler supported) should not be slower (if not faster) than wxWidgets' own RTTI implementation (t*)->IsKindOf(CLASSINFO(T))
This _does_ require RTTI to be enabled in wxWidgets' compilation; just enabling RTTI (as a compiler option) will only increase binary size, it should not add runtime overhead
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2264 4a71c877-e1ca-e34f-864e-861f7616d084
* remove some unnecessary #include directives
* add header guards
* declare some member functions const
* Add "const std::string& InitialLimitsDlg::SelectedString() const" which retrieves the string of the currently selected item
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2260 4a71c877-e1ca-e34f-864e-861f7616d084
* Some const correctness: "char*" -> "const char*"
* Fix a bug "if (a = b);" -> "if (a == b);"
* Fix a possible error where NULL might be dereferenced in CHeightMap::DrawScrollLimits (actually if that function would be called dereferencing NULL would be inevitable)
* Use references for output parameters rather than pointers
* If we use operator new[] then we should use operator delete[]
* Remove workaround for bad std::advance implementation since we're not using advance with our own iterators anymore
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2259 4a71c877-e1ca-e34f-864e-861f7616d084
Any fixes, if necessary, should be applied on loading.
In the image code (IMAGEDEF) this did not work, so OLD_TEXTURE_SIZE_FIX is applied during rendering.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2258 4a71c877-e1ca-e34f-864e-861f7616d084
* Make all member functions of CHeightMap that have an argument list declaration of "(void)" use "()" instead
* Rename std::advance in limitsdialog.cpp to just advance since it otherwise conflicts with MSVC's (flawed) implementation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2255 4a71c877-e1ca-e34f-864e-861f7616d084
* 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
- 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
* 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
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
* 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
* 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
* 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
* 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
* 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
- 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
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