Commit Graph

3008 Commits (ed753ff8c455fa5838799dab46f40120c2debde1)

Author SHA1 Message Date
Christian Ohm e3a123560c Add Korean translation by urgood2.
Closes #2035, #2055.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11394 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-09 09:15:37 +02:00
Christian Ohm fab89b8ab4 Don't crash in socketAccept when given a NULL socket.
Closes #2033.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11405 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-09 09:14:50 +02:00
Christian Ohm 4eb49a39d1 Add Korean translation by urgood2.
Closes #2035, #2055.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11395 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-09 09:14:49 +02:00
Giel van Schijndel 94320034ae Assume that SDL headers are directly in the #include path, instead of assuming the SDL directory is in the #include path.
Closes #1941.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11385 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-05 20:05:02 +02:00
Safety0ff 1fa5ab201d Apply patch from #1944 (vorbis error strings).
Closes #1944.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11384 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-05 20:05:02 +02:00
Safety0ff dec83d8065 Apply patch #1982.
Removes Vector3i_normalise and return int32_t instead of float for Vector3i_Length.
Closes #1982.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11383 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-05 17:48:53 +02:00
Cyp dd47d1f8c2 newnet: Insist harder on detecting and displaying desynchs. 2010-08-02 14:22:10 +02:00
Cyp d5b3621844 Merge branch 'master' into newnet
Conflicts:
	lib/netplay/netplay.c
	src/multiint.c
2010-08-01 21:10:34 +02:00
Cyp 7c8df3a2e8 Merge remote branch 'origin/master' into newnet
Conflicts:
	lib/framework/wzapp_c.h
	src/power.c
	src/power.h
2010-08-01 20:41:45 +02:00
Cyp 82ad8abd8f When a player drops from the joining menu, clients should remove the dropped player, and not decide whether to randomly quit based on whatever was on the stack, either. (Forward-port from 2.3.) 2010-08-01 19:41:07 +02:00
Cyp da7ff2f37f Don't allow inconsistent player positions or colours, even momentarily. (Forward-port from 2.3.)
On swapping places or colours, sends a NET_PLAYER_INFO containing both players, instead of two separate NET_PLAYER_INFOs.
2010-08-01 19:40:12 +02:00
Cyp 466943b783 Don't use floating point calculations in power code. 2010-08-01 18:38:11 +02:00
Cyp 7874dc608c Clean up thread-related #defines. (Backport from newnet.) 2010-08-01 15:23:06 +02:00
Cyp 2e01e81da6 newnet: Show relevant players next to connection status icons. 2010-08-01 13:06:50 +02:00
Cyp b59b089ca5 Merge remote branch 'origin/master' into newnet
Conflicts:
	lib/netplay/nettypes.c
	src/multibot.c
2010-07-30 22:51:33 +02:00
Cyp ea690beab7 newnet: Fix maximum latency calculation, don't return 1 second unconditionally. 2010-07-29 23:30:16 +02:00
Buginator 803b52125e fix / add headers. merge sync: r11298
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11300 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-28 18:59:26 +02:00
Guangcong Luo da445cd536 Make some text alignment fixes that got left out of r11230.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11301 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-28 18:58:33 +02:00
Buginator edb644a03b Fix (and add missing) headers to files.
2009  Warzone Resurrection Project -> 2010  Warzone 2100 Project

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11298 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-28 18:58:33 +02:00
Cyp 1db4f15973 Change do-while to while, since it doesn't make sense to try to read a game structure when there are none in the lobby. 2010-07-22 19:19:53 +02:00
Cyp 1b811abcea Before receiving game list from server, clear old games from list, and don't receive more than there are room for in the array. 2010-07-22 14:45:49 +02:00
Christian Ohm 6cd64549c8 Make sure we use at least 640x480.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11245 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-22 09:35:26 +02:00
Christian Ohm bf3006d31c Make sure we use at least 640x480.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11248 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-22 09:34:22 +02:00
Cyp 1a39299572 Merge remote branch 'origin/master' into newnet
Conflicts:
	macosx/Warzone.xcodeproj/project.pbxproj
2010-07-20 23:07:26 +02:00
Cyp e246e6006e newnet: Save a few more bytes. 2010-07-20 15:40:07 +02:00
Cyp f5fe36414a newnet: Save a few bytes. 2010-07-19 18:42:19 +02:00
Guangcong Luo 2dcb53d326 Fix bug #1994 and apply patch #1998 - Change Mac OS X to use DejaVu Sans like in Windows/Linux, which fixes problems with text alignment. refs #1994, closes #1998
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11230 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-19 10:58:59 +02:00
Cyp 6a36cdd6ec newnet: Use MAX instead of MIN when computing required latency, since the host will vote half of everyone else.
Not sure what to do in the case that a computer is too slow.
2010-07-17 23:42:39 +02:00
Cyp 212115faed newnet: Delay writing NET_SHARE_GAME_QUEUE until flush. 2010-07-17 11:49:55 +02:00
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 79b033eab1 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/branches/qt-trunk@11154 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-11 21:17:51 +02:00
Buginator ad55de1e7e Prevent overlapping sounds when looking at intel information.
fixes ticket:60

2.3: r11147
trunk: r11148

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11149 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-11 21:17:51 +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
dak180 677554af85 Get rid of VORBIS_NEEDS_HACK on the theory that less hacks are better.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11143 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-11 08:10:25 +02:00
Buginator c135a3fd1a Backport r11070
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().

*NOTE* this does not mean CC builds work!  This is just keeping files in sync, for when the CC does work.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11140 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-11 08:10:24 +02:00
Buginator 75b4c5b5f9 Save settings when exiting Qt.
Closes #1964.

(based on r11126)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11139 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-11 08:10:24 +02:00
Buginator 25d54cfdeb Add a new macro, wz_assert() to fix the ASSERT_FAILURE() macro to work again on MSVC compilers.
refs ticket:1940


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11138 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-11 08:10:24 +02:00
Buginator 25b5c08b5d Re-enable client packet logging
Backport r11108


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11122 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 23:57:44 +02:00
Christian Ohm 4c3a638d21 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/branches/qt-trunk@11083 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:54 +02:00
Christian Ohm 0c80505d54 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/branches/qt-trunk@11082 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:54 +02:00
Christian Ohm 7cfcfc2f82 Remove unused hton16.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11080 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:54 +02:00
Christian Ohm 3d256c8b39 Add include for htons.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11079 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:54 +02:00
Buginator 90bfae6480 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/branches/qt-trunk@11067 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:53 +02:00
Safety0ff 307ab84638 qt-trunk: Handle null return value from sound_CreateOggVorbisDecoder.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11056 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:53 +02:00
Safety0ff 82db22f458 qt-trunk: Set tcp_socket to NULL after free'ing it. Fixes #1869.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11053 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:53 +02:00
Christian Ohm 4b7d25145c 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/branches/qt-trunk@11045 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:53 +02:00
Christian Ohm 8e3ff07969 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/branches/qt-trunk@10985 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:52 +02:00
Christian Ohm 78071fa294 Use whole screen for backdrops.
Cut off some parts instead of showing black borders.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10939 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:52 +02:00
Christian Ohm b1ac31d5fd Always use linear filtering for backdrops.
Makes them filtered again after showing the map preview.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10938 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:52 +02:00
Christian Ohm 87ac6bba6b Show backdrops with correct aspect ratio.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10937 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:52 +02:00
Christian Ohm e8deaceca6 Show videos with correct aspect ratio.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10936 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:52 +02:00
Christian Ohm 0b1cf62050 Put date/time in screenshot file names.
The new format is "wz2100-YYYYMMDD_HHMMSS-mapname[-x]", where the "-x" part is
only added when the file already exists (should only happen when people time
travel or hammer F10). Refs #1890.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10903 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:50 +02:00
Christian Ohm 732c0b70a1 Shut up compiler warnings.
No idea how those variables could ever be used uninitialized, but gcc complains
about it.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10896 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:50 +02:00
Christian Ohm b8e6d46263 Improved map preview.
Removes the need for FBOs, shows the map undistorted, unblurred and as large as
possible. Refs #1873.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10895 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:50 +02:00
Per Inge Mathisen 2823c0f5f9 qt branch: Revert r10874 fixes ticket:1876
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10875 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:49 +02:00
Per Inge Mathisen 3a43d6f378 qt branch: Automatically pick up moc'ed files declared in MOCHEADER for compilation.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10874 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:49 +02:00
Per Inge Mathisen c1bcad22dc qt branch: Remove ugly hacks needed for Qt text drawing that made qt branch slower than trunk.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10869 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:49 +02:00
Per Inge Mathisen 9e29aa5210 qt branch: Bring back quesoglc for text drawing for now. We can then spend some more time
perfecting the Qt-based text drawing without the stress of not being able to merge this branch.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10868 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:49 +02:00
Buginator 3fb8c3605b Fix variable conflicts with MSVC include files.
Make *sure* Qt includes are before wz includes.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10855 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:49 +02:00
Buginator 840c77d13c Fix headers conflicts (for windows + MSVC)
Move gettimeofday() from frame.c to timer.c (for windows)

