Cyp
ee1ae86ea7
newnet: Use Z_PARTIAL_FLUSH instead of Z_SYNC_FLUSH to save a few bytes.
...
They do the same thing, except that Z_SYNC_FLUSH adds a bit of useless padding.
2010-07-17 02:01:08 +02:00
Cyp
b704a741bf
newnet: Don't poll sockets, if there is already data ready in the socket decompression state.
...
Should avoid freezing with everyone waiting for players.
2010-07-17 01:00:55 +02:00
Cyp
c1ca4d2d34
newnet: Don't send lots of small packets, fix "connection error"s when listing games.
...
Since there is no advantage in sending data more than once per game tick, queue up data until the game time ticks. This may result in sligtly better compression in some cases, due to not flushing non-stop.
Don't close a socket while data is queued to be sent, since this sometimes breaks listing games (where the list is queued, and the socket is closed).
2010-07-16 21:46:00 +02:00
Cyp
8e93542537
newnet: Don't assume disconnect when no data results from decompressing, unless really disconnected.
2010-07-16 18:02:37 +02:00
Cyp
23cbd537f7
Merge remote branch 'origin/master' into newnet
...
Conflicts:
configure.ac
2010-07-16 18:01:22 +02:00
Guangcong Luo
09d73b0ba5
Apply patch #2003 - Add option for rotating with middle mouse button (LMB+RMB also works). refs #2003
...
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11212 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-16 03:54:27 +02:00
Guangcong Luo
f367bc1d4f
Make text line up better - most text now fits in the text box containing it.
...
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11204 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-14 19:58:33 +02:00
Cyp
cd274fcc3e
newnet: Add mysterious (char *) cast to fix windows build.
2010-07-14 00:36:59 +02:00
Cyp
695a2b35ae
Merge remote branch 'origin/master' into newnet
...
Conflicts:
lib/netplay/netplay.c
2010-07-13 20:50:37 +02:00
Cyp
9b04e261c6
newnet: Use zlib compression on sockets. Should save a few bytes.
2010-07-13 16:15:53 +02:00
Buginator
6239cbaf46
Bump revision number for netcode, since the addition of r11182 (the map) it would fubar if all clients are not the same, and host was using said map.
...
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11185 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-13 11:30:56 +02:00
Buginator
096c257052
Commit these project settings defines to disable extra checking which causes a huge performance hit. (VS2k8 was already committed in r9639, this was forgotten.)
...
_HAS_ITERATOR_DEBUGGING=0
http://msdn.microsoft.com/en-us/library/aa985939(VS.80).aspx
_SECURE_SCL=0
http://msdn.microsoft.com/en-us/library/aa985896(VS.80).aspx
For more info on checked iterators see:
http://msdn.microsoft.com/en-us/library/aa985965(v=VS.80).aspx
and
http://msdn.microsoft.com/en-us/library/aa985982(v=VS.80).aspx
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11184 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-13 11:30:56 +02:00
Cyp
b9a051150b
newnet: Clean up thread-related #defines.
2010-07-12 17:57:35 +02:00
Cyp
4d522c1d06
Merge remote branch 'origin/master' into newnet
...
Conflicts:
lib/gamelib/gtime.h
2010-07-12 08:06:39 +02:00
Christian Ohm
6514240f25
Don't translate language names.
...
Closes #1779 . Patch slightly modified to use language names from the
translations where available, and moved the defines into the .c file, since
they're only used there.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11155 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-11 21:17:36 +02:00
Buginator
208ba52334
Add C++ header guards
...
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11153 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-11 21:17:35 +02:00
Buginator
0dca1b06a1
Prevent overlapping sounds when looking at intel information.
...
fixes ticket:60
2.3:r11147
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11148 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-11 21:17:35 +02:00
Cyp
ef3c1b6d1d
Use sqrtl instead of sqrt, on 32-bit platforms, to work around weird compilers.
...
On some compilers, sqrt() seems to have somehow been taking 64-bit doubles and returning 80-bit doubles, breaking expected rounding behaviour.
2010-07-10 19:25:15 +02:00
Cyp
c28316c5c7
newnet: Don't bother sending synch messages unless actually out of synch.
...
If it ain't broke, don't use up bandwidth trying to fix it.
2010-07-10 18:08:06 +02:00
Cyp
f0beca71cc
Merge remote branch 'origin/master' into newnet
...
Conflicts:
lib/netplay/netlog.c
lib/netplay/netlog.h
lib/netplay/netplay.c
macosx/Warzone.xcodeproj/project.pbxproj
macosx/configs/Warzone-All.xcconfig
macosx/configs/Warzone-Debug.xcconfig
src/multijoin.c
2010-07-10 17:02:39 +02:00
Cyp
a8558300c2
newnet: Remove GAME_GROUPORDER, use GAME_DROIDINFO instead.
...
Since GAME_DROIDINFO groups orders now, anyway. Removes ~200 lines code duplication.
2010-07-10 16:56:09 +02:00
Cyp
d3782834c7
newnet: Move logic in NETuint32_tSmall to the right place.
...
And add NETint32_tSmall, in case needed.
2010-07-10 16:56:09 +02:00
Buginator
1941064f77
Re-enable client packet logging
...
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11108 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 10:38:38 +02:00
dak180
a658e90d16
Get rid of VORBIS_NEEDS_HACK on the theory that less hacks are better.
...
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11102 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-06 07:17:42 +02:00
Cyp
e41848767d
newnet: Check return value of asprintf.
2010-07-05 23:14:41 +02:00
Cyp
f7e1a91761
newnet: Group droid orders, efficiently encode small numbers.
2010-07-05 13:17:36 +02:00
Cyp
3505c31c0e
newnet: Rename multibot.c -> multibot.cpp.
2010-07-02 09:30:59 +02:00
Christian Ohm
03a75906cd
Save screenshots as JPG and PNG.
...
lib/ivis_common/jpeg_encoder.c/h is the JPEG encoder from
http://blog.frankvh.com/2009/06/09/blackfin-fast-jpeg-encoding/ (GPL v2+),
cleaned up to be C only. Refs #23 .
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11086 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-02 08:31:36 +02:00
Christian Ohm
fe7b1960a2
Make the fixed radar unblurred at full zoom steps.
...
Also increase radar zoom range to 0.5-4x. Refs #1923 .
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11085 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-02 08:31:36 +02:00
Freddie Witherden
8634850fba
Remove the duplicated doc-blocks from the dictionary type source.
...
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11078 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-29 07:37:57 +02:00
Christian Ohm
a48d3d2198
Fix Windows cross-builds.
...
That also hasn't SIGTRAP, so use WZ_OS_WIN instead of _MSC_VER to decide if we
use raise(SIGTRAP) or assert().
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11070 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-29 07:37:57 +02:00
Buginator
b4ae06db77
Fix endian issues, byte & packet counts for the logging.
...
Info / modifications by Safety0ff & I
closes ticket:1936
2.3: r11065
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11066 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-28 08:20:53 +02:00
Per Inge Mathisen
d72187515d
Fix two reversed htons/ntohs, from ticket:1937 by Safety0ff
...
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11064 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-28 08:20:52 +02:00
Freddie Witherden
84f0b430f4
Enhance the iniparser code adding support for setting integers.
...
This closes ticket #1948 .
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11060 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-27 21:29:20 +02:00
Safety0ff
204cd2df91
2.3: Handle null return value from sound_CreateOggVorbisDecoder.
...
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11055 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-27 07:49:21 +02:00
Safety0ff
301c6114e7
Trunk: Set tcp_socket to NULL after free'ing it. Fixes #1869 .
...
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11052 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-27 07:49:21 +02:00
Buginator
8bfd8e33e9
Add a new macro, wz_assert() to fix the ASSERT_FAILURE() macro to work again on MSVC compilers.
...
refs ticket:1940
2.3: r11049
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11050 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-27 07:49:21 +02:00
Christian Ohm
3c02124171
In our assert macros, raise(SIGTRAP) instead of assert().
...
Also ignore SIGTRAP, so no crashdump will be generated for it. Makes it
possible to continue after an assert while debugging. Closes #1940 .
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11046 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-26 22:43:34 +02:00
Cyp
0b0e986ec6
Merge remote branch 'origin/master' into newnet
...
Conflicts:
lib/gamelib/gtime.c
lib/netplay/netplay.c
macosx/Warzone.xcodeproj/project.pbxproj
src/multiint.c
src/multisync.c
2010-06-26 22:42:44 +02:00
Per Inge Mathisen
5c654430d4
Final pass closing ticket:1651 remove floating point move precision, turning speed
...
from float to int. Now all that remains is float in contentious code that need to
be rewritten anyway.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11044 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-26 21:35:47 +02:00
dak180
1e236efdb6
Add clang and LLVM to the list of compilers.
...
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11036 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-26 19:50:22 +02:00
dak180
6daf4464de
Make sure that 64bit incompatible code only is used when we are 32bit.
...
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11035 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-26 19:50:22 +02:00
Per Inge Mathisen
13c3a3020b
Use system provided versions of ntohs, ntohl, htons, and htonl, since they actually
...
work for the big-endian to big-endian case, whereas our own home-brewed one did not.
Patch reviewed by SafetyOff and Zarel.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11002 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-22 13:43:31 +02:00
Cyp
b553072b90
Merge fpath improved threading from newnet branch.
2010-06-17 19:04:11 +02:00
Cyp
692957ee70
Merge CRC from newnet branch (was supposed to be in previous commit).
2010-06-17 18:35:37 +02:00
Cyp
48c8d42245
Merge trig+CRC changes from newnet branch (all of lib/framework).
2010-06-17 18:32:54 +02:00
Christian Ohm
fba040f3e8
Initialize video and radar textures to black.
...
Prevents random crap from being blended into the borders and shown for the
first video frame.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10986 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-17 07:52:15 +02:00
Cyp
d7db005f71
Merge remote branch 'origin/master' into newnet
...
Conflicts:
.gitignore
configure.ac
data/base/images/intfac.img
data/base/images/intfac5.png
lib/netplay/makefile.win32
lib/netplay/netlog.c
lib/netplay/netplay.c
lib/netplay/netplay.h
lib/netplay/netplay.vcproj
macosx/Warzone.xcodeproj/project.pbxproj
macosx/configs/Warzone-All.xcconfig
po/POTFILES.in
src/hci.c
src/intfac.h
src/keybind.c
src/multibot.c
src/multiint.c
src/multijoin.c
src/multiplay.c
src/multistruct.c
src/multisync.c
src/scriptai.c
2010-06-15 08:35:52 +02:00
Christian Ohm
f724a129be
Use desktop resolution by default.
...
When no (or an invalid) resolution is set (mainly when there's no config file
yet), use the current desktop resolution instead of 640x480. Refs #1912 .
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10958 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-12 17:39:01 +02:00
Christian Ohm
00cd1a7a47
Use whole screen for backdrops.
...
Cut off some parts instead of showing black borders.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10932 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-08 12:41:34 +02:00