Commit Graph

190 Commits (9e790e79abb13724651edf9dbad70b678520ba1b)

Author SHA1 Message Date
Giel van Schijndel eef217fc4a * Make some EditWorld documents be valid reStructured Text
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2583 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-22 00:38:08 +00:00
Giel van Schijndel 03629c04ab * Set svn:mime-type to text/x-rst to get Wiki-like markup in Python-powered viewers
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2580 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-21 22:29:03 +00:00
Giel van Schijndel 1dd3e33c2c * Add DirectX -> OpenGL porting tasks to EditWorld's TODO list as well
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2545 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-11 23:04:21 +00:00
Giel van Schijndel 173f093901 * Fix tile_texpage2mipmap_tileset, it now makes imagemagick output zero-padded filenames up to 2 digits (like Warzone expects)
* Bump version numbers of tile_texpage2mipmap_tileset to 1.2

Patch by Kevin Gillette <kage>: http://forums.wz2100.net/index.php?topic=1010.msg9137#msg9137

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2542 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-11 22:47:13 +00:00
Giel van Schijndel 69ad10edc4 * Fix a compile error when attempting to perform a "Release" compile
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2454 4a71c877-e1ca-e34f-864e-861f7616d084
2007-09-08 12:20:22 +00:00
Giel van Schijndel fe265cdc57 * Remove unused bitmap pumpkin16.bmp which is just a 16 colour version of res/bitmap1.bmp
* Remove unused bitmaps res/bitmap2.bmp res/bmp00001.bmp; also remove them from our resource file
 * Don't use a magic number in editworld.rc for means of referring to res/bitmap1.bmp use IDB_BITMAP1 instead

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2453 4a71c877-e1ca-e34f-864e-861f7616d084
2007-09-08 12:12:34 +00:00
Giel van Schijndel b2f95025ed * Remove M$ SourceSafe file (we don't use SourceSafe!! We use Subversion!!!)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2452 4a71c877-e1ca-e34f-864e-861f7616d084
2007-09-08 11:47:29 +00:00
Giel van Schijndel c0c7c6fa51 * Remove the last uses of template class ListNode<T> which was a cheap replacement of std::list<T>
* Remove some commented out functions from heightmap.cpp which where duplicated (i.e. functions with the same name and parameter prototypes existed elsewhere in the file) and used ListNode<T>
 * Replace usage of ListNode<T> with std::list<T> usage; actually I replaced it with std::list<T>::iterator or std::list<T>::const_iterator since all code that still used ListNode<T> was code iterating over an instance of ListNode<T>
 * Remove listtemp.h which contained template class ListNode<T>

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2451 4a71c877-e1ca-e34f-864e-861f7616d084
2007-09-08 11:42:30 +00:00
Giel van Schijndel fa12543c0d * Remove rather empty file stdafx.cpp
* #define VC_EXTRALEAN before including MFC & Windows headers to exclude some unused stuff

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2447 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-26 21:58:15 +00:00
Giel van Schijndel 30a62a1b6c * Add window IDs to TODO file; which is easier to understand (I hope) than filenames
* Remove several unused windows from the resource file: IDD_EDITSTATS, IDD_HEIGHTSCALE, IDD_OBJECTTYPES, IDD_SETSTATSCHOICE, IDD_SETSTATSCOMBO and IDD_SETSTATSVALUE

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2446 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-26 20:46:54 +00:00
Giel van Schijndel c0df2cb97f * Rename CAboutDlg to AboutDialog and move it out of btedit.cpp into aboutdialog.[ch]pp
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2445 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-26 20:26:50 +00:00
Giel van Schijndel 41dada6a26 * Make Limits dialog resizeable and alter the proportions slightly to make this window easier to work with
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2444 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-26 19:21:38 +00:00
Giel van Schijndel 4cf90b9f8c * Remove empty destructors
* Update EditWorld's TODO file (remove limitsdialog.cpp from the list of yet to port windows)
 * Use wxWidgets' precompiled header in numtextval.hpp

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2443 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-26 18:59:10 +00:00
Giel van Schijndel c7efa311fc * Add template class wxListCtrlValidator<Container> which is a specialization of wxGenericValidator that only works on wxListCtrl instances
* This class uses a container of integers instead of wxArrayInt (C++ container as specified in section 23.1 of the ISO C++ standard 1998)
 * Add another ported dialog: LimitsDialog; to directory wxDialogs

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2442 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-26 16:38:55 +00:00
Giel van Schijndel acccbf667e * Rename function names to names similar to what wxSmith produces (wxSmith is a wxWidgets dialog-editor plug-in for Code::Blocks)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2441 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-26 16:23:26 +00:00
Giel van Schijndel e5fdf5e346 * Remove #include directives for unused header files (btedit.h and debugprint.hpp)
* Wrap some strings in _T() macro (deals with unicode/ascii text)
 * Add an header guard to limitsdialog.hpp
 * Use std::deque's constructor to load data into it from two InputIterators (first & last); note: in case of MSVC6 this requires you to fix the flawed STL

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2439 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-26 11:40:19 +00:00
Giel van Schijndel a2ceea149f * Use references for output parameters for function CHeightMap::GetMapSize instead of pointers (also use "unsigned int" instead of "DWORD")
* Change the return value of functions CHeightMap::GetMapWidth and CHeightMap::GetMapHeight from "DWORD" to "unsigned int" (also don't mark these functions as inline anymore)
 * Mark function CHeightMap::GetScrollLimits as const and remove the inline keyword from its declaration
 * Add a template function CHeightMap::SetScrollLimits which uses std::list::assign() to copy a list of CScrollLimits from two input iterators (in MSVC6 I had to fix the STL implementation to get this to compile, GCC works fine though, newer versions of MSVC *should* work as well btw)
Greater ease in porting to wxWidgets:
 * Rename class CLimitsDialog to LimitsDialog
 * Add templated constructor to LimitsDialog
  * This constructor initializes an std::deque<CScrollLimits> (_limitsList) with a list of scrolling limits
  * This constructor depends on InputIterators (as defined by the C++ standard in section 24.1.1) for its initialization
 * Put member data in a private part of LimitsDialog's class declaration
 * Make sure all member functions of LimitsDialog only work on its own private data and not on other classes' data
 * Instead the usercode using LimitsDialog can use the InputIterators provided by LimitsDialog::firstLimit and LimitsDialog::lastLimit to copy data over (e.g. using STL Containers' assign() member function)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2435 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-25 17:32:02 +00:00
Giel van Schijndel 876c8b3b61 * Fix the Blender import & export scripts such that they're completely compatible with eachother (i.e. import->export->import == import)
* Add two python mini-scripts (find-bad-pies.py and find-poly-nums.py) that are of fairly little general use, but may serve as an example of how to interface with pie.py (pie.py must be in the python path for these scripts to work)
  * find-bad-pies.py when given a list of filenames will find the ones that, as far as the pie parser (pie.py) is concerned, aren't valid
  * find-poly-nums.py was created to find out if there were any pies that contained any polygons with more than 4 sides
Patch by Kevin Gillette <kage> ( http://forums.wz2100.net/index.php?topic=550.msg7829#msg7829 )

 * Update svn:eol-style and svn:mime-type for all trunk/tools/blender/* files

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2420 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-20 15:09:13 +00:00
Giel van Schijndel 3e8cb6ba4c * Add Python script for the conversion of old-style one-texturepage tilesets to mipmapped tilesets
By Kevin Gillette <kage>

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2383 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-16 10:24:52 +00:00
Giel van Schijndel 5285f0a096 * Cleanup CLimitsDialog's code to make it easier to port it to wxWidgets
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2366 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-09 14:18:57 +00:00
Giel van Schijndel ba7d1d5078 * move class CUndoRedo from bteditdoc.cpp to new file undoredo.cpp
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2363 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-08 20:39:07 +00:00
Giel van Schijndel 243bc7ddb8 * Remove unused files model.cpp/h and seedfill.cpp
* remove #include "snapprefs.h" directive
 * remove non-existent file d3dwrap.h from project file

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2362 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-08 20:10:38 +00:00
Giel van Schijndel 0397a75255 * Remove unused window CSnapPrefs or IDD_OBJECTPREFS
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2361 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-08 19:45:37 +00:00
Giel van Schijndel 9d148e7f8b * Remove unused window CInfoDialog or IDD_DEBUGINFO
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2360 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-08 19:37:17 +00:00
Giel van Schijndel 0931065023 * Use dynamic_cast<T*> instead of wxWidgets' own RTTI implementation (t*)->IsKindOf(CLASSINFO(T))
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2267 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-29 16:55:19 +00:00
Giel van Schijndel 0a310fdd5c * Use dynamic_cast<T*> instead of a C-style (T*) cast (dynamic_cast is safer since it walks the inheritance tree to check whether the pointer is actually of type T)
* 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
2007-07-29 16:45:40 +00:00
Giel van Schijndel bab9bd3316 * Add conversion functions for converting wxString <-> std::string (we're assuming UTF-8 encoding for std::string here)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2263 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-29 16:30:25 +00:00
Giel van Schijndel bba2360eef * Add another ported dialog: InitialLimitsDialog; to directory wxDialogs
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2262 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-29 15:56:39 +00:00
Giel van Schijndel c4b9711e46 * Don't return a reference to a temporary; instead return by value
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2261 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-29 15:47:27 +00:00
Giel van Schijndel 32f0b5bb1b * Minor cleanup:
* 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
2007-07-29 15:43:01 +00:00
Giel van Schijndel 087703e801 * Replace usage of ListNode<CScrollLimits> by class CHeightMap by std::list<CScrollLimits>
* 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
2007-07-29 14:04:24 +00:00
Giel van Schijndel 8310f9170e * Replace usage of ListNode<GateWay> by class CHeightMap by std::list<GateWay>
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2257 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-29 12:51:49 +00:00
Giel van Schijndel 817e2ace65 * Replace usage of ListNode<C3DObjectInstance> by class CHeightMap by std::list<C3DObjectInstance>
* 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
2007-07-28 20:00:57 +00:00
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
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
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 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 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
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
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
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
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
Giel van Schijndel 80c4492003 * Clean out class declaration of CEdgeBrush
* Turn protected section of CEdgeBrush into a private section
 * Mark all the functions that have their definition in the header as inline

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2204 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-26 11:17:16 +00:00
Giel van Schijndel a027ced426 * Remove THIS_FILE from all files; which basically was an unused wrapper around macro __FILE__
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2203 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-26 11:01:20 +00:00
Giel van Schijndel 79ea5bb199 * Update EditWorld's TODO file
* Add list of files requiring porting from MFC to wxWidgets

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2202 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-26 10:54:32 +00:00
Giel van Schijndel b543a89e13 * #include required header <ostream>
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2201 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-26 10:50:50 +00:00
Giel van Schijndel 20d790a4fa Cleanup:
* Rename class CKeyHandler to KeyHandler (I don't want freaking MFC style classnames being prefixed with 'C')
 * Modify class KeyHandler to use std::bitset instead of an array of bools
 * Use forward declarations for pointers instead of including the entire header

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2200 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-26 10:50:15 +00:00
Giel van Schijndel 6634aa66fa * Remove unused files debug.[ch]
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2199 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-26 09:40:03 +00:00
Giel van Schijndel f10cdeb157 * Make debugprint.c a C++ file instead of C
* Use std::ostream instead of FILE* for debug printing

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2198 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-26 09:36:45 +00:00
Giel van Schijndel 595c4838ac * Use stack allocated objects instead of heap allocated; since they're safer (don't require explicit deallocation), and it's obvious that the only reason why they where heap allocated is probably that whoever wrote that piece of code was addicted to the "operator new"
* Use std::ostream instead of FILE* for PCXHandler::WritePCX
 * Change utility functions EncodeLine and EncodedPut to work with std::ostream instead of FILE* now

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2197 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-26 00:50:32 +00:00
Giel van Schijndel 2fcc6e82c2 * Use std::istream instead of FILE* for PCXHandler::ReadPCX
* Change private member functions of PCXHandler; EncodedGet, EncodeLine and EncodedPut into static, inline, non-member, utility functions (EncodedGet now also works with std::istream)
 * Use std::string for the composition of strings, rather than some char[] buffer and strcpy + strcat

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2196 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-26 00:18:21 +00:00
Giel van Schijndel 06afa3c7a0 * Less violation of encapsulation: use private instead of protected (since we don't need access to these members anyway; plus we don't inherit from these classes ATM)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2190 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-25 14:58:16 +00:00
Giel van Schijndel f54618b6c4 * Remove files gateinterface.* which basically where a C<->C++ interface to the gateway* files (these are now C++ files)
* Move previous interface functions into gateway.cpp

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2187 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-24 18:49:29 +00:00
Giel van Schijndel 5a9cc58788 * Fix yet some more dependencies in header files
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2186 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-24 18:44:18 +00:00
Giel van Schijndel 2e28b1926a * Fix some header dependencies
* Indent class CHeightMap in a more readable manner

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2183 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-24 18:05:32 +00:00
Giel van Schijndel c05b65d532 * Fix compile error by including dependent header (<windows.h>: ugh)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2182 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-24 17:43:48 +00:00
Giel van Schijndel 4c7f823d2f Cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2181 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-24 17:34:28 +00:00
Giel van Schijndel 91b10bd4db * Modify function IsPower2 into a static inline
* Make IsPower2 take advantage of the mathematical properties that a number which is a power of two has (which is that a number which is a power of two minus one has _no_ matching bits with the number that is power of two); this severely decreases the complexity of this function (previous one looped over all bits)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2180 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-24 16:51:17 +00:00
Giel van Schijndel d48c7f67a4 * Make C file gatewaysup.c a C++ file gatewaysup.cpp
* Remove macro MALLOC
 * Use reinterpret_cast for the malloc stuff

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2179 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-24 15:49:19 +00:00
Giel van Schijndel b06b660b6a * Remove all stuff which wasn't compiled when EDITORWORLD is not defined; also remove the macro EDITORWORLD itself
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2178 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-24 15:34:39 +00:00
Giel van Schijndel 9a630f45f5 * Turn C file gateway.c into C++ file gateway.cpp
* Turn linked list macro LIST_REMOVE into inline function list_remove
 * Remove macro MALLOC and use malloc instead (MALLOC was defined as malloc anyway)
 * Replace some UBYTEs with chars

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2177 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-24 15:14:50 +00:00
Giel van Schijndel 763d707f02 * Fix warning about implicit declaration of memset
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2176 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-24 15:08:29 +00:00
Giel van Schijndel 2b00b2e4c1 * Add svn:keywords
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2175 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-24 14:54:31 +00:00
Giel van Schijndel 20a03d68cc * Add GPL header (which apparently I forgot on this file)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2174 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-24 14:53:22 +00:00
Giel van Schijndel 1ec5cc8fb2 * Remove unused parameter `bool Flip` from BMPHandler::WriteBMP (only it's default value "false") was used
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2173 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-24 13:36:18 +00:00
Giel van Schijndel 7873df53f1 * Remove unused member functions from class BMPHandler: ReadBMP, Clear, GetBitmapWidth and GetBitmapHeight
* Remove unused BMP palette code, since obviously we're not using it
 * Remove two other unused parameters from BMPHandler::Create: `void* Bits`, `bool Is555`

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2172 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-24 13:25:33 +00:00
Giel van Schijndel e94d4a1e5a * Forgotten in last commit: removal of parameter from calling function
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2171 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-24 12:56:07 +00:00
Giel van Schijndel 76fe009e44 * Change protected section of class BMPHandler to a private section
* Remove unused parameter PALETTEENTRY* Palette from function BMPHandler::Create
 * Change BMPHandler::GetBitmapWidth's return value to `unsigned int`
 * Use std::vector for an "array" of PALETTENTRYs instead of a plain array
 * Add a type CopyAblePALETTEENTRY which's definition is similar to PALETTEENTRY; with as difference that it has a copy assignment operator (so that we can use this type with std::copy, and other algorithms from the Standard Library)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2170 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-24 12:52:10 +00:00
Giel van Schijndel 3f342f72a9 * Fix spelling error in MSVC project file (got there due to my manual conversion probably)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2168 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-24 12:05:07 +00:00
Giel van Schijndel d3628a0d11 * Don't use (void) as argument list for functions anymore; with C++ this is implicit when using (), a variadic function has to be explicitly declared using (x, y, ...)
* Replace BOOL, TRUE and FALSE with bool, true and false respectively
 * Use the initializer list of the constructor instead of its function body for member variable initialization
 * Replace usage of "operator delete" with "operator delete []" where the respective pointer had its memory allocated using "operator new []" (not doing so may cause heap corruption)
 * Don't if (pointer != NULL) delete pointer; since delete NULL is a valid no-op.
 * declare variables in a more local scope
 * Use algorithms instead of custom implementations; e.g. std::swap rather than { tmp = x; x = y; y = tmp}
 * Use reintrepret_cast<T> at some places instead of a C style cast, since these casts are really bad in this case (i.e. unnecessary), but they're easier to recognize this way

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2165 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-23 14:51:22 +00:00
Giel van Schijndel c8b99f0ae0 * Don't #include <boost/utility.hpp> and inherit from boost::noncopyable;
* Instead declare our copy constructor and copy assignment operator private, also we don't provide an implementation of those

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2137 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-18 22:01:07 +00:00
Dennis Schridde d4feb045d9 PIE-Blender v1.0 by Kage.
Amoung a lot of changes here come:
- Handling of polygons referencing the same vertex more than once.
- Nicer GUI.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2085 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-14 10:22:05 +00:00
Giel van Schijndel 8947c63baf * Ignore another set of MSVC files
* Remove rather useless file d3dwrap.h
 * Remove DLLEXPORT stuff

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2026 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-04 18:53:52 +00:00
Giel van Schijndel 0a8c53b8a8 * Rename class CFileParser to fileParser (I don't want no freakin MFC naming conventions: prefixing all class-names with a captital 'C')
* Don't use pointers to fileParser for functions where references are lots more appropriate
 * Mark some functions private instead of public (they're only used by class CHeightMap's implementation)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2025 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-04 18:31:36 +00:00
Giel van Schijndel eb898d0293 * Fix forward declaration of OpenEditorFile
* Remove useless, and (luckily) unused default constructor from CFileParser
 * Move initialisation of m_Flags to initialization list of constructor
 * Don't use (void) as argument list of destructor (this is bad style in C, but especially so in C++, since C++ implies an empty argument list if you give one)
 * Don't check whether new didn't return NULL, since we're using the throwing variant of new anyway
 * Use istream.read instead of istream.readsome since the former will refill the buffer if necessary (which *is* necessary to be able to read something the first time)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2022 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-04 18:11:02 +00:00
Giel van Schijndel f0d6c4d6b6 * Remove yet some more unused/unreferenced variables to reduce warning spam
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2021 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-03 20:51:41 +00:00
Giel van Schijndel d4d550f700 * Remove some unused variables
* Use C++'s std::ifstream instead of stdio from C at some locations
 * remove unused constructors from CFileParser (FILE* Stream, short Flags), (char* Buffer, long BufferSize, short Flags) and member function Create(char* FileName, short Flags)
 * remove some duplicated code from fileparse.cpp

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2020 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-03 20:44:51 +00:00
Giel van Schijndel 28152bd17f * Add GPL header
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2016 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-03 14:42:34 +00:00
Giel van Schijndel bae4d98dfa * Remove empty file gatewaymapdefs.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2015 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-03 14:38:37 +00:00
Giel van Schijndel 4b642cbdb7 * Rename wrongly named file model.hpp to model.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2014 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-03 14:30:48 +00:00
Giel van Schijndel cd5ada2263 * Use a tab-stop location to line stuff properly out
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2012 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-03 13:27:24 +00:00
Giel van Schijndel f0c12b8ae2 * rename some files to lowercase filenames
* convert M$ Word documents into OpenDocument text documents (OpenOffice.org handles this perfectly) (lets use open standards instead of property formats!)
 * remove WEDIT.DOC which seems to have been a duplicate of MANUAL.DOC or the otherway around, which doesn't matter really

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2011 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-03 13:24:14 +00:00
Giel van Schijndel 49b672aad7 * Remove a whole bunch of other MSVC files which apparently are not necessary
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2010 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-03 12:02:24 +00:00
Giel van Schijndel a1b1ac1f16 * Add tools/editworld/src/Debug to the ignore list since apparently this is MSVC's output directory
* Remove EditWorld.plg since this looks like a compilation report which we don't need in our repository (add it to the ignore list as well)
 * Another MSVC compilation output file to ignore list: EditWorld.ncb

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2009 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-03 11:59:52 +00:00