Make sure we include the platform specific include before the others. (so we can correctly use WZ_OS_XXX and so on...)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10854 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:49 +02:00
Buginator 079b8766a6 Add missing cursors (to prevent crashes), and rearrange them to match what is in intfac.img for easier referencing.
FIX ME:  Some cursors are using the wrong names / not defined ?

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10852 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:49 +02:00
Buginator a272af39bf Fix mac keymap display.
Mac's normally use symbols, and not text, for modifier keys, and Qt doesn't have "text" names for the symbols.
 

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10848 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:49 +02:00
Buginator c238cb89ea remove the temp mac hack r10815
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10846 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:48 +02:00
Buginator 0064e7151b Get rid of scrap.c/h, no longer needed.
Noticed by dak180


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10834 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:47 +02:00
Per Inge Mathisen 0d46316a63 qt branch: Add rudimentary Qt crash handler dialog for non-mac, non-windows builds.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10832 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:47 +02:00
Per Inge Mathisen dddb958e3f qt branch: Fix fatal dialog multiplication due to multiple invokations of paintGL while dialog is open.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10831 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:47 +02:00
Per Inge Mathisen 1a5df98e9f Fix clobbered merging in wzapp_c.h, and add Qt function to throw up a fatal warning dialog.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10830 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:47 +02:00
Buginator 0b2b4f70af Add svn properties for line style.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10829 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:47 +02:00
Buginator e84631aa80 Add another missed file.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10826 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:46 +02:00
Buginator 9094f32914 Update a missing file
Try to fix configure.ac

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10825 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:46 +02:00
Buginator 0cf96267e6 MSVC fixes.
*NOTE* You *must* get the Qt: Framework, or Qt SDK, and set it up correctly!


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10824 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:46 +02:00
Buginator b003b2d669 Apply r10807
"qt branch: Merge in r10381 from trunk to improve state machinery handling in terrain drawing code."


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10823 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:45 +02:00
Buginator 1316841b9f Apply r10806
"qt branch: Fix conflicts between Qt text drawing and our internal state machinery. Menus should work now."


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10820 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:45 +02:00
Buginator 732e212cfb Apply r10805
"qt branch: Remove superfluous pie_SetTranslucencyMode()"


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10819 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:45 +02:00
Buginator 7f5030dcc3 Apply r10804
"qt branch: Move pie_SetRendMode() around. Make pie_SetTranslucencyMode() static."


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10818 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:45 +02:00
Buginator d9b06f4546 Apply r10801
"qt branch: Fix handling of custom textures for backdrops without our internal state machine getting all confused."


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10816 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:44 +02:00
Buginator 10c42fbef0 For macs, make it so ctrl = ctrl and not ctrl = cmd to match other platforms, and to keep keymap sane.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10815 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:44 +02:00
Buginator 60da45798d Fix wzapp.cpp correctly (svn did a double merge on a new file)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10814 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:44 +02:00
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
Buginator a78f262ffa Stage one merge.
Adding __cplusplus header guards that were missing



git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@10811 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 21:10:43 +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
Christian Ohm aebccdcf90 Always use linear filtering for backdrops.
Makes them filtered again after showing the map preview.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10931 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-08 12:41:34 +02:00
Christian Ohm 6c8d3e15ba Show videos with correct aspect ratio.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10926 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-06 09:57:27 +02:00
Christian Ohm 9688b906a7 Show backdrops with correct aspect ratio.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10925 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-06 09:57:26 +02:00
Christian Ohm ae66be67c2 Put date/time in screenshot file names.
The new format is "wz2100-YYYYMMDD_HHMMSS-mapname[-x]", where the "-x" part is
only added when the file already exists (should only happen when people time
travel or hammer F10). Refs #1890.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10900 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-03 22:41:44 +02:00
Christian Ohm a5bb0f1eb0 Shut up compiler warnings.
No idea how those variables could ever be used uninitialized, but gcc complains
about it.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10894 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-03 22:41:44 +02:00
Christian Ohm f2ae61805c Improved map preview.
Removes the need for FBOs, shows the map undistorted, unblurred and as large as
possible. Refs #1873.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10888 4a71c877-e1ca-e34f-864e-861f7616d084
2010-05-31 21:27:35 +02:00
Guangcong Luo edea97a633 Make double-click interval game-speed independent (patch idea by Safety0ff)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10735 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-28 07:52:20 +02:00
Christian Ohm ccd4264005 Enhanced GLee detection.
Since the pkg-config script Debian ships is a custom addition, test for GLee
manually as well.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10731 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-28 07:52:19 +02:00
Guangcong Luo 4282d92b3c Add "SCOUT" and "DISEMBARK" cursors.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10726 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-28 07:52:17 +02:00
Per Inge Mathisen e7c22ecc5c Put miniupnpc and iniparser license files into dist tarball
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10713 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-25 21:24:57 +02:00
Christian Ohm 5f43907ac7 Only use our integrated GLee header when needed.
Fixes building with the integrated GLee removed.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10701 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-24 19:29:21 +02:00
Christian Ohm 13c78bf714 If setting the chosen fullscreen video mode fails, retry in windowed mode.
This should help in cases where the set video mode isn't supported in
fullscreen. Includes a bit of stylistic cleanup in screenInitialize, and
demotes the bpp warning to info instead of error.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10634 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-19 12:52:42 +02:00
Buginator 96bb80b314 Prevent the host from kicking themselves.
Prevent someone trying to kick the host, and kick them instead.

Thanks to effigy for the info
2.3: r10629 /r10630

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10633 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-19 12:52:41 +02:00
Buginator b33a761f9a Only concatenate the mod list to the version string when the client receives the version string from the host.
2.3:r10952

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10593 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-16 14:21:39 +02:00
Buginator 1d47645d07 Don't broadcast to other players about a new player in NET_CreatePlayer(), we will only do NETBroadcastPlayerInfo() when a player has passed all the verification steps.
This fixes ticket:1611

Correctly handle rejection of the verification process as well.

2.3:r10572

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10583 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-15 11:30:07 +02:00
Buginator 71a9f27b40 Clear the IP Ban list when you start to host the game, instead of when you shut down warzone.
Reset numBans back to 0 on list creation.

2.3:r10543

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10582 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-15 11:30:06 +02:00
Buginator 321bcc3505 Add some more netplay logging calls
2.3:r10542

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10581 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-15 11:30:06 +02:00
Buginator dd0ed35548 Add more logging data to our netplay logs.
2.3:r10484

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10579 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-15 11:30:06 +02:00
Buginator 5109e7a86f If ban list isn't created yet, then return false.
2.3:r10481


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10578 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-15 11:30:06 +02:00
Buginator 3cac32c84d Reset file handle to NULL after close.
Fixes ticket:1745

2.3:r10480

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10577 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-15 11:30:06 +02:00
Buginator 05655b6ea5 Add ability to ban IPs when the host kicks a player.
The ban list is *not* permanent, it will reset when host makes a new game.

Information about bans are in your netlog, for future references.

2.3:r10465, r10475, r10477

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10575 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-15 11:30:05 +02:00
Buginator 4ba8e9c34a Rework netlog to give more useful info
Add more counters to keep track of joins / drops / etc.

2.3:r10464

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10574 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-15 11:30:05 +02:00
Christian Ohm 0c808ac2e0 Include/declaration cleanup for src/aiexperience.c/h.
Refs #1647.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10567 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-14 14:53:44 +02:00
Christian Ohm 122bd513dd Fix compilation with configure --disable-sound.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10562 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-13 09:34:37 +02:00
Buginator 1c4c1cc5bd Fix exception handler to obey UAC on windows machines.
It will write the crash report file to CSIDL_PERSONAL (c:\Users\user name\Documents\logs\warzone2100.rpt)

*All* platforms will now always have --debug-file enable as a default. This will write the logs to <configdir>/logs/WZlog*.txt

When a user overrides the configdir, then we will try to use that directory instead of the default as well.

refs ticket:1759

