Commit Graph

189 Commits (69ad91c56ba7d38d444709f36e7fa48b1225ecfb)

Author SHA1 Message Date
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
Giel van Schijndel 24e16176b8 * Allow larger display bitdepths than 16bit
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2008 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-03 11:54:35 +00:00
Giel van Schijndel 10a0d4be6e * Set mime-types and svn:eol-style on EditWorld's files
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2007 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-03 11:48:40 +00:00
Giel van Schijndel 345b1d6106 * Revive EditWorld from the dead
* Give it a nicely oriented directory structure
 * Rename all files in src/ (I hope I didn't miss any) to lowercase (except for MSVC project files)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2005 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-03 11:06:42 +00:00
Dennis Schridde c86c5aaa94 pie_export.py version 0.2, by kage:
as requested, it now provides a gui for setting the pie version -- you do this indirectly by setting the floating point precision (precision of 0 will create a "PIE 2", while anything else will create a "PIE 5"). note that only points will be given any extra precision at the moment, since i'm not sure how you want to handle texture coords. precision defaults to 0 (old pie format) since, afaik, pie 5 support in the engine is still lacking.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1989 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-29 17:09:03 +00:00
Dennis Schridde b3f62323d4 This time fix it really. Thanks EvilGuru.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1967 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-25 16:29:15 +00:00
Dennis Schridde 1a61e63fc4 Fix a mistake which resulted in infinite loops and horrendously big logfiles. Thanks to Kamaze and EvilGuru.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1966 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-25 16:18:04 +00:00
Giel van Schijndel aa54cee726 * Check hosts that attempt to register a game with the lobby server for reachability on port 9999 (e.g. a NAT/firewall might obstruct this)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1957 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-24 17:43:57 +00:00
Dennis Schridde 3acbbe97a3 Remove the gameData from the list even if we couldn't read the new data.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1956 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-24 16:38:07 +00:00
Dennis Schridde 6a40fa81cf Use allow_reuse_address correctly.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1952 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-23 23:14:05 +00:00
Dennis Schridde 69aefb6909 - Rename lobbyDev to lobbyDbg
- Add debug output to gameserver sanity check
- Set the connection-check timeout to 10s
- Allow reusing of the masterserver address since otherwise lobbyserver restarts don't work immediately


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1951 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-23 23:01:07 +00:00
Dennis Schridde 460fd94d47 - Don't list wrongly configured gameservers (eg. behind a NAT)
- Try to fix len(None) (TypeError: len() of unsized object)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1950 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-23 22:27:14 +00:00
Dennis Schridde d8f52e0caa Remove unnecessary import of __future__ which also does not exist in Windows Blender. Patch by Kage.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1906 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-20 19:06:29 +00:00
Dennis Schridde 0f61260968 PIE importer version 0.2.1 by Kage:
- no longer use glob

Known (and as of yet unfixed) issues are:
- it does not handle filenames safely (tabs and other whitespace in a filename are not handled correctly, though the likelyhood of this problem arising are low)
- it can parse extremely incorrect pie files (points not defined within a level, for example) when perhaps it should just fail gracefully


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1899 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-19 21:51:57 +00:00
Gerard Krol c1afb761f1 PIE import and export scripts. The import script is adapted from Rodzilla. Place these in your ~/.blender/scripts folder and enjoy. Supported:
connectors, team colors (using a second UV layer). Not supported: animations of any kind.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1840 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-08 18:05:16 +00:00
Giel van Schijndel 12f21d0b0c * Replace usage of uint8_t with char for C-strings; while (u)int8_t works perfectly nice for numbers it isn't nice for text (char-array)
* To make sure we still have the guarantee that a char is 8bit I've inserted a static assertion for this (CHAR_BIT == 8)
 * Use exact length types for lobbyserver

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1821 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-05 12:01:59 +00:00
Giel van Schijndel a62d8fce62 * Move iteration interface out of class GameLobby into a new member class: GameLobby::iterator_interface
Previous implementation could hit a deadlock since every single const_iterator class attempted to acquire a scoped_readonlylock on the lobby's mutex. Since the ReadWriteMutex doesn't grant readonlylocks anymore when a writer is pending for a lock this could deadlock if you ever would need two iterators at the same time. Therefore we now only acquire one readonly lock through the iterator_interface class.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1673 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-21 11:27:58 +00:00
Giel van Schijndel f4abaf4efc A run of `astyle --suffix=none --brackets=break --indent-switches --pad=oper --unpad=paren --min-conditional-indent=0 --mode=c --indent-classes --indent-namespaces` on the lobbyserver's codebase with "Artistic Style <http://astyle.sourceforge.net/>".
It seems that "Artistic Style":
 * somehow treats "lock" as a keyword, since it puts spaces behind every instance of "lock", this is not nice.
 * doesn't recognize std::cout and std::cerr iostreams so doesn't properly line out multiline statements with stream operators
 * doesn't indent subclasses correctly (it treats them as if they're one of the keywords "public", "protected", or "private")
 * lines out multiline if-statements on their logical operators rather than their values, example:
> if (bla == bleh
>     && mooh == meeh)
instead of:
> if (bla == bleh
>  && mooh == meeh)

I've corrected all of the above manually before committing.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1669 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-20 18:19:06 +00:00
Giel van Schijndel 685af73e85 * Use htonl and ntohl for conversion to and from network-byte order
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1651 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-15 21:36:55 +00:00
Giel van Schijndel 2a396b563a * Split out lobby code
* GameLobby::gameLock now has a separate file
  * GameLobby::const_iterator now also has a separate file
 * move class RAIICounter to files of its own for ease of reusability
 * remove dummy game (from lobbyprotocol::requestHandler in requesthandler.cpp)
 * Remove commented out code (main.cpp)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1650 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-15 21:31:33 +00:00
