Commit Graph

7869 Commits (e5a619411ea7a155c99101713b1312b15c1ae021)

Author SHA1 Message Date
Christian Ohm 11fa3d73fc Save settings when receiving an SDL_QUIT event.
Closes #1964.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11126 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 23:57:34 +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
dak180 d2994ad998 astar.c --> astar.cpp
Add jpeg_encoder.(c|h)

Remove -mfpmath=sse and -mno-fused-madd since floats are going to be ripped out and so clang can be used

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/newnet@11119 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 18:04:28 +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 03f537c060 newnet: Group build orders when sending, too.
Build orders weren't grouped, due to different structIds. But there can't be many different structures built on the same tile, anyway, so should use the same structId.
2010-07-10 16:56:09 +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
Cyp b96f6c2b6e Reuse pathfinding data when multiple droids want to go to the same place. 2010-07-10 11:13:01 +02:00
Buginator 6137e01960 Apply patch #1971 - Remove "Sk-" and "-T1" from map names in map chooser.
Committed, as requested by Zarel

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11113 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 10:38:39 +02:00
Buginator 8e02c3d3ea When player disconnects / drops, handle the message, instead of the clients ignoring it.
Fixes ticket:1020


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11109 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 10:38:38 +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
Buginator 76834a7040 Update MSVC project file for the astar.cpp change.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11107 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 10:38:38 +02:00
dak180 cd7550c0aa Make the Autorevision script a bit smarter.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11106 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-10 10:38:37 +02:00
dak180 d4996a8b7d Switch to gcc4.2 so -mfpmath=sse and -mno-fused-madd actually do something.
Clean up a Build Rule for bison.

Make the autorevision script smarter.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/newnet@11105 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-07 07:47:33 +02:00
dak180 9467cbd5a4 -msse3 is only used on intel in any case.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/newnet@11104 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-07 07:47:33 +02:00
Cyp daf96bee88 newnet: Let scripts use giftPower instead of addPower.
Since addPower isn't sent over the network.
2010-07-06 08:43:44 +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
dak180 559a02e7f7 Minor adjustments to better match up with newnet.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11101 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-06 07:17:41 +02:00
Per Inge Mathisen 9314399f0c As an extension of ticket:1651 now remove even more floating point movement code. Also
remove the rather pointless turn optimization code. Also see ticket:1649 for discussion.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11099 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-05 23:15:20 +02:00
Christian Ohm ae85ae5e84 Update POTFILES.in.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11097 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-05 23:15:20 +02:00
Cyp e41848767d newnet: Check return value of asprintf. 2010-07-05 23:14:41 +02:00
dak180 88c1e07e00 Update the xcode project to bring it in line with trunk and multibot.c → cpp.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/newnet@11096 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-05 19:12:24 +02:00
Cyp f7e1a91761 newnet: Group droid orders, efficiently encode small numbers. 2010-07-05 13:17:36 +02:00
dak180 b66bdb8955 Turn -Wsign-compare warnings off until someone has time to fix them.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11093 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-05 08:08:53 +02:00
dak180 2d7d29c861 Change astar.c to astar.cpp in xcode project.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11092 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-03 11:06:38 +02:00
Cyp ca9f5a1f5d astar: Try to optimize pathfinding a bit. Same basic algorithm.
Lower memory usage, less allocations, O(n) → O(log(n)) in one place. Less code.
2010-07-03 07:34:42 +02:00
Cyp 3505c31c0e newnet: Rename multibot.c -> multibot.cpp. 2010-07-02 09:30:59 +02:00
dak180 bb2eed7c63 Add jpeg_encoder.(c|h) to the xcode project.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11088 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-02 08:31:40 +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
Christian Ohm b718ea504d Draw hints in the option menus at the top with a smaller font.
Adds a new function addTextHint for that. Refs #1953.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11084 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
dak180 5789b3acf9 Update libping to ver. 1.4.3.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11076 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-29 07:37:57 +02:00
Christian Ohm 58a3238bec Update libpng to 1.2.44 for Windows cross-builds.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11072 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
dak180 36891ca806 Add a warning that we do not get now so we will not get it later.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11069 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-28 08:20:54 +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
Buginator abd4738928 Add bounds checking to psStats to prevent bad pointers.
Thanks to Crymson for the original patch, with modifications by Cybersphinx & Buginator.

Closes ticket:1903
2.3: r11059

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11061 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-27 21:29:20 +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
Per Inge Mathisen f853605072 Turn annoying LOG_INFO calls into LOG_NET
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11058 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-27 20:16:12 +02:00
dak180 0fbdda02f7 Add some warnings for Zarel.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11057 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-27 07:49:21 +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
Christian Ohm ba2433fa11 Remove the redundant avSetStatus().
It does exactly the same as setRevealStatus(), and was only called together
with war_SetFog(), which calls setRevealStatus() anyway.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11041 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-26 21:35:47 +02:00