2.3: r10532


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10538 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:41 +02:00
i-nod d3f1d77aed Correctly propagate TCMask settings through PIE levels, so it will works for animated objects too.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10530 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:33 +02:00
Christian Ohm bc82f671f2 Change fixed pipeline messages from warning to info.
No need to scare users more than necessary with warnings when things will work
anyway.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10507 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:32 +02:00
Guangcong Luo aecdd1805a Change most references to "mods" to singular "mod", so people don't think using multiple mods is a good idea.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10498 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:31 +02:00
dak180 ae26739a9a Some more formatting fixes for the debug dialog and make sure that .strings files get their encoding set properly.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10473 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:30 +02:00
Per Inge Mathisen 338bc9e322 Move all hard-coded colours (except map preview ones) into the palette file. Pass a PIELIGHT to widgSetColour() instead of RGB.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10466 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:30 +02:00
Buginator f3aea9cc1e Check if NPOT and texture_cube_map support is available.
Patch by Flank4

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10462 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:30 +02:00
Buginator 901930360b Update Mac dialog text (yet) again.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10461 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:30 +02:00
Buginator 26ff5bd4d7 Update Mac dialog text again.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10460 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:30 +02:00
Buginator bcb9620a4d Fix formatting.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10459 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:30 +02:00
Buginator 974d26025a Use system dialogs for MAC people, thanks to stwf for the original patch!
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10458 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:30 +02:00
Per Inge Mathisen 806268790f Move default form colours into external palette file.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10457 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:29 +02:00
i-nod 64d6949d96 - Remove GL_ARB_shader_objects check as we are using OGL 2.0 shaders.
- Test GLEE boolean instead of static definition in VBO check to get correct results.
- Allow 1.4 + VBO extension combination on Windows. Should help some 1.4 hardware.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10394 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-21 19:47:13 +01:00
i-nod e07812d52a Move debug mapping line a bit down, so it can be displayed simultaneously with level name.
Display FPS counter for debug mode, instead of usual averaged FP5S.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10388 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-21 19:47:11 +01:00
Safety0ff ad27f1b309 Fixed terrain drawing code that was making the iVis state invalid.
- Added multiplicative blending mode.
- Reverted r9629.
Reviewed by i-NoD.
Closes #1692.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10381 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-21 09:30:51 +01:00
i-nod c8e35d7a29 Fix MSVC and MinGW builds. Closes #1694.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10370 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-20 14:04:57 +01:00
Buginator 799e10f17a Dump out levelname as part of the screen shot name now.
2.3: r10365

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10368 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-20 12:49:48 +01:00
i-nod 0b39df6e6f - Use additive blending instead of alpha blending for construction/deconstruction lines (regression from 2.3).
- Use Vector3f instead of superfluous CLIP_VERTEX in pie_TransColouredTriangle().

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10358 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-20 12:49:47 +01:00
Cyp 8573291c68 Merge remote branch 'origin/master' into newnet
Conflicts:
	lib/netplay/Makefile.am
	lib/netplay/netplay.c
	macosx/Warzone.xcodeproj/project.pbxproj
	macosx/configs/Warzone-All.xcconfig
	src/multistat.h
	src/multisync.c
2010-03-17 14:26:32 +01:00
Cyp 50b41a9a64 Squelch control reaches end of non-void function warning. 2010-03-16 23:01:57 +01:00
Cyp acaa934203 Write from a separate thread, to avoid deadlocks were all players are stuck in writeAll. 2010-03-16 21:56:29 +01:00
Cyp 447e5b048a Rename hton functions to make mac happy. (Re: last refactor commit.) 2010-03-16 18:52:23 +01:00
Cyp 9de2f5c0c7 Refactor part of lib/netplay/netplay.c into lib/netplay/netsocket.cpp. 2010-03-16 16:59:49 +01:00
i-nod c1beb1f42b Remove 256 scale value from texture matrix. Closes #1678.
PIE3 format will expect 0.0-1.0 floating points in texture coordinates values.
PIE2 and IMG(GUI textures) formats still using 8-bit integers in texture coordinates values.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10297 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-16 15:47:55 +01:00
Cyp 8c7a25e666 newnet: Don't syncDebug floats directly.
Needed due to different sprintf implentations.
2010-03-14 21:12:25 +01:00
Buginator 66edd6bdb3 Update MSVC project files to compile newnet
Added /arch:sse2


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/newnet@10283 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-14 21:11:15 +01:00
Cyp a0bcd2a865 Merge remote branch 'origin/master' into newnet
Conflicts:
	src/keybind.c
2010-03-14 18:46:40 +01:00
Cyp 239e4e450d newnet: Display icon on desynch or on waiting for players.
Saves having to look at console output to check that the game is in synch.
2010-03-14 13:27:05 +01:00
Buginator 19696a3f16 Cleanup main so we only have 1 atexit() call for our system shutdown routine, instead of hiding multiple shutdown routines using atexit() for each.
Currently, we have 1 atexit for our main shutdown routine, and 1 atexit call for the exception handler.



Fix mem leak for mod list.

Also dump allocator stats for MSVC people

2.3: r10251

refs ticket:1673


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10262 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-14 09:21:16 +01:00
Buginator 584c4f1aee Add new routines for MSVC that allows us to toggle the allocation tracking.
Currently, it is only used in debug builds for strdup().
For release builds, we use _strdup().

This was necessary to prevent reporting of tons of 'memory leaks' caused by strdup(). Mostly caused by all the parsers lack of cleaning up after themselves.

Sample of what it does is shown.  When we don't toggle the allocator, then it is added to the Normal Blocks.  If we do toggle the allocator, then it is added to the CRT Blocks.
0 bytes in 0 Free Blocks means no memory leaks (for this quick loading of a SP mission--we still have LOTS of other leaks!)
I believe you can figure out what the rest of the stats mean.


0 bytes in 0 Free Blocks.
913860 bytes in 1826 Normal Blocks.
18745 bytes in 139 CRT Blocks.
0 bytes in 0 Ignore Blocks.
0 bytes in 0 Client Blocks.
Largest number used: 13564181 bytes.
Total allocations: 283917669 bytes.

2.3: r10250

refs ticket:1673


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10261 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-14 09:21:16 +01:00
Buginator 90326fcbf0 Fix mem leaks concerning screenshots
2.3: r10249

refs ticket:1673

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10255 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-14 09:21:15 +01:00
Buginator a5f56f6791 Add missing #include(s)
*Note*, all our .c / .cpp files really should have these two includes in it.
#include "lib/framework/wzglobal.h"
#include "lib/framework/frame.h"

First one is for platform specific settings, and the second one is for platform specific functions that we use to override.

2.3: r10236


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10254 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-14 09:21:15 +01:00
Cyp 8653631374 src: Undo a warning squelch, seems to be able to cause build errors for some, somehow. 2010-03-13 23:14:47 +01:00
Cyp 329721b1a2 newnet: Fix crash on desynch, when synchronising structures that haven't been built yet. Move desynch logs to logs/. 2010-03-12 11:31:44 +01:00
Cyp 657fc9079c Merge remote branch 'origin/master' into newnet 2010-03-11 17:37:36 +01:00
Cyp 7d23dc8d67 newnet: Adjust latency automatically, instead of hardcoded to 400ms. 2010-03-11 17:26:13 +01:00
Cyp d9a5af62ad Fix building on mac (should really work this time). Maybe fix building on windows, maybe not, no idea if it was the same issue. 2010-03-11 09:42:38 +01:00
Cyp 21fb1a18ed Fix mac warnings, hopefully (effectively reverting my previous changes to tex.h)... 2010-03-10 23:09:27 +01:00
Cyp 6360e80f25 Try to fix new build warnings and a build error on mac. 2010-03-10 22:55:24 +01:00
Cyp 85315eb568 Merge remote branch 'origin/master' into newnet
Conflicts:
	lib/framework/trig.c
	lib/netplay/netplay.c
	src/pointtree.h
2010-03-10 22:16:40 +01:00
Cyp 92199e2a06 Only let host set player position/colour, send new players info about unallocated slots too.
Only letting host set player position/colour probably fixes a race condition occuring if a player changes name while the host moves the player.
Sending new players info about allocated slots fixes some weird cases with inconsistent positions (and missing slots), for example, if moving a player and starting a game, leaving the game (without closing the program), and starting a new game.
2010-03-10 21:08:15 +01:00
Cyp 05575109b5 Try to clean up includes, fix missing extern on declaration of DataHash[]. 2010-03-10 13:31:27 +01:00
i-nod 966cd1676b Fix warnings on MacOS builds that were caused by [10210].
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10211 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-10 08:23:52 +01:00
i-nod dda0f9f77b Enable or disable fog in TCMask shader depending on in-game state. Part of #851. Reviewed by Per.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10210 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-10 08:23:46 +01:00
i-nod 627a6d1860 iViS engine tweaks. Closes #1667.
- Replace glBlend calls with iVis blending wrapper.
- Remove pie_NO_BILINEAR flag and replace it with pie_FORCE_FOG flag.
- Enable fogging for structure baseplate with pie_FORCE_FOG.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10209 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-09 22:05:42 +01:00
Cyp 48533d7037 Merge remote branch 'origin/master' into newnet 2010-03-07 11:00:10 +01:00
Cyp ccb47562d5 newnet: Dump first 5 synch errors to files instead of dumping 1000s of lines per second to console. 2010-03-07 10:56:24 +01:00
i-nod 1756afb3a1 Fix another 2 warnings on MacOS builds that were caused by [10179].
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10184 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-07 08:34:18 +01:00
i-nod 5c64a642a4 Fix warnings on MacOS builds that were caused by [10179].
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10183 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-07 08:34:18 +01:00
i-nod 4ad78bf9b2 TCMask feature: shaders infrastructure and TCMask shader, FF fallback is supported for TCMask. Part of #851.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10179 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-07 08:34:17 +01:00
i-nod 87f8777a63 TCMask support infrastructure: mask loading and colour retrieval routines. Part of #851.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10178 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-07 08:34:17 +01:00
Cyp 7f9f138fa4 Merge branch 'master' into newnet 2010-03-06 23:02:54 +01:00
Cyp afaaf0b6e4 Random minor cleanup. 2010-03-06 23:02:36 +01:00
i-nod 382bfad14b Define PRIu32 conversion macros for MSVC.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10173 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-06 22:59:05 +01:00
Cyp 6e3706aade newnet: Move crcSum function to lib/framework, and use CRCs where appropriate.
Autogenerate trig tables again, but verify the table CRCs.
2010-03-05 20:02:16 +01:00
Cyp 153712cb5e newnet: Clean up warnings, warning free build with -O2. Enable the same warnings for C and C++, where applicable. 2010-03-05 20:01:51 +01:00
Cyp 79f5ef2f7a Merge remote branch 'origin/master' into newnet
Conflicts:
	lib/netplay/netplay.c
	lib/netplay/netplay.h
	lib/netplay/nettypes.c
	lib/netplay/nettypes.h
	src/multibot.c
	src/multistruct.c
	src/multisync.c
	src/order.c
	src/orderdef.h
	src/wavecast.cpp
