Commit Graph

126 Commits (cdda4cda8add8e1f5c9e2fffe2db9b79a96f2e72)

Author SHA1 Message Date
Giel van Schijndel dc391434a3 * Remove text/plain mime-type from editworld.rc
* Add a simple resource file (editworld.rc) for the wxWidgets version of EditWorld containing two icons (aside from the default wxWidgets icons)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3211 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-28 12:17:02 +00:00
Giel van Schijndel 88e0d37c1c * Rename mainfrm.cpp and mainfrm.h to mainframe.cpp and mainframe.h respectively
* Remove mainfrm.cpp and mainfrm.h from the Code::Blocks project file (as mainframe.cpp and mainframe.h where already present)
 * Add mainframe.xrc to the Code::Blocks project file

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3210 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-28 11:47:39 +00:00
Giel van Schijndel 712b4f11d0 * After reporting the bug when loading menus in wxSmith from XRC files to the Code::Blocks devs they've fixed it
* So now convert our MainFrame window to an XRC file
  * This results in less code (as the window is now defined as an XML file rather than a huge amount of window creating code)
  * Also the compile time has now drastically decreased for mainframe.cpp

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3209 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-28 11:26:57 +00:00
Giel van Schijndel 9fd1fde8ec * Add a start for the MainFrame window (and display it when starting the program)
* An implementation of Help->About is already provided :-D (which is probably the easiest thing about the program...)
  * Currently this window is produced through means of code generation since I can work around something that seems to be a bug in wxSmith this way (the "bug" only occurs when defining windows in XML resource files)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3207 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-28 00:08:25 +00:00
Giel van Schijndel c86606c553 * Just upgraded my Code::Blocks installation (to r4751 of it); updating the generated parts of the code...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3204 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-27 23:09:52 +00:00
Giel van Schijndel 4239adc560 * Fix an error where we would execute the wrong application code (wxApp instead of EditWorldApp)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3199 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-27 16:07:31 +00:00
Giel van Schijndel 45125b9fc0 * Add all wxWidgets dialogs to the Code::Blocks project file and let wxSmith manage them
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3197 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-27 15:46:33 +00:00
Giel van Schijndel 6d03d9e4a7 * Don't mark the wxID_OK button as default since that is done by wxWidgets itself already
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3195 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-27 15:37:08 +00:00
Giel van Schijndel c6958c887c * Make sure to add listctrlval.hpp, numtextval.[ch]pp and wxstringconv.hpp to the Code::Blocks project file (for EditWorld) as well
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3192 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-27 14:28:22 +00:00
Giel van Schijndel 5c2ac3b1f2 * Add a "main.cpp" file to contain the main application start code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3190 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-27 01:08:26 +00:00
Giel van Schijndel bc05caa6f6 * Use $(#boost) instead of an absolute path
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3188 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-27 00:52:04 +00:00
Giel van Schijndel 131ee472c4 * Add a Code::Blocks project file to aid in porting of EditWorld
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3187 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-27 00:18:36 +00:00
Giel van Schijndel d584c8f2cb * Don't use #pragma implementation as it causes warnings (not to mention I haven't got a clue what it's supposed to do...)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3186 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-27 00:17:42 +00:00
Giel van Schijndel ff51a264c7 * Rename initiallimitsdlg.[ch]pp to initiallimitsdialog.[ch]pp
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3185 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-26 19:28:53 +00:00
Giel van Schijndel f41d6c52a6 * Clean up the class declaration of CMainFrame
* Make sure to add proper #include guards to every header file

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3184 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-26 19:08:20 +00:00
Giel van Schijndel 8a3b056ac0 * Make sure to include the proper wxWidgets headers (at the proper place, not to interfere with wxSmith)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3183 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-26 18:47:04 +00:00
Giel van Schijndel 4c783140ee * Remove a left over debugging statement which I accidentily committed in r3181
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3182 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-26 18:28:11 +00:00
Giel van Schijndel c7894a8a01 * Make globals g_HomeDirectory and g_WorkDirectory an std::string instead of char[1024]
* Use a function to return the current directory as an std::string (rather than writing it into a buffer that's given along)
 * #define snprintf _snprintf so we can use that as well...
 * Some const correctness

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3181 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-26 18:26:40 +00:00
Giel van Schijndel 8708174859 * Move the declaration of CBTEditApp to the implementation file since I don't want to export it through the header
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3180 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-26 17:13:40 +00:00
Giel van Schijndel 2a4c3e6c12 * Alphabetically sort the project file
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3179 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-26 17:13:26 +00:00
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 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 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
Giel van Schijndel a57b33f800 * Fix a wrong date in the license header (was 1007 instead of 2007...)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2852 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-22 16:34:51 +00:00
Giel van Schijndel 3510671340 * Rename test.bak to test.lnd
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2649 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-27 21:55:40 +00:00
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 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 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