Commit Graph

2678 Commits (7a49623b7f290a25323af3db0e377b21d6a8daf6)

Author SHA1 Message Date
Cyp 7a49623b7f Use new/delete for allocating/deallocating WIDGETs. 2010-12-19 00:35:15 +01:00
Cyp 9f43c1f681 Make WIDGET and W_INIT inheritance explicit. 2010-12-18 23:13:27 +01:00
dak180 c4ec4ffd2b 144 warnings on the wall, take some down, grind them to dust, 98 warnings on the wall. 2010-12-16 22:05:06 -05:00
dak180 0364933736 Make the xcode project work again. 2010-12-16 21:06:33 -05:00
Cyp 3f6ecec025 Replace sqrt(x) with sqrt((double)x) to make broken compilers happy. 2010-12-16 23:28:57 +01:00
Cyp 12e8e5bc80 Rename *.lex.c to *.lex.cpp and *.tab.c to *.tab.cpp. 2010-12-16 23:28:56 +01:00
Cyp 0646b37603 Rename *.c to *.cpp. 2010-12-16 23:28:56 +01:00
Cyp a2cd7b0592 Make everything compile successfully with g++, without -fpermissive. 2010-12-16 23:24:40 +01:00
Cyp 2bcb709cf4 Move broken dependency hack out of most Makefile.am's, except the for the root. 2010-12-16 23:14:38 +01:00
Cyp 0fe191778b Actually check the mouse position when clicking, instead of just assuming people clicked wherever the mouse moves to later.
In theory, this should make the UI usable, even on machines that don't consistently get 10000 FPS.

Because WZ widgets are weird, just make the widgets pretend that the mouse stopped moving after clicking or releasing in a given frame.

If you click twice in the same frame, the second widget will still greedily steal the mouse click from the first widget.

Changelog: Try to improve UI responsiveness under low framerates.
2010-12-16 22:20:09 +01:00
dak180 1e6bce9594 Merge remote branch 'refs/remotes/nanotech/master' 2010-12-11 11:52:33 -05:00
cybersphinx dd4391990d Get rid of a few unnecessary Makefile.ams. 2010-12-11 16:41:57 +01:00
cybersphinx 7a672cab30 Fix includes for generated files. 2010-12-11 15:58:39 +01:00
NanoTech 3ccc629eab Replace legacy Carbon dialogs with Cocoa NSAlerts.
Also don't link the main binary with Carbon at all anymore.
2010-12-10 23:39:22 -06:00
buginator b1495d43b6 Trap the ASCII_NEWLINE to only work in non MP games, to prevent abuse. 2010-12-09 00:52:44 -05:00
Cyp f5893a7fe5 Don't include backtraces in syncDebug CRCs.
This should allow using syncDebugBacktrace() without causing a desynch if some clients don't support them or print them differently.
2010-12-08 18:00:08 +01:00
buginator c687c16ee9 Tell people they will see glitches, instead of thinking that they have selective
color blindness for units / structures and don't have a openGL 2.0 card.
2010-12-07 20:17:50 -05:00
buginator ac6b928ad7 Fix map preview screen redrawing, broken in f2ae61805c
Add entries to palette.txt for the new colors used in map preview.
Draw location of oil features.

Changelog: Enhance map preview to show oil locations.
2010-12-06 21:14:06 -05:00
buginator 00c92cbdd7 Fix bug introduced in 09ea0be7c30236809536db332be78b2967d3114d Changelog: Fix kicking of non-hosts who didn't have default color values.
Only change colors if you are the host on the setup screen.
Fixes ticket:2329
(cherry picked from commit fd2843e6431e43cc72b635c422fd18bb19d42c47)

Conflicts:

	lib/netplay/netplay.c
2010-12-06 21:13:54 -05:00
buginator 0049223ccb Use the host's SP color as the default color when hosting games. (cherry picked from commit 09ea0be7c30236809536db332be78b2967d3114d)
Conflicts:

	lib/netplay/netplay.c
2010-12-06 21:13:52 -05:00
buginator bbcad634bc Fix error messages / formatting. (cherry picked from commit 461b8c820cffe97077568f2c25fa480ffec131e4) 2010-12-06 21:13:44 -05:00
buginator 50aafb279e Don't try to render a string that is NULL. Unknown why this happens, need someone that has access to non-English systems to debug this matter more.
refs ticket:2209
refs tickts:2245
(cherry picked from commit b6952c184456b999fb4dfd51ced072ca1b206740)

Conflicts:

	lib/ivis_opengl/textdraw.c
2010-12-06 21:13:42 -05:00
buginator 707eed834b On LOG_ERROR, notify people in-game via the console and a sound effect that there was a error.
It will only do this once every ~30 secs since the last LOG_ERROR was generated to prevent spamming.

This is to help windows and mac users know that there was a error condition, and they need to check their logs.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11702 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 9e4688803ac044a3f9b20bbd4f8b4cc0c7cbc01e)

Conflicts:

	src/display3d.c