2010-03-05 16:09:21 +01:00
Cyp 7a1d9ead68 Replace trig usage with iSin/iCos, etc... Replace dirtyHypot with clean iHypot. Replace MIN(MAX()) with clip().
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10155 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-05 14:43:37 +01:00
Cyp b81d6685ce Replace all use of trigSin/trigCos/trigIntSqrt and SIN/COS with the corresponding new i* functions. Remove the old ones.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10154 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-05 14:43:36 +01:00
Cyp ac48bb876c Replace int16_t casts with an angleDelta function, removing the corresponding 'Cast wrapping intended.' comments.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10153 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-05 10:08:10 +01:00
Cyp 9ad1bba74f Try again at squelching the mac warnings.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10131 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:44 +01:00
Cyp 9f1035b605 A tiny bit more cleanup, try to squelch mac warnings in multigifts.c.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10130 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:44 +01:00
Per Inge Mathisen ce9b2a62ff Change fpathCheck() to use world coordinates to save some conversions. Add new macro worldTile() to complement mapTile() to save some typing.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10125 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:43 +01:00
Cyp 48421325ec More cleanup of units and code. Squelch a couple of mac warnings.
16 files changed, 184 insertions(+), 467 deletions(-)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10124 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:43 +01:00
Christian Ohm 3cea69221b Fix warning on Macs.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10117 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:43 +01:00
Christian Ohm 0ec360cff8 Fix an uninitialized variable warning on Macs.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10113 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:43 +01:00
Christian Ohm 8fb31151f0 Include/declaration cleanup for src/aud.c, lib/sound/aud.h.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10095 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:39 +01:00
Christian Ohm d5e35cd779 Include/declaration cleanup for src/wrappers.c/h.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10093 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:39 +01:00
Cyp 5a13a31726 Simplify indirect targetting calculations. Improve the sqrt functions.
Mini-rocket arrays should no longer randomly fire high up into the air when the target is at a lower altitude, instead, the velocity should be reduced. (Looking at the code, it seems it was supposed to be a feature, not a bug.)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10088 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:38 +01:00
Cyp 61efba03b3 Use bigger buffers in registry_load, to avoid stack overflow if a key is longer than 31 bytes.
Probably closes ticket:https://bugs.launchpad.net/ubuntu/+source/warzone2100/+bug/520432

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10086 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:38 +01:00
Cyp 6c811c1ecb More unit changes and cleanup, remove now unused arccos and already unused arcsin tables.
No bugs intentionally fixed.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10083 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:38 +01:00
Christian Ohm 867ff725d2 Add pal_RGBA and pal_Grey functions.
pal_RGBA returns a PIELIGHT from four r, g, b, a values, pal_Grey is an alias
for pal_SetBrightness. Closes #1644.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10078 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:37 +01:00
Christian Ohm ce844cf2d1 Don't compare an uint8_t to -1.
In NETallowJoining, there was a whole block of unreachable code because of
this. Warning reported by dak180, patch reviewed by Per.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10077 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:37 +01:00
Cyp 4dc1b2a681 Fix the game getting completely messed up if anyone changes position or colour, and then someone leaves.
The problem was due to player positions and colours of a slot getting reset when someone leaves, resulting in multiple slots in the same position or with the same colour.
Also, clean up some weird declarations in the wrong place and stuff.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10068 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:37 +01: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
Cyp 80d7cdb475 Add some better trig lookup table functions, and make updateDroidOrientation use them.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10061 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:36 +01:00
Christian Ohm 4af14d9ec0 Only clear buffers on exit if we still have an OpenGL context.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10057 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:36 +01:00
i-nod f875b678ac Fix MSVC 2008 for the GLee changes in r10028.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10053 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:36 +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
Safety0ff 327b684965 Update to r9628: Re-enable face culling after having disabled it for the map preview rather than enabling it each time we draw the 3D scene.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10047 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:35 +01:00
Safety0ff 9da488b14c Update to r9629: Use floats constants instead of ubytes to save on the conversion.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10046 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:35 +01:00
Christian Ohm 3f4eef1b54 Fix makefile.win32 for the GLee changes in r10028.
Thanks to sicanjal for testing.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10041 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:35 +01:00
Christian Ohm 20017e380c glFlush on exit to reset video mode.
Without this, when running the game fullscreen in a smaller resolution, it
would stay that way on exit. Introduced in r9633, though that is in 2.3 as
well, and this problem only occurred in trunk.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10035 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:35 +01:00
Christian Ohm 714d2d1b69 Use the system's version of GLee, if available.
Require at least 5.4, since that's what we have included. If not detected, we
use the integrated copy as before.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10028 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:34 +01:00
Cyp b5153f4661 Merge remote branch 'origin/master' into newnet
Conflicts:
	lib/netplay/netplay.c
2010-02-28 00:27:48 +01:00
Cyp 84275d52b0 newnet: Fix crash due to "forgetting" to pass a parameter to a function. Remove some ridiculous duplication of function declarations instead of including the headers. 2010-02-27 23:20:38 +01:00
Cyp 6f223ae8e7 newnet: Fix crash on kicking, due to writing over constant string with itself in read-only memory. 2010-02-27 22:15:58 +01:00
Cyp 6f4b9f515d newnet: Make DROID_EMBARK and DROID_DISEMBARK synchronised.
Make unloading cyborgs synchronised, but can only unload all at once, not one at a time...
2010-02-26 19:06:24 +01:00
Cyp f4bd5e257a newnet: Remove GAME_VTOL, the VTOLs are happy without it. 2010-02-26 14:18:03 +01:00
Cyp 6d1727949f newnet: Mark GAME_DEMOLISH done, since it had no effect on the game either way. Remove GAME_SECONDARY_ALL, which wasn't useful for anything. 2010-02-26 13:41:54 +01:00
Cyp e2eff7dfc9 newnet: Don't wait for GAME_DROIDDEST or GAME_STRUCTDEST before destroying, since all players will do it at the same time, anyway.
GAME_DROIDDEST and GAME_STRUCTDEST are a bit redundant, now... (Except for debug mode use...)
2010-02-26 13:12:19 +01:00
Cyp 6a25603032 newnet: Fix power desynch on cancelling production. Make GAME_CHECK_POWER send a float, so it can actually recover from a power desynch. 2010-02-25 17:27:09 +01:00
Cyp bfb9250937 newnet: Send CRCs of syncDebug strings, not the strings themselves.
syncDebug should now be useful, even over a slow network.
2010-02-25 14:46:35 +01:00
Buginator 8ec55a5579 Handle socket clean up, then player cleanup, and then re-init the player who left.
Fixes the issue of seeing leave messages with the default AI color names, instead of the person who left name.

(2.3 r10004)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10010 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-25 05:50:39 +01:00
Buginator c402fb2f2a Committed wrong patch for r9992.
When host drops at that point, just close up shop, and set lobby error.

Thanks to Cyp for noticing.

(2.3 r10003)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10009 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-25 05:50:39 +01:00
Cyp 37b0960123 newnet: Reenable production/research starting/stopping, but synchronised. 2010-02-24 20:07:56 +01:00
Cyp f7129d69ad newnet: Remove SendDroidMove call which was causing desynch. Remove entire SendDroidMove and recvDroidMove functions, and GAME_DROIDMOVE, which are all no longer used.
Was possible to actually play one side of a whole Sk-Rush full-bases game, without going out of synch. (The other side was inactive, so it was a short game.)
2010-02-24 15:15:27 +01:00
Cyp 7d129cf4b5 Merge remote branch 'origin/master' into newnet
Conflicts:
	lib/netplay/netplay.c
	src/multiopt.c
2010-02-24 10:21:00 +01:00
Buginator 66d2fb68ec Broadcast NET_HOST_DROPPED on host dropped in NET_fillBUffer()
(2.3 r9992)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10001 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-24 06:50:37 +01:00
Buginator 8a785d511c If we run out of temp sockets, then we should error out, not "fix" the issue by reusing MAX_TMP_SOCKETS -1.
(2.3 r9988)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9998 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-24 06:50:37 +01:00
Buginator 15b25dcdfe Add more LOG_NET debugging love.
No code changes (besides adding debug(LOG_NET...))

Change some LOG_WARNINGS to either LOG_ERROR (since they are) or LOG_INFO (since we should know about this)

