Commit Graph

7602 Commits (f63667e4b5e2911d1455d69383bc31976cfcff23)

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 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 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
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
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
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
Christian Ohm c665480274 Include/declaration cleanup for src/frontend.c/h.
Also rename the various GameOptionsX to what they actually do, e.g.
AudioOptions. Refs #1647.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11040 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
dak180 94fef64201 Clean up the link phase.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11034 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-26 19:50:22 +02:00
Buginator 4e51a7c144 Fix showing the unit count in debug mode
2.3: r11030


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11031 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-25 12:44:43 +02:00
dak180 c77a8f43f9 Change compilers around to make Vorbis happy.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11029 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-24 20:00:16 +02:00
dak180 64b75224e7 Support for Mac OS X 10.4 is now dropped; the binaries may still work on 10.4 but this is no longer supported.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11026 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-23 23:42:28 +02:00
Cyp 4596f45dcb Replace std::find with std::lower_bound. (Oops.)
Since std::find does a linear, not a binary search. Visibility lookup tables should be generated faster now.
2010-06-23 15:16:35 +02:00
Buginator 9a22573863 Clean up getMultiStats() to remove unused parameter.
2.3: r11017

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11019 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-23 14:33:10 +02:00
Buginator 6a7e9bb725 Update sync timings to more reasonable values, especially for the score.
2.3: r11016


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11018 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-23 14:33:10 +02:00
Christian Ohm 00d3899eb4 Addition to the menu fixes.
Add two places I missed before, and simplify the code a bit.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11013 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-22 13:43:33 +02:00
Christian Ohm 8b84053cba Fix menu navigation.
Always go back to the previous menu, also when pressing escape.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11008 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-22 13:43:32 +02:00
Christian Ohm 5a15ae67cc Remove some dead code.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11007 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-22 13:43:32 +02:00
Christian Ohm 6e88ea7a6e Simplify CancelPressed().
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11006 4a71c877-e1ca-e34f-864e-861f7616d084
2010-06-22 13:43:31 +02:00