Commit Graph

39 Commits (90bfae6480cec2e3290fbf299fc2fb264eb5da8d)

Author SHA1 Message Date
Buginator e65f2688e7 Stage two merge.
Add new files for Qt.
Remove old files
Update build system (linux).
Remove SDL.
Remove QuesoGLC.
Remove Fontconfig & other all dependencies it had.  

CC & mingw (windows) & MSVC build systems are *NOT* updated / working yet.

**NOTE** MSVC people check types.h, "bool" != "BOOL" ! "bool" is a byte, "BOOL" is a int.

r8503 - r10787 (from  Qt branch)


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10813 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:44 +02:00
Per Inge Mathisen 924b6c5169 Changing object rotations to use 16 bit unsigned values instead of the current
mix of signed and floating point types. This allows us to use under and over
flow as features instead of failures. There are many conversions using DEG() and
UNDEG() in the code now - these should be read as TODO items for further work.
There is a high chance of bugs being introduced. Patch reviewed by Cyp_.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10067 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:37 +01:00
Per Inge Mathisen 5f7aea25a3 In preparation for newnet branch, turn object positions into int32 values and
introduce the new typedef Position to hold them. Patch reviewed by Cyp_.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10052 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:36 +01:00
Giel van Schijndel 1852caeff9 Get the size of a variable using "sizeof", not using the array size that was used for that variable (as the connection between the two is only obvious in the variable's declaration)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7066 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-18 22:39:51 +02:00
Dennis Schridde aac41748dc Bump copyright
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6617 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 18:01:48 +00:00
Dennis Schridde cbbc58d1e9 Move files which extend a c std library header to a filename of similar name
Extension functions dealing with ...
 * strings are in string_ext.h
 * stdio (namely printf variants) are in stdio_ext.h
 * math are in math_ext.h

These headers are no longer included by frame.h

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6613 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:09 +00:00
Dennis Schridde 9343c485b0 Revert "Some endianness swaping, as found in tags/2.1_beta3. Apparently was forgotten to port back..."
This reverts commit r5335.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5337 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-26 12:57:16 +00:00
Dennis Schridde b524a3f8bd Some endianness swaping, as found in tags/2.1_beta3. Apparently was forgotten to port back...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5335 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-26 12:47:36 +00:00
Per Inge Mathisen 4c73e82896 Fix --selftest check in nettypes.c
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5273 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-19 16:44:38 +00:00
Giel van Schijndel 855ec725d4 Use sstrcpy|sstrcat instead of strlcpy|strlcat for manipulation of statically sized strings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5176 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-25 13:46:49 +00:00
Per Inge Mathisen 3ee8a3ed7f Add beginnings of a game self-test. Start with --selftest command line option.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4433 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-30 14:36:11 +00:00
Dennis Schridde 10f2ccfd56 TRUE->true, FALSE->false (except in scripts)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4311 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 16:51:17 +00:00
Per Inge Mathisen 775637ef95 Fix some -Wextra warnings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4307 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 16:02:11 +00:00
Giel van Schijndel cf6ea01b4a * In NETstring use memcpy to copy the string and guarantee NUL-termination manually
* strlcpy() is unsafe if we cannot trust the source string to be NUL-terminated (as strlcpy does "return strlen(src);")


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4242 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 13:50:54 +00:00
Giel van Schijndel 6cd8e03773 Document NETstring (Doxygen documentation) and use strlcpy instead of memcpy to guarantee NUL-termination
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4241 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 13:48:25 +00:00
Giel van Schijndel fbf0395b7e Also test NETenum in the nettypes unit test
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4240 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 13:35:01 +00:00
Giel van Schijndel 6aa9b6fa35 * Declare static string constants as `static const char string[]` rather than `char* string` (guarantees both constness and that we won't accidentily change the pointer)
* In NETcoder declare string str the same size as original (using sizeof), use sizeof() instead of magic numbers


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4237 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 13:12:58 +00:00
Per Inge Mathisen f1a62097bf Netcode: Make NetDir static, and remove some unnecessary function parameters.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3798 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-16 13:39:23 +00:00
Per Inge Mathisen 0fbcf9399b Fix another NetMsg vs duplicate buffer bug. Also assert corect packet type
when decoding them.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3774 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-13 20:25:12 +00:00
Per Inge Mathisen ffc6d739a1 Improve some net debug log calls.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3758 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-11 19:26:23 +00:00
Per Inge Mathisen 12bcb52e3d Truncate strings and binary data sent over the network if larger than expected.
Patch by Buginator in patch #974 with changes by me.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3733 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-10 11:43:08 +00:00
Per Inge Mathisen f246839359 patch #928 ported map send/rev to new netAPI by Buginator with style fixes by me
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3431 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-11 21:39:41 +00:00
Freddie Witherden daad83d316 Make NETend(); return TRUE when we are finished decoding.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3331 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-04 10:32:59 +00:00
Per Inge Mathisen dc7a84da62 Log droid death and packet source. Beware: This will make net games incompatible
between before and after this commit.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3311 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-02 17:08:29 +00:00
Freddie Witherden 6a338c71ce Use the endian swapping functions provided by SDL.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3201 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-27 19:29:53 +00:00
Giel van Schijndel bc66705498 * In Vector3uw explicitly use uint16_t instead of UWORD
* Add a function NETVector3uw to use for passing Vector3uw objects more conveniently over the network

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3173 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 23:36:02 +00:00
Freddie Witherden e9ae19df7b Fix warning about redefinition of MIN/MAX on OS X (as arpa/inet.h also contains MIN MAX macros)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3081 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-16 18:32:38 +00:00
Freddie Witherden 05fdb3af34 Updated the network primitives functions
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2870 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-25 12:12:03 +00:00
Giel van Schijndel 0374c67a12 * Add a doxygen comment to source:trunk/lib/framework/strlfuncs.h describing macro STR_L_FUNC_TRUNCATION_DETECT
* Replace (the last) strncpy() call in nettyps.c with a strlcpy() call


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2647 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-27 20:20:35 +00:00
Giel van Schijndel 6b4cba1700 * Rename pLevelName to aLevelName (hungarian notation is a pain. Especially when it's wrong!)
* Get rid of several magic numbers
 * Some const correctness
 * Replace a huge amount of strcpy(), strcat(), strncpy() and strncat() calls with a strlcpy() and strlcat() calls respectively


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2635 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-27 14:35:35 +00:00
Dennis Schridde 47dc79ee1e Formating to match EvilGuru's current version. (14)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2463 4a71c877-e1ca-e34f-864e-861f7616d084
2007-09-21 20:43:15 +00:00
Dennis Schridde fbd3a9c394 Use Unix PATH_MAX as default and thus move all "fixes" to Windows.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2425 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-21 12:59:05 +00:00
Giel van Schijndel 94db796167 * Fix a typo in nettypes.c this should fix bug #9791
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2405 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-17 17:54:26 +00:00
Giel van Schijndel 7e3d161574 * Add BOOL NETfloat(float* fp) to nettypes.h so that it can actually be used
* Fix a spelling error in a comment in nettypes.c


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2402 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-17 14:02:17 +00:00
Giel van Schijndel 52bc608d17 * Fix MSVC compilation by assuming all platforms supported by MSVC provide IEEE754 floats
This fixes bug #9791

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2401 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-17 11:37:39 +00:00
Dennis Schridde 8334d13138 Prevent a symbol conflict of our DATADIR with that from /usr/mingw32/mingw/include/objidl.h via lean-and-mean.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2389 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-16 20:12:46 +00:00
Giel van Schijndel 74e64738fa * Add network primitives by Freddie Witherden <EvilGuru>
* Modify them slighly to use get/set functions for the package direction (instead of a global accessable to all files which forward declare it)
 * Add a NETfloat to the set of primitives
 * Modify NETstring to use strnlen1 instead of strnlen which is a GNU extension to the C library (strnlen1 has been copied from gettext 0.16.1 which is GPLv2+)
NB: rerun your buildsystems
NB2: Xcode requires an update

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2358 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-08 18:50:28 +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
Per Inge Mathisen dcfe102699 Fix bug in removal of baba player in campaign if too many human players.
Also add some fallback in case server sends us a bad player number.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2160 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-22 11:12:50 +00:00