Commit Graph

854 Commits (bf38eb51ea431d9197746d656ac342d1fad02b47)

Author SHA1 Message Date
Cyp bf38eb51ea Add branch switching hack to remaining Makefile.am files. 2010-12-06 00:19:30 +01:00
Cyp 5fc3f6b5d7 Fix some GUI dependence on gameTime, and make camera hovering and scrolling be more numerically stable.
The exact solution to the camera height  d²/dt² height = -ACCEL_CONSTANT * (height - desiredHeight) - VELOCITY_CONSTANT * d/dt height  ended up a bit complex.
2010-12-01 13:43:06 +01:00
Cyp 53da8ac0d0 Fix desynch due to deltaGameTime not being deterministic during message processing.
Fixed by setting deltaGameTime = 0 in src/loop.c, after each game-state update.
Also, cleaned up lib/gamelib/gtime slightly.

To reproduce locally, start 2 clients, set one to 20x speed, the other to normal speed, and create droids on uneven terrain using the debug menu.
2010-11-18 10:56:41 +01:00
Cyp 3359fac395 Fix broken moveCalcBlockingSlide comparisons, and make DEG(42) evaluate to 7645 without use of floating point.
After making DEG avoid using float (unless given a float argument), had to fix moveCalcBlockingSlide to avoid out-of-range-comparison error-warnings.

The moveCalcBlockingSlide's int16_t instead of uint16_t was introduced in 6c811c1ecb.

Also, remove lots of unused stuff.
2010-11-16 18:33:20 +01:00
Cyp 40602d428e Verify in syncDebug that generated paths are identical. 2010-11-15 13:11:19 +01:00
Per Inge Mathisen 1617b4c3d7 Add new keyword WZ_DECL_ALWAYS_INLINE to label functions that we always want to inline, even when compiling in debug mode.
Also manually inline map tile lookups in the danger map code for maximum performance (avoiding some checks).
2010-11-02 21:12:58 +01:00
cybersphinx 99486cb694 Add Turkish translation by Ayhan Görgülü.
Closes #2261.
2010-11-02 15:34:00 +01:00
Cyp fcdba754c4 Introduce ModeQueue and ModeImmediate as an alternative to playing with bMultiMessages.
Makes campaign queue some messages, and fixes cancelling production queues in campaign.
2010-10-22 18:13:04 +02:00
Buginator ccd5555275 Remove a (MSVC only) debug() line that spammed way too much.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11321 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit a2a11fccd74485f76dbb098c0bb73de6cc0bd708)
2010-10-18 21:37:48 -04:00
buginator a11d60774e Fix MSVC builds 2010-10-17 18:46:06 -04:00
Giel van Schijndel d6c7690f02 trig: don't #include "math_ext.h" as trig.h doens't use it
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-09 17:33:45 +02:00
Giel van Schijndel a8fdd2c068 trig: declare all trigonometric functions as pure
Mark the prototypes of all (fixed point) trigonometric functions as
pure.  This declares that these functions don't have any side-effects.

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-09 17:30:53 +02:00
Giel van Schijndel 83aacc042b Get rid of unused constant TRIG_DEGREES
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-09 16:54:09 +02:00
Giel van Schijndel d01a61bdc1 Remove empty function `trigShutDown`
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11709 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:42 +02:00
Giel van Schijndel 27fb938877 opengl.h: get rid of the X11 macro `Status`
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11690 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:41 +02:00
Giel van Schijndel d0e24c96cf Add lib/framework/opengl.h to noinst_HEADERS
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11685 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:41 +02:00
Giel van Schijndel 09f6b46276 prevent redefinition of __glext_h__
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11678 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-17 14:00:58 +02:00
Giel van Schijndel 82ed96fd3b Add a platform-abstraction header: `opengl.h`
Add a header to allow platform-indepent inclusion of the OpenGL API,
removing our dependency on SDL_opengl.h and consolidating
platform-specific code in that single header.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11677 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-17 12:15:18 +02:00
Christian Ohm fadd32b1e6 Fix debug output on the console.
Check if there's a \n at the end, if not, append one. Before, it checked for a
\n anywhere in the string, and if there was, wouldn't append one.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11638 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-13 10:49:12 +02:00
Cyp 559ded3ec0 Fix switching players in single-player mode in debug menu. 2010-09-01 21:34:21 +02:00
Safety0ff d2cec06720 Fix CFURLRef leaks on Mac.
Closes #2009.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11511 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-23 16:35:30 +02:00
Safety0ff 8f55883a61 Remove SDL_swap* usage.
Closes #1937.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11482 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-15 20:46:41 +02:00
Cyp 15d7243c5f Make the warn_unused_result warning squelch compile on distros where the fwrite is already in an if (fwrite()) {}. 2010-08-15 13:15:04 +02:00
Cyp 438a4d5aff Enable warnings, make warnings consistent, fix some warnings, use -Wno-error=squeak to allow squeaky warnings to compile without squelching them. 2010-08-15 12:30:46 +02:00
Cyp 7d5f1271a9 Merge remote branch 'origin/master' into newnet
Conflicts:
	.gitignore
	lib/iniparser/Makefile.am
	macosx/Resources/wzlocal/pt_BR.lproj/InfoPlist.strings
2010-08-14 11:26:09 +02:00
Christian Ohm fe59e98943 Add Slovak translation by Koapa.
Closes #2036.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11418 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-11 00:04:10 +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 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 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 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 b59b089ca5 Merge remote branch 'origin/master' into newnet
Conflicts:
	lib/netplay/nettypes.c
	src/multibot.c
2010-07-30 22:51: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 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
Cyp b9a051150b newnet: Clean up thread-related #defines. 2010-07-12 17:57:35 +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
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
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 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
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
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
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
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
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