Giel van Schijndel 9773356a67 Less PImpl, More Impl
* Add new class lobbyprotocol::requestHandler which deals with protocol specific tasks
 * Move all protocol dependant code from class GameLobby to lobbyprotocol::requestHandler
 * Add some comments to code

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1649 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-15 21:23:30 +00:00
Giel van Schijndel 87d8648c8b * Cleanup of directory structure
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1648 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-15 21:18:41 +00:00
Giel van Schijndel 94044a0e9c * move function printGame to new file game.cpp
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1647 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-15 21:13:32 +00:00
Giel van Schijndel 8f66b5246b * set host IP on incoming game
* Modify class TCPServer to take a boost::asio::ip::tcp::endpoint for member-function listen instead of a port number
 * Now use command line arguments for addresses to listen on (on each of those addresses we open port 9998 still)
 * Fix wrongly named include guards (lobby.hpp)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1646 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-15 21:07:46 +00:00
Giel van Schijndel d85d317842 * Add a lobby class
* handles incoming connections from TCPServer (functions properly now)
  * uses an std::list to store GAMESTRUCTs in
  * uses ReadWriteMutex for multithreading synchronisation
  * handles "addg" requests
   * handles game persistence (with specialized "game" locks, which will die along with the connection)
  * handles "list" requests
   * dumps the entire list of current games to the user

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1645 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-15 21:01:02 +00:00
Giel van Schijndel 831dbe0c1d * Add utility class: ReadWriteMutex;
This class allows multiple readers to obtain a lock at the same time. Until a writer attempts to obtain a lock, then attempts by readers to lock will block. Also second writers that attempt to lock will block until the first releases its lock.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1644 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-15 20:57:49 +00:00
Giel van Schijndel aaac0278f5 * Handle the "list" command in a proper way by answering with a dummy game
* Add asynchronous TCP server class: TCPServer
 * Add comparison operators for SESSIONDESC and GAMESTRUCT respectively
 * Add -D_WIN32_WINNT=0x0501 to the compiletime options (needed for Boost::Asio on WinXP, 2k needs -D_WIN32_WINNT=0x0500, GNU/Linux systems define it themselves automatically)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1643 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-15 20:51:29 +00:00
Giel van Schijndel 7a0457e6e0 * Use EOF as connection and as such game termination
* move inclusion of definition of GAMESTRUCT to new header file game.hpp
  * Allow game.hpp including files to be compiled without SDL (useful for crosscompiling), by internally (in game.hpp) declaring GAMESTRUCT as well
 * Stay connected when an "addg" command is received (client needs to disconnect to indicate the game should be removed from the lobbylist)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1642 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-15 20:42:28 +00:00
Giel van Schijndel 771d1efa9e * Add a "pretty"-printing function for printing games to a terminal (through std::cout)
* switch to using IPv4 instead of IPv6 (for testing)
 * Use correct buffersize for retrieval of a command/method (5 bytes/chars right now, ought to be NUL-terminated)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1641 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-15 20:34:26 +00:00
Giel van Schijndel a2f477edcf * Add _premature_ C++ testing lobby server
(one of my first, and probably ugly, versions, going to commit incrementally till the last)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1639 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-15 20:30:22 +00:00
Giel van Schijndel 0a590a79af * Use network byte-order (big-endian) for size of game list as response to "list" command
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1629 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-13 18:19:22 +00:00
Gerard Krol 2055a59020 Fix "ghost" games, and allow for updating the game state when hosting a game without having to disconnect and reconnect.
This will have to be implemented in the game as well.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1581 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-01 21:01:32 +00:00
Dennis Schridde 2674023d77 New masterserver by Gerard and Kamaze
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1514 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-21 14:20:20 +00:00
Giel van Schijndel 0289e2664f Set executable bit, makes running the script a bit easier.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1278 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-21 00:39:11 +00:00
Christian Vest Hansen 521a12a00d * Initial upload of Python+JSON-RPC based lobby/master server.
I don't claim that this code is of outstanding quality >_>
  It was, after all, just written as a proof of concept prototype...



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1274 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-20 19:23:51 +00:00
Dennis Schridde 330fa3b3e5 Remove now unneeded binary blob reader.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1191 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-01 01:34:33 +00:00
Dennis Schridde 8cdad4a810 - Change signalHandler to use POSIX signal safe file functions
- Reorder read_gdmp output
- Added compilation date to gdmp
- Reordered gdmp values: sysInfo now after programVersion/compileDate instead of before, to match read_gdmp display order

Still not implemented: Custom (signal safe) sprintf replacement, so we can output textfiles instead of binary blobs.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1189 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-01 00:15:50 +00:00
Dennis Schridde b0a422c1ea Tool to read .gdmp files created on crashes of the Linux version.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1183 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-26 15:12:20 +00:00
Giel van Schijndel bd15126db0 Added a directory to contain tools for Warzone 2100. (E.g. modelling/texturing stuff, some map editor maybe, etc.)
As per this discussion: http://wz2100.net/forum/index.php?topic=320.0

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1055 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-31 19:58:49 +00:00
No Author d17e78a713 Clear out entire repository for move of codebase from BerliOS to Gna! repository hosting.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@361 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-28 17:09:32 +00:00
Victor Qamly 84ef68c532 Adding some of the tools for this project, that never got added.
WorldEdit : only works on windows platform.  Also needs ORIGINAL libs (inculded) to compile correctly)

PiePlugin (3ds Max -> .pie converter.  Which is used for the .pie formats of 3d models used in game.

BSPIMD - Loads IMD, Generates BSP tree, saves IMD with BSP infomation.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@345 4a71c877-e1ca-e34f-864e-861f7616d084
2005-10-22 21:13:48 +00:00