Dennis Schridde
2537bfc61c
Cleanup #includes a bit
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4107 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-16 12:39:08 +00:00
Dennis Schridde
cb2f0a30df
Patch MSVC Solution file to depend on SQLite and change eol-style to native for them, since otherwise patches will not apply.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4044 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-14 18:16:04 +00:00
Giel van Schijndel
33216b2e9d
Move all stuff that actually belongs in CPPFLAGS (but is called CFLAGS) to AM_CPPFLAGS
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3988 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-10 10:50:58 +00:00
Dennis Schridde
d8409c9819
- Don't define CFLAGS anymore, export WZ_CFLAGS instead, which can be overridden by make commandlines
...
- Set -DYY_NO_INPUT only in those places where needed
- Add some previously forgotten CFLAGS where needed
- Remove extranous -lintl from WIN32_LIBS
- Remove apparently unnecessary directory from Mac include (png_util doesn't need it either)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3986 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-10 02:01:46 +00:00
Dennis Schridde
9f44219b1c
Move addition of CFLAGS from configure.ac to the places they are actually needed.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3983 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-09 20:08:42 +00:00
Dennis Schridde
3858daf4a1
Reset MSVC version from 9 to 8, since otherwise MSVC8 will refuse to load the project files. (bug #11219 )
...
Does MS provide some kind of templating system? Like autotools generate Makefiles from Makefile.am.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3950 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-08 11:28:40 +00:00
Dennis Schridde
d3455b699a
Properly set include/library directories for MSVC
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3949 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-08 01:45:45 +00:00
Dennis Schridde
43fb8fd0d9
Add fixme for bug #11095 .
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3877 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-01 01:24:45 +00:00
Giel van Schijndel
f4d10dd461
Reapply r3643 (or revert r3669): Port NETBroadcastPlayerInfo over to the new netcode API
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3799 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-16 13:53:17 +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
c614aabe31
Reorganize the packet definitions to avoid duplication and scatter of data.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3787 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-15 20:55:38 +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
afb59e5e99
Clean up declaration of NETsetupTCPIP
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3771 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-13 17:22:43 +00:00
Giel van Schijndel
21927c7e74
Add a hack to allow receiving and processing of MSG_PLAYER_STATS in the right place
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3765 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-12 18:56:58 +00:00
Giel van Schijndel
84a36281a5
When retrieving games from the lobby abort on failure to prevent an infinite loop
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3762 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-11 21:20:25 +00:00
Giel van Schijndel
81fe501660
Bail out when we fail to receive the game count in the lobby code
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3759 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-11 19:51:24 +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
29153d8fe4
Do not use two separate packet globals. Fixes problems with corrupted network data.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3757 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-11 19:22:42 +00:00
Giel van Schijndel
7493e9ea3f
Replace some magic numbers with HOST_DPID; patch by Buginator
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3756 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-11 18:25:35 +00:00
Per Inge Mathisen
d484e2bc98
Fix infinite loop when joining a game. An encode was supposed to be a decode.
...
Also remove some excess logging calls.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3755 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-11 17:19:12 +00:00
Per Inge Mathisen
917187ca7d
Clean out some excess global defines.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3753 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-11 16:23:20 +00:00
Per Inge Mathisen
907f684f8a
Remove remains of old external launcher program lobby.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3752 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-11 16:00:17 +00:00
Per Inge Mathisen
4cff4f49fe
Dump some dead code.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3750 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-11 11:47:07 +00:00
Per Inge Mathisen
b8ecac8f77
Remove the final remains of the old ugly network code.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3746 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-10 21:03:00 +00:00
Per Inge Mathisen
8a38943349
Remove the code to send and receive whole droids if they are missing. Since we
...
are now using TCP, we should not be missing any droids. See patch #927 for
discussion.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3745 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-10 21:01:57 +00:00
Per Inge Mathisen
160afd4e7a
Remove some unused code from netplay.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3744 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-10 20:08:39 +00:00
Giel van Schijndel
d5e7f01ef6
Change magic number to HOST_DPID and document HOST_DPID; file #3791 from patch #975 by Buginator
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3743 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-10 19:57:47 +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
Giel van Schijndel
65a3ff6a8b
perform endian swapping for MSG_PLAYER_INFO messages;
...
NOTE: reverting r3669 (or re-applying r3643) would be better, though unfortunately it doesn't work...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3729 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-09 18:29:58 +00:00
Giel van Schijndel
6d27eabf88
Revert r3643; this fixes #7
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3669 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 20:19:52 +00:00
Giel van Schijndel
70d7e095f0
When bailing out of packet decoding make sure to call NETend()
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3668 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 17:46:03 +00:00
Giel van Schijndel
208a399d73
Turn an ASSERTion into a debug(LOG_NET, as is not safe to simply assume that a player ID is correct (and as such we cannot just ASSERT on it)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3667 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 16:58:48 +00:00
Giel van Schijndel
4a77f3d8b0
Use NETsendGAMESTRUCT and NETrecvGAMESTRUCT to send & receive GAMESTRUCTs endian safe
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3665 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 16:39:49 +00:00
Giel van Schijndel
730ef63107
Add functions NETsendGAMESTRUCT and NETrecvGAMESTRUCT to deal with sending & receiving of GAMESTRUCTs in an endian safe way
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3664 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 16:39:46 +00:00
Giel van Schijndel
459254f306
Update netlog.c's packetname list for r3661
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3662 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 14:42:02 +00:00
Giel van Schijndel
0c7ade394d
* Remove message type MSG_PLAYER_DATA as it sends/receives void* data chuncks which is __not__ endian safe (not to mention struct padding)
...
* Don't maintain player stats in lib/netplay/netplay.c; instead maintain them in src/multistat.c
* Add a new net message type (NET_PLAYER_STATS) to exchange player stats
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3661 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 14:39:31 +00:00
Giel van Schijndel
4354be1e75
Put the "System Net Messages" in an enum rather than #defining them with custom numbers
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3660 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 14:39:12 +00:00
Giel van Schijndel
32863ae12a
Remove unused net message types and function declarations which have no implementation
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3651 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-02 15:13:34 +00:00
Giel van Schijndel
92bc594493
Remove networking message NET_VERSION (used by (send|recv)VersionCheck); as the functions that used them didn't actually do anything
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3650 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-02 15:04:08 +00:00
Giel van Schijndel
56c5b3bdab
Move MSG_JOIN over to the new netcode API
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3649 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-02 14:45:24 +00:00
Giel van Schijndel
cff2a7b279
Move MSG_PLAYER_LEFT over to the new netcode API
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3648 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-02 14:45:20 +00:00
Giel van Schijndel
9ca2e82364
Move sending & receiving of MSG_PLAYER_JOINED and MSG_ACCEPTED to the new netcode API
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3647 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-02 14:45:17 +00:00
Giel van Schijndel
26844585f8
Move sending & receiving of MSG_GAME_FLAGS over to the new netcode API
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3646 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-02 14:45:13 +00:00
Giel van Schijndel
b76b958bb7
Move sending & receiving of MSG_PLAYER_DATA over to the new netcode API
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3645 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-02 14:45:08 +00:00
Giel van Schijndel
d9c154c970
Rework resize_global_player_data to work with realloc instead of of a combination of malloc and free
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3644 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-02 14:45:04 +00:00
Giel van Schijndel
9926852390
Port NETBroadcastPlayerInfo over to the new netcode API
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3643 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-02 13:04:32 +00:00
Per Inge Mathisen
15a22f8724
Remove unused netplay macros
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3558 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-27 13:45:03 +00:00
Dennis Schridde
31a863a90b
Setup eol-style CRLF for vcproj files
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3473 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-14 20:49:48 +00:00
Dennis Schridde
d7bbab46af
Set eol-style and mime-type for vcproj files
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3471 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-14 19:55:59 +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
Giel van Schijndel
73d329fde8
* Fix a magic number (28) supposedly representing enum value NET_LEAVING (which is 18)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3423 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-09 23:07:36 +00:00
Freddie Witherden
9a312a7991
Commit the second part of patch #913 which removes (the defunct) AUDIOMSG system.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3335 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-04 13:38:19 +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
Giel van Schijndel
c51bd8ae10
* Get rid of a large quantity of unused parameters
...
* Turn some signed integers ("int" or "SDWORD") into unsigned integers where it made more sence (and signed integers caused warnings about comparing signed with unsigned integers)
* At some places cast to an unsigned integer (where the type of the expression is a signed integer but the result of it logically _always_ is an absolute value)
* Remove unused struct-type EVENT_INIT
* Convert use of malloc->memcpy->free to one single realloc call (and now make sure to actually check realloc's return value, which wasn't done with the malloc call)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3037 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-10 23:15:46 +00:00
Dennis Schridde
c64b565f14
Patch #872 by Buginator. Untested by me since in Bugs we trust. ;)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3020 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 19:10:34 +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
Dennis Schridde
9cc0a628c1
Do parts of the proposed changes in "[Warzone-dev] build issues in FreeBSD system" by Yaroslav Kolomiyets from 24.10.2006:
...
- SDL header includes don't use SDL/ anymore (raw Makefiles and MSVC Project adapted).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2863 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-24 11:49:51 +00:00
Giel van Schijndel
aef7af381e
* Make function NETsetupTCPIP const correct
...
* Don't #include <unistd.h> in source:trunk/src/clparse.c as we don't need it
* Rename a debug message to use the correct function name as prefix (bitimage.c)
* Utilize snprintf instead of sprintf, at two locations
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2796 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-11 17:08:41 +00:00
Per Inge Mathisen
fe27053bf7
Fix bug in last commit
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2664 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-29 19:51:02 +00:00
Per Inge Mathisen
ec0836efdc
Fix type punning warning where we cast an array as a struct pointer in netplay.c
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2663 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-29 19:49:39 +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
f5602b4778
* Replace a large amount of strncpy() calls with the safer strlcpy()
...
* Fix an error in src/game.c where we would use the wrong size as parameter to strlcpy()
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2640 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-27 16:18:52 +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
Giel van Schijndel
e06c186bd6
* Replace a _lot_ of strcpy(), strcat() and sprintf() calls with the safer strncpy(), strncat() and snprintf() respectively
...
* Refactor NETlogEntry() to use the array of strings (packetname[]) instead of a large switch-statement with a lot of copy & pasted code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2617 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-24 21:11:29 +00:00
Dennis Schridde
c7b00fadaf
More work on the ICC front:
...
- Less strict warnings in debug-mode (still unusable, because ICC warns about _a lot_)
- Explicit conversions
- Clarify parameter evaluation order
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2550 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-15 18:09:18 +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
898b9c5d72
Move a lot of code around for cleanup.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2192 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-25 15:31:27 +00:00
Per Inge Mathisen
c6190a85f2
More cleanup. More debug log message. Send player ID as a single char instead
...
of the old pointer casting with alignment issues.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2189 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-24 19:33:46 +00:00
Per Inge Mathisen
0cb6023b76
Clean up source and add comments to explain what is going on.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2188 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-24 18:59:57 +00:00
Per Inge Mathisen
5d0a52460d
Remove NETsetMessageSize
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2185 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-24 18:25:33 +00:00
Per Inge Mathisen
1df2199ce8
Remove final pieces of encryption code. Warning: This touches some seriously
...
unstable code. Bugs may follow!
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2184 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-24 18:22:04 +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
Per Inge Mathisen
6a25589a62
Add network statistics logging, to figure out which parts of the code consume
...
the most network bandwidth. Look in in the netplay.log file for this info.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2113 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-15 15:26:23 +00:00
Per Inge Mathisen
e509767d23
Clean out some unused code from netplay.c|h
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2109 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-15 13:48:22 +00:00
Per Inge Mathisen
d3271aa386
Remove now quite useless encryption and anti-cheat code.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1953 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-24 13:38:22 +00:00
Per Inge Mathisen
80026d553c
Tiny cleanup
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1848 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-12 17:16:26 +00:00
Giel van Schijndel
b28d8bbdf6
* Fix array out of bounds access
...
patch by vs2k5
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1845 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-11 01:04:39 +00:00
Giel van Schijndel
dcb2c3350f
* turn some usages of WinAPI types (*WORD) into their native C counterparts (e.g. int, unsigned int, etc.)
...
* make integers unsigned at places where we never, ever use signed values for their values
* move some variables into a more local scope (i.e. the only scope where they're used)
* turn some mixed tab/spaces indentation usage into tabs-only
* remove unused (and commented out) conditional compilation macro USE_DIRECTPLAY_PROTOCOL
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1798 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-03 15:51:56 +00:00
Dennis Schridde
6fa36aa0e9
+ const, - unused
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1795 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-03 13:46:50 +00:00
Giel van Schijndel
856830a0e4
Cleanup:
...
* Remove some forward declarations of deprecated, unused and undefined functions
* Remove some unused functions which only said: "return TRUE;"
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1692 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-23 19:36:21 +00:00
Giel van Schijndel
b22dbc7fe5
* Remove netusers_stub.c. Its only contained function was NETuseNetwork, which granted direct write access to global var NetPlay.bComms. This was camouflaged as a nice function call, so instead we now use it directly as it is: accessing/modifying a global variable.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1690 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-23 18:48:36 +00:00
Giel van Schijndel
6e5038d237
use (u)intX_t types for structs send accross the network (for the size guarantees)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1672 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-20 22:55:12 +00:00
Stefan Huehner
d30dcb1520
2 small fixes in function declarations : () -> (void)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1663 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-20 13:51:53 +00:00
Per Inge Mathisen
fc3d29124d
Weed out some deadwood from the multiplayer code, and fix a warning.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1653 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-17 14:00:15 +00:00
Giel van Schijndel
48f37b22d9
* Fix wrong interpretation of number of games (only the first byte of the 32bit long unsigned integer was used)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1630 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-13 18:52:29 +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
Giel van Schijndel
7b025ea3e1
* Make our lobby protocol code endian safe (response of a "list" command now always is preceded by a 32bit long, unsigned, little endian integer)
...
* Remove parameter `BOOL async` of NETfindGame since it wasn't used
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1628 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-13 17:31:12 +00:00
Giel van Schijndel
70c07901ae
* Remove unused spectator functions: NETspectate and NETisSpectator
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1626 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-13 11:36:46 +00:00
Giel van Schijndel
a2d13bc53c
* remove lib/netplay/netaudio_stub.c (only had empty functions)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1625 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-13 11:33:44 +00:00