2010-12-06 21:13:32 -05:00
Cyp bf38eb51ea Add branch switching hack to remaining Makefile.am files. 2010-12-06 00:19:30 +01:00
Per Inge Mathisen 4f85821bab Cache texture coordinate calculation on game start instead of doing them each frame. Do defensive structure stretching in the vertex shader. See ticket:2310 2010-12-05 16:17:26 +01:00
Per Inge Mathisen 7de25a9d5b Lay the groundwork for a more modern component drawing system. Removes support for OpenGL 1.x. See ticket:2310 2010-12-04 15:57:26 +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
cybersphinx d6e2ad0c56 Put ifdefs around Linux-specific header/function.
Closes #2366.
(cherry picked from commit 2d4d2d807d98fd9cd3b49891faf0b34976330915)
2010-11-30 01:56:05 +01:00
Cyp 2ad6ff0855 Fix desynch when player leaves, due to clearing buildings at different gameTimes. 2010-11-29 12:48:51 +01:00
Cyp a8f6faaed0 Fix spurious desynch at gameTime 102, due to not clearing desynch logs between games.
Also, no need to duplicate function name strings, which are link-time constants.
2010-11-29 01:45:19 +01:00
cybersphinx b7cb308f30 Allow process to be traced for the crash handler.
Some distributions disallow this (newer Ubuntu for example), so the gdb call
didn't output anything useful. Based on a patch by Safety0ff.
(cherry picked from commit 023ea5b2cea6f57b6690ac7d25fd472aefc911eb)
2010-11-24 16:49:50 +01:00
Buginator 83f1a892e1 Only clear player name when needed.
(When player drops / leaves, you will still see their name instead of the default color name).

Also fix a log line.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11495 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 847edec81737e6c6a42e4c91aede5c99b9a755ce)
2010-11-22 16:06:29 +01:00
safety0ff ae6b76dda5 Fix for ivis state desync, fixes menu colour bug noticed by vexed. 2010-11-22 01:02:11 -05:00
safety0ff 7e872312b8 Fix opengl state clobbering, optimize terrain rendering a little. 2010-11-22 00:05:42 -05:00
safety0ff 8c9e7d5bd0 Fix an invalid pointer dereferencing issue in the script events system.
Closes #2300.
2010-11-21 15:48:31 -05:00
safety0ff 16681df600 Revert "Fix another memory clobbering issue. (dereferenced pointer)"
This reverts commit 1a6fb8a7547f23ce2bd7af153ac839cba999e2b0.
2010-11-21 15:48:31 -05:00
Cyp ea1e76a09d Handle floating point connector coordinates as well as integer (ignores the floating point part).
Correctly handles "42 127 -3", "42.999 127. -3.1415926535897932384626" and "42... 127.0.0.1 -3.0..0...0" as (42, 127, -3).
Doesn't handle the floating point and integer mixture "42 127.0 -3".
2010-11-21 11:38:36 +01:00
Cyp bdca765f06 Change connector locations and pie_TRANSLATE from floats to ints.
Probably fixes desynchs involving different projectile sources.

Hope no floats are left to affect the game state...
2010-11-20 20:44:40 +01:00
Cyp a0ea827340 Fix VTOLs teleporting to a planet 2.5 million tiles up, due to missing cast before division in last commit. 2010-11-19 12:42:19 +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 a0c1c9de0d Change droid experience from float to uint32_t.
Less floats generally reduces the risk of desynchs, don't know if the droid experience caused desynchs, but it might have been possible. Added experience to syncDebugDroid.

Also, fixed QualityFactor and droidResistance integer truncation and made single-player skirmish damage not affected by difficulty level either.
2010-11-16 14:18:01 +01:00
Cyp 48c4958062 Convert iIMDShape.min/max from Vector3f to Vector3i, since they are used in the game state.
Don't know if that could cause any desynchs, but better not to risk it.
2010-11-16 12:01:43 +01:00
Cyp 7df59bafdb Fix desynch when constructing and demolishing the same structure at the same time. 2010-11-15 14:31:28 +01:00
Cyp 40602d428e Verify in syncDebug that generated paths are identical. 2010-11-15 13:11:19 +01:00
buginator df83ed0caa Bump netcode's NETCODE_VERSION_MINOR to sync with new testing build. 2010-11-14 22:38:20 -05:00
buginator 341d4d3bf8 Use 'Warzone 2100 master' as the default directory, and the default crash handler (on windows) directory.
fixes ticket:2317
2010-11-14 22:30:45 -05:00
buginator f8517a7716 Fix another memory clobbering issue. (dereferenced pointer)
Patch Author: Safety0ff
fixes ticket:2300

Original detective work done by Ai_Tak (ticket:1656)

Signed-off-by: buginator <buginator@gna.org>
(cherry picked from commit 1a6fb8a7547f23ce2bd7af153ac839cba999e2b0)
2010-11-13 13:40:58 -05:00
Per Inge Mathisen 9b3cf3a382 Allow you to load textures on demand, both ordinary textures and tcmask textures.There is really no reason now to list tcmask textures in the wrf files at all. You can still put a texture in the wrf to override the usual texture loaded with a model (necessary for campaign and terrain dependent base plates). Closes ticket:2304 2010-11-12 21:31:56 +01:00
Per Inge Mathisen bf4ffed04c Allow texture animation and tcmask to be used together. 2010-11-10 20:10:40 +01:00