(2.3 r9987, r9989)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9997 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-24 06:50:36 +01:00
Buginator a485fa69c6 When we leave, only tell the host that we are leaving, and have the host tell everyone else about the player leaving.
(2.3 r9986)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9996 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-24 06:50:36 +01:00
Buginator e8ff3ec7bf Make sure we mark the socket invalid in the socket set when we are about to close the socket.
This will fix (hopefully) the remaining segfault issues in checkSockets().
(2.3 r9985)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9995 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-24 06:50:36 +01:00
Cyp 073e367e20 newnet: Synchronise production. Breaks the production queue somehow, needs fixing. 2010-02-23 15:04:31 +01:00
Cyp 853d87580b newnet: Fix some selectedPlayer abuse. 2010-02-23 09:13:13 +01:00
Cyp c42c9a276a newnet: Try to synch GAME_RESEARCHSTATUS and GAME_RESEARCH. 2010-02-23 01:18:22 +01:00
Cyp 75dc05226c newnet: Remove some multiplayer hacks to stop droids from updating orders. Fix duplicate player names. 2010-02-23 00:23:12 +01:00
Cyp 7ac7ef1d1f newnet: Print if messages are unhandled. Remove meaningless NET_SCORESUBMIT. 2010-02-22 19:05:38 +01:00
Cyp 8077c761e4 newnet: Make GAME_DROIDDEST synchronised, improve synch recovery. 2010-02-22 14:21:01 +01:00
Cyp af28145369 newnet: Make GAME_DROID synchronised, now possible to build lots of trucks and stuff without going out of synch. 2010-02-22 13:29:28 +01:00
Cyp 8f2e94bb48 Merge remote branch 'origin/master' into newnet
Conflicts:
	lib/netplay/netplay.c
	src/multiint.c
	src/multiopt.c
2010-02-22 10:43:24 +01:00
Giel van Schijndel 1ed72f87ab Don't use EPIPE when it doesn't exist
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9973 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-22 01:00:19 +01:00
Per Inge Mathisen 21bd0ffdc3 Fix assert if socket set not allocated but socket needs to be deleted. Patch reviewed by cybersphinx and Giel.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9968 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-22 00:50:38 +01:00
Per Inge Mathisen 9bbf6a655c Sync up network changes from 2.3
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9964 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-22 00:50:38 +01:00
Giel van Schijndel 2c09022412 NetPlay refactoring:
* Rename addSocket to more descriptive SocketSet_AddSocket
 * Rename delSocket to more descriptive SocketSet_DelSocket

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9952 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-21 21:50:20 +01:00
Giel van Schijndel 401723958c Make backtraces regarding FD_SET related crashes (see #1136) more useful
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9950 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-21 21:50:20 +01:00
Cyp 36a6036b9f newnet: Fix corner case which resulted in updating before all messages had arrived. Make NET_FIREUP start the game before processing more messages (fixes case where one client is running under valgrind, or is just very very slow). 2010-02-21 16:51:20 +01:00
Giel van Schijndel d96986488f Netcode, refactoring: move setting of (SOL_SOCKET, SO_NOSIGPIPE) to a function rather than duplicating code
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9939 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-21 16:50:45 +01:00
Giel van Schijndel 2322e1f03d Use a decently named constant for passing to setsockopt(SOL_SOCKET, SO_REUSEADDR)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9938 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-21 16:50:45 +01:00
Giel van Schijndel 36cd206534 Netcode: slight refactoring, move connection status checking into a separate predicate function: connectionIsOpen
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9937 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-21 16:50:44 +01:00
Buginator d03dbc0a87 If we were in the middle of a file transfer, and we abort out, close filehandle.
If a file exists, but we can't read it (for whatever reason), then leave the game 'nicely', and abort out of game, since it is a fatal error.
(2.3: r9923)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9927 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-21 06:50:54 +01:00
Giel van Schijndel f02cd084d9 Copy paste error, make sure to use the proper file descriptor
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9921 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-21 01:50:21 +01:00
Giel van Schijndel 4aa213a937 Do our very best *not* to receive SIGPIPE:
When possible do:
 * Set socket option SO_NOSIGPIPE
 * Pass MSG_NOSIGNAL to send(2)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9917 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-21 01:00:16 +01:00
Giel van Schijndel d4b0ab8c21 Socket API, writeAll: Detect disconnects *before* we're slapped in the face with SIGPIPE
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9913 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-21 00:50:15 +01:00
Giel van Schijndel cfaaf057f5 Be nice and act according to POSIX spec and check for EWOULDBLOCK as well as EAGAIN
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9912 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-21 00:00:26 +01:00
Giel van Schijndel 74f4f8a1e2 Make sure that we definitly won't allocate memory while in the exception handler
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9905 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-20 20:50:23 +01:00
Giel van Schijndel 4bfa5e928d dumpinfo.cpp:
* Make sure that config.h is #included (for PACKAGE_DISTRIBUTOR)
 * addDumpInfo: don't (explicitly) convert the parameter to std::string
  - std::ostream already takes care of that ''if'' necessary (usually it isn't)
 * addDumpInfo: use a 24 hour clock (%H to strftime instead of %I)
  - more info in the same bytes!
 * sizeof instead of magic numbers

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9904 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-20 20:50:23 +01:00
Cyp 8c5712e6cb newnet: Move checking for NET_ and GAME_ messages from the middle of an update to before deciding whether to update, fixes doing half of an update too soon on some clients. Fix droid synch messages going out of synch.
A few groups of patrolling trucks belonging to different players, and bumping into each other all the time stay in synch for several minutes, at least if not doing unsynchronised actions such as building new trucks (adding a lot of trucks, before ordering any of them to patrol is fine). They seem to get stuck in traffic jams, but at least they are synchronised traffic jams.
2010-02-20 12:19:10 +01:00
Per Inge Mathisen 232a070ce2 Remove unused dead terrain code. From ticket:1616 by i-NoD.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9886 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-20 01:50:15 +01:00
Christian Ohm d6416c34eb Return 0 in the various _lex_destroy int functions.
Original patch by Seismo (WarningC4716(_2).patch).

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9884 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-20 00:50:15 +01:00
Christian Ohm a0f08bff1d Don't return a value in void function.
Patch by Seismo (WarningC4098.patch).

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9879 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-20 00:00:21 +01:00
Giel van Schijndel 60c55e4009 #undefine NOMINMAX before #defining it
Prevents warnings about #redefining previously #defined macros

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9869 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-19 18:00:09 +01:00
Buginator 6850d05a78 When player drops, and we were transferring a map to them, abort the send.
Reported by themac on IRC.

Show the progress of the map being sent, of each player, to the host.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9842 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-17 06:50:19 +01:00
dak180 a3f8200327 Step 1 of X in getting translations working on the mac.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9835 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-16 23:50:09 +01:00
Cyp f978943eb6 newnet: Fix the host mixing up broadcast messages with messsages to the host, by making NetQueue even more message-oriented. Use -Wall -Werror on C++ files too, and fix the corresponding werrors. Don't use gameRand() from scripts, since the scripts are apparently only executed on the host. Add syncDebug() log function, which is only printed, if it would print different things on different clients. 2010-02-16 23:02:27 +01:00
Cyp 75b06b330a newnet: Use deltas to stop GAME_CHECK_DROID from breaking things that aren't already broken. 2010-02-15 20:56:59 +01:00
Cyp 33790b11a2 newnet: Rename all messages that go into game queues from NET_BLAH to GAME_BLAH, remove unused messages, and assert that the right messages go into the right kinds of queues. 2010-02-15 20:56:58 +01:00
Cyp 864b830a44 newnet: Don't wait for dropped players to send NET_GAME_TIME. Add more comments and cleanup. 2010-02-15 20:56:58 +01:00
Cyp 1943e08ba8 newnet: Change popped too much assert to warning, since the queue might have been cleared if a player disconnects. May still wait for NET_GAME_TIME messages from the player that no longer exists. 2010-02-15 20:56:57 +01:00
Cyp d1ba8c087b newnet: Remove extra game queue, added due to misunderstanding. 2010-02-15 20:56:57 +01:00
Cyp e9e30bcb27 newnet: Synch game queues, and play them back at the same rate on all clients. Multiplayer now "works" as it did before, with the advantage that it will be possible to remove the bMultiMessages hacks and implement real multiplayer support.
I even tested that campaign, skirmish, saving and loading still works.
2010-02-15 20:56:57 +01:00
Cyp 7e18c64533 newnet: Change NetQueue into a message queue instead of a byte queue and fix some things. Take into account that NETbeginDecode isn't always matched with NETend, just most of the time.
Apart from each player playing a completely different games, multiplayer seems to work now. The players can chat with each other.
So everything seems normal, just with slightly worse synchronisation; now with literally no synchronisation, instead of just practically no synchronisation.
Newly built trucks are doubled, due to listening to own game messages. Game messages ought to all be implied (and not sent), or sent but not executed until received.
2010-02-15 20:56:57 +01:00
Cyp 8991ed6e76 newnet: Replace use of NETMSG with NetQueue. Breaks multiplayer, which never really worked, anyway. Compiles, links and runs, but freezes in multiplayer. 2010-02-15 20:56:56 +01:00
Cyp a336d6455d newnet: Rename lib/netplay/nettypes.c to lib/netplay/nettypes.cpp. 2010-02-15 20:56:56 +01:00
Cyp 9635b01ef0 newnet: Add NetQueue class. 2010-02-15 20:56:55 +01:00
Cyp e1bfee9a4c make: Better (hopefully) hack to fix broken dependency files.
Probably closes ticket:1590.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9817 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-15 20:51:08 +01:00
Giel van Schijndel 946c9965f2 Replace ''all'' usage of BOOL in lib/framework with bool instead
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9812 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-15 20:51:08 +01:00
Giel van Schijndel b3ea108cce Replace some BOOL usage with bool
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9811 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-15 20:51:07 +01:00
Per Inge Mathisen d254e6a339 Remove duplicate points removal in PIE loader. Closes ticket:1582 Reviewed by Safety0ff
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9793 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-13 23:05:01 +01:00
Buginator c2fc183703 Fix a dangling pointer issue concerning the text input.
patch reviewed by vexed.

fixes ticket:1480
Thanks to the excellent detective work by Ai_Tak !


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9784 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-13 23:04:58 +01:00
Buginator aeaab52615 Add a new directory name 'logs' (in config dir) to store all our netplay logs in.
fixes ticket:1564

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9778 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-11 20:14:35 +01:00
Giel van Schijndel 40208015e4 string_ext.h doesn't actually use frame.h, so don't #include it
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9774 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-11 20:14:35 +01:00
Per Inge Mathisen 9bb288d1f4 Remove erroneous comment
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9745 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:18 +01:00
Cyp 4651724689 Move #includes out of extern "C" blocks, make STATIC_ASSERT work in C++.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9737 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:16 +01:00
Giel van Schijndel 392c08cd3c Use LOG_INFO to report non-existant playlist files (instead of LOG_ERROR)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9732 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:16 +01:00
i-nod cec20aae6a - NSIS changes from 2.3 (#1111).
- Additional fixes to [9642]: remove old-1.10-balance.wz instead of origianl.wz.
- MinGW build system updates.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9727 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:16 +01:00
Buginator 6a083086e2 Frontport r9650
"Add a error message about not being able to (re)allocate a string"

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9706 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:12 +01:00
Buginator a6d88bda6b frontport r9645
"Change netplay.log to netplay-xxx_yyy.log where xxx is the date, and yyy is the time. So people can have a history of all their MP games, and they can upload said file to us.

This log is in the config directory!"


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9705 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:12 +01:00
Buginator dbdbd4f1a3 frontport r9644
"Change / add a few log WARNINGS to INFO instead, to track down why the game thinks that people have left when they haven't, and also fix the bug of not destroying the player who dropped / left feature(s).

fixes ticket:1020"

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9704 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:12 +01:00
Cyp 238d42c0f8 logical: Use separate pseudorandom number generator for game decisions, which should at some point be made to be synchronised between clients.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9670 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:09 +01:00
Cyp abe95f17ff logical: Bump updates per second to 10, since 3 was just for testing.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9668 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:09 +01:00
Cyp 709e9c677d logical: Fix droid legs disappearing during first update interval.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9665 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:08 +01:00
Cyp f6cff80f6b logical: Completely use graphics time for effects.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9663 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:08 +01:00
Cyp 162157ef5a logical: Rename some things. Fix when not updating fast enough.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9659 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:07 +01:00
Cyp 92225b6b18 logical: Make some projectiles animated in-flight.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9656 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:05 +01:00
Cyp a99ef4ba19 logical: Logical updates.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9655 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:05 +01:00
Christian Ohm d6113fa149 Clear buffers on start and exit.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9633 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:03 +01:00
Per Inge Mathisen 4b008a7f67 Fix texture disapparance act in hudless mode. Patch by Safety0ff. Closes ticket:1421
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9629 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:03 +01:00
Per Inge Mathisen d21f071e8c Fix truck texture glitches in trunk by turning on face culling. Patch by Safety0ff. Closes ticket:1503
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9628 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:03 +01:00
Per Inge Mathisen 5799b53f99 Add rendering support for the TRANS_FILTER transparency mode.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9621 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:01 +01:00
Per Inge Mathisen 6f5a49387f Clean up the definitions of the rendering modes.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9620 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:01 +01:00
Per Inge Mathisen b28f8d36e0 Remove client socket from socket set when a client unexpectedly disconnects, and let other
clients know about this event. Patch reviewed by Cyp_.  Closes ticket:1515


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9607 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:59 +01:00
Cyp 4e72da7a2a lib/netplay/netplay.c: Change two more don't-while loops into do-while loops.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9598 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:58 +01:00
Buginator 7266552505 Fix for 64bit compilers.
Reported by atis_home  (thanks!)

closes ticket:1523

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9594 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:58 +01:00
Buginator 46ea38f8d5 Merge r9584/9585
"Add sync counters to more accurately keep track of what is being synced and what isn't.

This information is saved in netplay.log in the config dir."


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9590 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:57 +01:00
Buginator 3a5f7d556b Use #define NOMINMAX to disable the min / max macros in windows.h
instead of r9562
The other option was to use (std::max) as in, you have ( ) around min/max



git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9589 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:57 +01:00
Buginator dc8cb98ad9 Update MSVC project file for release build and fix iniparser DebugInformationFormat.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9588 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:57 +01:00
Cyp c491a4b315 lib/netplay/netplay.c: Change don't-while loop into do-while loop.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9582 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:57 +01:00
Christian Ohm 5b3b144994 Remove a useless macro parameter.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9580 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:57 +01:00
Cyp 8f034fe834 Workaround for Microsoft bugs such as #defining random words such as min and max.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9562 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:55 +01:00
Per Inge Mathisen 8f51743062 Keep bitfields of vision knowledge for faster comparisons. This speeds up map vision updates by almost 15%. (Reviewed by Cyp_.)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9559 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:54 +01:00
Guangcong Luo 9723bbb44b 2.3: Fix bug #1444 - crash upon exit - patch provided by Safety0ff.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9527 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:51 +01:00
Per Inge Mathisen 3a783743a4 In certain corner cases, buildings could end up not being seen by sensors in true fog of war.
This makes sure that all tiles on which we have buildings are properly seen by sensors.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9501 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:47 +01:00
Guangcong Luo dbd9be9a5a 46 warnings from Xcode on the wall, 46 warnings from Xcode... take several down, make a few variables signed and cast some other "%d"s to (int), 6 warnings from Xcode on the wall!
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9493 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:45 +01:00
Christian Ohm 36acdc554b Add Croatian translation by 13KukYNexus666.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9474 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:43 +01:00
Guangcong Luo 255506d4b6 Correctly calculate frameTimeFraction2 - fix bug #482, among many other bugs.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9461 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:41 +01:00
Christian Ohm f4de16db77 Replace deprecated libpng variables.
Refs #1471.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9455 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:40 +01:00
Guangcong Luo 3579209ab4 Fix bug #1466 - release builds shouldn't assert - fixes a ton of "crashes" in Mac OS X and Linux.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9451 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:39 +01:00
Cyp 275e260a89 Fix building with PD-ksh on BSD. Reports and some patches from brad0. (svn -r9444)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9445 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:39 +01:00
Guangcong Luo d187d6fab4 Split bMultiPlayer into bMultiPlayer and bMultiMessages - fixes a ton of bugs relating to the game thinking it's not in multiplayer mode when it is, but has multi messages off.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9407 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:33 +01:00
Cyp b3c57ebb63 net: Set SO_REUSEADDR on sockets to avoid address already in use errors.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9391 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:27 +01:00
Christian Ohm 3ab1a0104d Update Spanish locale names.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9370 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:25 +01:00
Cyp 6ddb1eadb2 cpp: Add extern "C" {} in headers.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9336 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:21 +01:00
Christian Ohm 2b2a187172 Update Windows language table according to MSDN.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9326 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:20 +01:00
Per Inge Mathisen d1ca417ef2 Remove redundant code and improve asserts.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9321 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:19 +01:00
Guangcong Luo 1685f723be Fix two warnings in scrap.c in Mac OS X.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9316 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:18 +01:00
Guangcong Luo af1d9865c0 Add "Laser satellite firing" and "Incoming laser satellite strike" to the list of occasions that deserve a radar blip representing where they're occurring.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9314 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:16 +01:00
Guangcong Luo 3ac9f53bf8 Add support for Cmd/Meta keyboard shortcuts. Make keyboard shortcuts look nicer: "lctrl - f11" to "Ctrl + F11" (Warzone keyboard shortcuts accept both LCtrl and RCtrl)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9306 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:15 +01:00
Guangcong Luo 9568ac7987 Close ticket #1134 - add radar blips for events such as "structure under attack"
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9293 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:13 +01:00
Guangcong Luo 2025407222 Commit mod list patch #1415:
1. Adds a specific autoload folder, `mods/autoload/`. This is essential for a good mod community.
 2. Searches the `mods/` folder for global mods, as well as `mods/global/`. This is the first step in merging the three mod folders together, but I'm not planning on merging them completely in 2.3.
 3. Constructs a list of loaded mods, and displays the list in the VersionString (including the list of games in the lobby).
 4. Grays out games with incompatible mods in the NetPlay game list, and gives a warning in the tooltip: "Your loaded mods are incompatible with this game. (Check mods/autoload/?)"
 5. Gives a warning when a game with an incompatible mod is clicked: "You have an incompatible mod."
 6. Displays a list of mods above the Warzone logo.
 7. Lists mods in hosting screen, and warns hosts that all players need the same mods loaded.

Closes ticket:1415.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9291 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:13 +01:00
Guangcong Luo b5471fc186 Calculate gameTime2 using the correct time offset (fixes strange animations on some nonstandard game speeds).
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9279 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:12 +01:00
Christian Ohm 60c4f603da Use the configured game port instead of hardcoding it.
Also make the port variables static.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9269 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:11 +01:00
Guangcong Luo bf1541a626 Fix typo in gtime.c
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9266 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:11 +01:00
Guangcong Luo 5da6588fb0 Initialize timeOffset correctly.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9258 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:09 +01:00
Guangcong Luo dabc178157 Some hacks to paper over the time travel bug.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9257 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:09 +01:00
Guangcong Luo cf8265e6c8 An assert to figure out why time travel is occurring.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9250 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:08 +01:00
Guangcong Luo 3e47b4ac89 Commit Safety0ff's audio fix.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9249 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:08 +01:00
Per Inge Mathisen 12f9218c67 Fix for compiler warning for uninitialized variable
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9188 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:26:59 +01:00
Per Inge Mathisen 9c6b55f2d6 Remove unused definitions.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9187 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:26:59 +01:00
Guangcong Luo f13676935c Fix an infinite loop in sound_UpdateStreams.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9175 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:37 +01:00
Christian Ohm b0c4e40934 Include files needed for win32 cross-building.
Building from tarball still doesn't work, since nsis wants the gmo files in the
build dir while they are in the source dir.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9146 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:34 +01:00
Per Inge Mathisen baa0ac2188 Purely stylistic changes to make it easier to read this code for mistakes.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9131 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:32 +01:00
Per Inge Mathisen 4f963349cc Fix the order audio samples are removed so that they actually are removed properly.
Patch by jovie1024. This closes ticket:1391


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9106 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:29 +01:00
Per Inge Mathisen 93f1d85e2d Add new debug log category for saving whatever was sent to console.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9102 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:29 +01:00
Guangcong Luo 357de2a6cb Apply patch #1330 provided by Cyp - Add unicode support to text boxes and game-chat
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9101 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:29 +01:00
Guangcong Luo 64e2425cf0 Update trunk VersionString.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9088 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:28 +01:00
Christian Ohm e0a74027e5 Change ASSERT to ASSERT_OR_RETURN in delSocket.
Closes #1368.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9068 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:25 +01:00
Guangcong Luo 0b4c58bd0b Commit patch #1375 - don't allow players to ignore kicks, add a kick button to the MP game setup screen, prevent spoofing a message from a different source, don't show "player left" message unless a player actually left.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9065 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:25 +01:00
Christian Ohm 4379fdcbd0 Fix possible segfault in miniupnp.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9041 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:22 +01:00
Christian Ohm cd577664ca Add Ukrainian translation.
Closes #947.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9039 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:22 +01:00
Christian Ohm b6fe392071 Add -Wdeclaration-after-statement to the default warnings.
Should help prevent breaking the build for people who have to use crappy
compilers. Exclude lib/exceptionhandler, that contains C99 non-Windows code in
places.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9035 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:10 +01:00
Guangcong Luo a815eaa82c Fix bug #1339 - trunk and 2.3-branch shouldn't be able to play with each other.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9017 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:09 +01:00
Christian Ohm c31d7e502f Do UPnP detection on "host game", not during startup.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9011 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:08 +01:00
Christian Ohm 069ab3cdbc Only forward port 2100, 9990 is not needed.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9010 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:08 +01:00
Christian Ohm 254f657427 Really fix #1338 (crash when joining IP).
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8997 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:08 +01:00
Christian Ohm 0e8107e3a1 Fix grammar, typos, don't translate kickPlayer messages.
Those are only shown in the log anyway, the in-game messages are still
translated.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8993 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:06 +01:00
Guangcong Luo 36c85d7c78 Fix bug #709 - lobby server doesn't update player count when player leaves a game.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8989 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:05 +01:00
Christian Ohm 9b554a2d6e Reject differing game versions, not the same.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8981 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:05 +01:00
Christian Ohm 92f53f68ff Shorten autokick message when version differs.
Was too long to be displayed completely.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8979 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:05 +01:00
Guangcong Luo d193b397fc Meant to commit these files in r8971.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8973 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:03 +01:00
Guangcong Luo 5bb3fc6132 Compare netcode versions rather than version strings - allows updating version strings while retaining netcode compatibility. Bump netcode version to 2.31.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8971 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:03 +01:00
Guangcong Luo e42645e66b Revert r8964 - apparently increasing the maximum number of games visible in the lobby breaks savegame compatibility.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8968 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:03 +01:00
Guangcong Luo be47ec5bfa Increase max game limit from 12 to 18 - now supported by new larger lobby!
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8964 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:04:02 +01:00
Christian Ohm 3637a83e38 Remove stray parenthesis.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8945 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:03:59 +01:00
Guangcong Luo e372d3d44e Fix bug #1311 - typos in netplay.c
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8939 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:03:59 +01:00
Guangcong Luo f2e9a412ac I've discovered why the netcode is so unstable. Everthing just assumes it'll be successful. At one point, there's an infinite loop waiting for an accept message. No possibility of receiving a rejection message, no timeout, nothing. At another point, the host just overwrites an existing player, if the game is full. I've fixed most of the ones I came into contact with, but there are probably many more left.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8938 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:03:58 +01:00
Guangcong Luo 9b0381b14b Remove the two Warzone logo backdrops - they're really unprofessional and tacky, especially when there's already a Warzone logo at the top of the screen.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8933 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:03:57 +01:00
Guangcong Luo c10417b595 Disable some fields that should be disabled but weren't, in the multiplayer game join interface.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8929 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:03:56 +01:00
Per Inge Mathisen f2cf35f791 Enumerating devices apparently crashes PulseAudio on Fedora12, so try to do this in a more
limited way and hope that either this fixes the problem, or someone fixes the issue upstream
meanwhile. This was fixed in a different way in 2.3 branch due to different sound init code.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8861 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:27:02 +01:00
Guangcong Luo 1526b124d2 Fix a crash caused by typo in trunk netcode in r7288.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8850 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:27:02 +01:00
Guangcong Luo bbba6f6ff8 Only delSocket if it actually exists (fix assert).
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8794 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:52 +01:00
Giel van Schijndel 34b50b4219 Fix the doxygen documentation for `addSocket` and `delSocket`
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8792 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:52 +01:00
Giel van Schijndel 64d8e39b38 Check for socket errors and handle them:
* Close a socket when an error occurs on it
 * Store the return values of send() and recv() in `ssize_t` instead of `int`
  - Prevents truncation of values as ssize_t is the return type specified by POSIX to use

This should prevent us from ever getting hit with SIGPIPE again.

SIGPIPE is transmitted when we try to write to a connection we've previously been told has closed.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8772 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:50 +01:00
Giel van Schijndel 46aa89779e Be more resiliant in the case of dangling pointers to a Socket
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8769 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:50 +01:00
Buginator f5b417e7d0 Remove unneeded abort that was already removed in 2.3
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8754 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:49 +01:00
Buginator 1fc98725c8 frontport r7797
"In inputLooseFocus(), we clear the keyboard/mouse to the init state (KEY_UP).

fixes ticket:515 "

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8750 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:48 +01:00
Buginator 5b2eabf0b5 Fix bad indentation on a merge that went astray
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8749 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:48 +01:00
Buginator 79037573f0 frontport r8717
"Add new flag to keep track of when Host is alive.

Add a popup window notification for when the Host drops, and also notify the host when *they* quit, that the game will be over for everyone else (because of the network model)

Fix heap corruption when the host's connection was severed in the NET_fillBuffer() function.

Fix a socket error when we tried to write to a NULL socket.

Note: added two strings that need translating"


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8743 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:47 +01:00
Buginator 38528c7524 fix typo (r8709)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8738 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:46 +01:00
Buginator 15413718c8 frontport r8672
"Update packet names for new packet types in log.


refs ticket:1185"


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8737 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:46 +01:00
Buginator d26716553b frontport r8671
"Reset flags for new people joining."

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8736 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:46 +01:00
Buginator 38f66c5f9e frontport r8667
"Rewrite the stupid file transfer routines.
* It will now only send the file to the person that needs it.

* Adds abort code to the file routines as well, and also tries to detect when the Host is using a malformed filename to host a map.

* Make sure user can't hit the 'ready' button when the map transfer is ongoing.

* Get rid of the silly delays (Much faster transfers)

NOTE: we are still capped by fps. 
fixes ticket:1128
fixes ticket:1127
refs ticket:215 (still can't transfer 'map packs')"

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8734 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:45 +01:00
Buginator 5a2509a26d frontport r8651
"Add config variable 'UPnP' to enable/disable UPnP detection / routines.  1=on, 0=off, default is ON.
"

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8732 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:45 +01:00
Buginator 098a1ea117 frontport r8650
"To prevent some confusion rename 'game' structure in netplay.c to gamestruct.

'game' is used as MULTIPLAYERGAME structure everywhere else, and it used GAMESTRUCT in netplay.c"


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8731 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:45 +01:00
Guangcong Luo ad7e87792d Use 32x32 cursors if unknown cursor type given.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8723 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:44 +01:00
Guangcong Luo bcef102074 Add small font for textdraw routines.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8720 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:44 +01:00
Christian Ohm 55f12a5d52 Hurd build fixes.
Closes #969.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8706 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:44 +01:00
Per Inge Mathisen e73697495e Forward port r8652 and r8626 (savegame fixing and breaking) from 2.3
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8696 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:42 +01:00
Christian Ohm cd36584441 Don't access UPnP device info after freeing it.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8676 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:41 +01:00
Per Inge Mathisen 5e16640ba3 Build fixes for netplay.c on OpenBSD, closes ticket:1180
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8675 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:41 +01:00
Giel van Schijndel fbec26f8e1 Improve compile time code checking:
* Use a version of STATIC_ASSERT that can be used as part of expressions
  - Taken from the Linux kernel (<linux/kernel.h>)
 * Add macro WZ_ASSERT_ARRAY which (statically) asserts that the given variable is an array
  - the given array needs to have a compile-time defined size
  - pointers will fail this assertion
 * Verify that the expression given to ARRAY_SIZE is truly an array
  - verify this using WZ_ASSERT_ARRAY_EXPR
 * Catch & fix two coding errors resulting from wrong use of some macros
  - macros: sstrcpy and ARRAY_SIZE

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8654 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:54 +01:00
Christian Ohm d808f72d8e Don't add UPnP redirects in single player skirmish.
Closes #1174.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8647 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:53 +01:00
Christian Ohm cd3ce412a3 Fix typos, reported by Paul Wise.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8646 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:53 +01:00
Guangcong Luo 9dc3cac6d6 [Having problems committing, so I'm seeing if I can commit this one file at a time] Continue fixing bug #1170: compile warning.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8643 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:53 +01:00
Guangcong Luo f6992d5719 sendTextMessage improvements - uses the position numbers again, and sends "(private to Player) message" instead of "0message". Also adds a shortcut for alliance chat: Use ".message" to send "(allies) message" to allies only.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8639 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:53 +01:00
Buginator b99b245e7f Turns out that we can't use GLee.h for all our openGL header needs, since GLee.h defines Status, and we also use that, so until we fix that either in GLee.h or our codebase, going to revert r8615/r8616
FIXME! (to be done later)

closes ticket:153

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8618 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:51 +01:00
Buginator c6747b1606 Don't use SDL_opengl.h, instead, use GLee.h to handle all our openGL needs.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8617 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:51 +01:00
Buginator 3665f20498 Use the correct header file when using openGL, instead of the more complex #if/else/endif block.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8616 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:51 +01:00
Guangcong Luo d91693afb2 Hardware-accelerated cursors work correctly in Mac OS X now.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8610 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:49 +01:00
Guangcong Luo 6519ce48e9 Use GLuint correctly (fixes build errors and warnings caused by other fixes).
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8608 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:49 +01:00
Buginator 9445f60753 Actually use GLuint instead of pretending to be GLuint.
patch by stiv.
Closes ticket:1148

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8604 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:48 +01:00
Guangcong Luo aabbca68d8 Move map download progress to players list, so you can still chat while it happens. Also update players list instantly, instead of every 2 seconds (except slider changes, which are updated every 0.5 seconds). Also fix taken position detection (fixes bug #1137).
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8602 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:48 +01:00
Guangcong Luo 8edc0bd26a Allow AI difficulty slider to be dragged for longer than 2 seconds.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8600 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:48 +01:00
Guangcong Luo c6e474a482 Revert r8584/r8585 since they're causing too many problems in Linux for me to deal with right now. Fixes bugs #1121 and #1123.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8590 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:47 +01:00
Guangcong Luo fa4f0798ba Fix a bug where a long was dereferenced from an int pointer.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8584 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:46 +01:00
Christian Ohm 5a5e5d6510 Threaded UPnP device detection.
Increases the timeout to 2 seconds. Closes #1073.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8564 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:45 +01:00
Buginator e8d4d378a8 Add UPnP detection results to the Crash dump.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8557 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:45 +01:00
Buginator 25b9dc9ba6 Add more documentation about the Map issues and note in logs about map transfers (if exists / file size mismatch)
(r8548/r8549)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8555 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:45 +01:00
Buginator a1ec0bd358 Clarify variables by prefix of _64 for 64bit and _32 for 32bit...
(r8546)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8553 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:44 +01:00
Buginator 8018d99190 Add new message of NET_HOST_DROPPED to deal with when host quits game, we should quit as well (lobby)
Add more debug lines when we drop/leave players
(r8538)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8550 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:44 +01:00
Buginator b307503d56 Slightly rework when we should and shouldn't chop strings based on if the tech level is present or not.
Also add more debug lines to see if this issue crops up again.

Fixes ticket:1104
(r8533)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8534 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-28 19:34:15 +01:00
Buginator f76f352bd0 Add error checking to socketClose()
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8532 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-28 19:34:15 +01:00
Buginator 49f164b23f Fix a out-of-order list
(r8516)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8530 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-28 19:34:15 +01:00
Buginator 0d2a13a119 Fix a strange issue on some laptops, that have mapped their numpad enter key to the normal "return/enter" key.
Either key can now be used to submit the text your typing.

This fixes ticket:1055
NOTE: We *still need* unicode support!
(Multibyte support, and we should NOT use char, we need to switch to wchar_t)

(r8425)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8527 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-28 19:34:14 +01:00
Buginator cc76454b69 Fix the missing header file for the setPlayerColour() function.
(r8411)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8525 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-28 19:34:14 +01:00
Buginator a72cb7295a Transmit and set local color array. Fixes picking of team color bug.
Transmit player map position & handle picking of players correctly. fixes ticket:1075

Enable/disable AIs on maps. fixes ticket:1065

(r8410)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8524 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-28 19:34:14 +01:00
Buginator 06e0716a14 *Change* MaxMsgSize is now 16K
*Change* MAX_BYTESPERSEC is now 14K (was hitting limit in 4p games old limit was 6K)
*Change* relax timings of ping & scoreboard to alleviate the bandwidth strain a bit
(r8381)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8520 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-28 19:34:13 +01:00
Buginator d6e70a3c00 Filter out non-ASCII in our debug line
(r8380)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8519 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-28 19:34:13 +01:00
Buginator d6261ced17 Add new debug flag "input" to be used for input (keyboard/ mouse) issues.
Add allot more debugging for the input routine(s) to help find keymap issues.
*Change* Add a user friendly (numpad) clarification to the keymap editor, and also color it yellow.
*Change* Rename "Multiplayer Options" to "Multiplayer Options / Alliance dialog" to clarify what this is used for.

(r8376)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8518 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-28 19:34:13 +01:00
Per Inge Mathisen 5e7c746001 Remove obsolete references to SDL_net, which is now long gone.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8509 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-28 19:34:12 +01:00
Guangcong Luo 193c8d142b Fix a segfault from a null pointer dereference in netplay.c upnp_init(). (Fixes bug #1099)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8497 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-23 18:13:26 +01:00
Guangcong Luo ae16bb2aa0 Make Warzone compile and run successfully on Mac OS X again.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8482 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:20:06 +01:00
Per Inge Mathisen 014a3b484e Pipe all PIE files through the simplipie tool to remove unused flags, and turn instances of
the no cull flag into duplicated, inverted polygons. Remove support for the no cull flag from
the source. HOPEFULLY this does not introduce any visual defects. I did not see any. If you 
see any, let me know. This is in preparation for improved object rendering.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8471 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:20:04 +01:00
i-nod c5e16d59ce libminiupnpc has been integrated into MinGW build process.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8470 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:20:03 +01:00
Christian Ohm a7ae06572d Integrate miniupnpc.
This should bring it up to about the state of the patches and comments in
ticket #1073, without the threaded device detection. Timeout is 500ms, that
should be enough to detect a LAN device, and doesn't delay startup too much.

Port r8447 plus the fixes for it in r8449, r8453, r8455 and r8456 to trunk.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8460 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:20:02 +01:00
Christian Ohm 03607b0fb8 Rename miniupnp Makefile to prepare for automake.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8459 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:20:02 +01:00
Christian Ohm 1f1a95e85e Include MiniUPnPc.
lib/netplay/miniupnpc now contains a completely unmodified copy of
miniupnpc-1.4.tar.gz from http://miniupnp.free.fr/, integration with Warzone
will follow.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8458 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:20:02 +01:00
Per Inge Mathisen c6db8bfcd7 Put all palette info into an external file that can be modified by modders. It is quite sensitive
to changes in the number of lines. The colours are in the (from CSS) familiar R,G,B,A hex format. 
Closes ticket:1062


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8435 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:19:59 +01:00