Commit Graph

3008 Commits (ed753ff8c455fa5838799dab46f40120c2debde1)

Author SHA1 Message Date
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
Cyp be5285f916 Fix duplicate structure IDs by removing GAME_BUILD message type.
The only remaining purpose of GAME_BUILD was to hackishly change structure IDs around, which is not useful since structure IDs are already synchronised.

Changelog: Fix inability to select or target some structures due to duplicate structure IDs.
2010-11-07 14:16:56 +01:00
buginator 5a35eb9f89 CHANGELOG: Correctly handle unicode strings for edit boxes.
fixes ticket:2209
(cherry picked from commit 3012fde61ef92151e0ec5125551a7b3481f05fb8)

Conflicts:

	lib/widget/editbox.c
2010-11-06 15:59:57 -04: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
Per Inge Mathisen 153c5c5613 Try to fix signed/unsigned comparison bugs in newly converted c++ code. 2010-11-02 21:06:23 +01:00
cybersphinx 99486cb694 Add Turkish translation by Ayhan Görgülü.
Closes #2261.
2010-11-02 15:34:00 +01:00
Buginator 0702fa9eb5 Show map / game name / hosted by in the tooltip for the lobby
closes ticket:2121

This does *NOT* break GAMESTRUCT compatibility.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11546 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 1119dada6868433f6840dd1fe174a7aa3858b081)
2010-11-02 15:30:36 +01:00
Cyp 33c25602f7 Bump netcode version. 2010-10-30 22:59:27 +02:00
Cyp d41a6078d4 Bump netcode version for testing build. 2010-10-30 22:57:54 +02:00
cybersphinx 4f411fd096 Add stdlib.h to fix compilation. 2010-11-02 01:18:45 +01:00
Cyp 95b4cff1b8 Merge remote branches 'origin/qt-trunk' and 'origin/master' into qt
Conflicts:
	macosx/Warzone.xcodeproj/project.pbxproj
2010-10-31 22:27:42 +01:00
safety0ff bffee9d99b Add workaround for corrupted Qt text. 2010-10-30 16:49:27 -04:00
Cyp 6e1771e319 Merge remote branch 'origin/master' into qt
Conflicts:
	lib/ivis_common/piemode.h
	lib/ivis_common/rendmode.h
	lib/ivis_common/textdraw.h
	macosx/Warzone.xcodeproj/project.pbxproj
	macosx/configs/Project-All.xcconfig
2010-10-30 20:04:42 +02:00
Per Inge Mathisen aa1531707a Remove unused text drawing code to reduce legacy porting woes. 2010-10-30 19:18:50 +02:00
Per Inge Mathisen aaedaabf60 Speed up text rendering for console messages by rendering to pixmaps instead of re-rendering the strings themselves for every display frame.
This increases actual display frames per second here by 100% when showing a full console.
2010-10-30 17:06:36 +02:00
Per Inge Mathisen 828c0f72ae Revert 9e29aa5210 which reverted the removal of QuesoGLC, to start
working on fixing the font rendering with Qt.
2010-10-30 13:20:16 +02:00
Cyp ad4a38a1be Bump netcode version.
Also, remove unused NETCODE_HASH.
2010-10-26 10:11:04 +02:00
Cyp 25671b1083 Revert "Replace immediate-mode rendering with VA-based rendering" for now, since it makes rendering trucks very slow.
This reverts commit f363a02af7.

Please revert this revert when this is fixed.
2010-10-26 08:36:22 +02:00
Per Inge Mathisen b7c9a369d6 Add new backdrop from forum member jorzi. 2010-10-24 19:55:57 +02:00
Cyp 5c431a36d1 Convert muzzle location from floats to integers. 2010-10-23 18:02:56 +02:00
Cyp e8ebb11d4a Remove NETnull() function, which was potentially confusing.
NETnull() was equivalent to uint32_t zero = 0; NETuint32_t(&zero);, which no longer adds/removes 4 bytes of padding as advertised.
2010-10-23 18:02:56 +02: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 d0217d5d4e Commit patch from ticket:2110 "Mousewheel menu patch"
Author: noccy
Thanks for the patch!

Format and additional changes by me.

Close ticket:2110
(cherry picked from commit e979b6ad620f27e746f119fefd1f613bbb61b8a4)

Conflicts:

	src/keybind.c
	src/keybind.h
2010-10-21 00:55:55 -04:00
Buginator 58c0ceec95 Fix edit boxes so they correctly calculate the string's pixel borders.
Motivation of this patch was because of some whiny guy on IRC. ;)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11668 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 81f07188a3693007621496ac9fa0c0e2e8b24b87)
2010-10-18 22:23:59 -04:00
Buginator 0be5f2b6e9 Add code to look for "novideo.ogg" refs ticket:2052
but don't upload the novideo.ogg yet, since we don't have a clear winner.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11566 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 7f6ea5d1a332b7bc535a4a83768b0b90d543df1c)
2010-10-18 22:23:55 -04:00
Buginator f4c3d7ec8e Change ASCII_NEWLINE from '@' to '`'
This enables people to use "@" in chat.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11545 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 10217901eb10fc652c3c8eeb2eba2f519b1f5b0f)
2010-10-18 21:47:48 -04: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 e09e8ac4fe If resource was not loaded, then don't continue on, error out.
(cherry picked from commit aa8bf289b8f4fad5d6122a43432521dbf2e2cc92)
2010-10-17 19:32:53 -04:00
buginator a11d60774e Fix MSVC builds 2010-10-17 18:46:06 -04:00
Cyp 49e9780f41 Fix spurious out-of-synch messages when pausing in single-player mode.
This was caused by forgetting to set the delta tick time to 0 when paused. Don't know whether fixing this fixes anything else.
2010-10-16 17:55:01 +02:00
Giel van Schijndel b5fb5bacf8 remove write-only variables buffer and size from iSurface
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 22:09:31 +02:00
Giel van Schijndel 0d2dbdbaef Replace rendSurface related bitshifts with divisions
These cases of bitshifting are premature optimisations ''only'',
especially since they obscure what's really going on (finding the center
of a range).

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 21:35:22 +02:00
Giel van Schijndel 6e509622c2 move global rendSurface to piemode.c
rendSurface isn't used by rendmode.c, so define it in piemode.c where it
is both used and its contents are defined.

Additionally remove unnecessary #includes from rendmode.h and include
the correct headers at places where rendmode.h was included.

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 21:35:04 +02:00
Giel van Schijndel 5ab267ab71 Remove pointer global psRendSurface
Global pointer psRendSurface only ever contains &rendSurface (another
global), provided that it isn't undefined (isn't statically NULL
initialised).  So replace the use of this pointer with using
rendSurface.

Additionally remove function iV_RenderAssign, which only wraps the
psRendSurface assignment along with a debug() call, and inline it at its
only call-site.

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 21:30:00 +02:00
Giel van Schijndel 681988a5d4 Remove unused constant PIE_NO_CULL
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 21:30:00 +02:00
Giel van Schijndel 5a51986e65 Get rid of double pie_/iV_ names for the same functions
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 21:30:00 +02:00
Giel van Schijndel e278f01bcd remove write-only variable iSurface.flags
Remove the write only member variable `flags` from struct iSurface.

Additionally remove the macros REND_SURFACE_(UNDEFINED|SCREEN|USR) which
were only used to assign to the `flags` variable.

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 21:29:59 +02:00
Giel van Schijndel 5923c45593 piematrix: improve mathematical description of pie_RotateTranslate3f
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-10 14:53:58 +02: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
Cyp 0794c5a674 Merge remote branch 'origin/master' into qt-trunk
Conflicts:
	.hgignore
	configure.ac
	lib/framework/SDL_framerate.h
	lib/framework/cursors.h
	lib/framework/endian_hack.h
	lib/framework/frame.c
	lib/framework/input.c
	lib/framework/input.h
	lib/framework/opengl.h
	lib/framework/wzapp_c.h
	lib/gamelib/gtime.c
	lib/gamelib/gtime.h
	lib/ivis_common/Makefile.am
	lib/ivis_common/ivispatch.h
	lib/ivis_common/png_util.h
	lib/ivis_opengl/screen.c
	lib/ivis_opengl/screen.h
	lib/netplay/netlog.c
	lib/netplay/netlog.h
	lib/netplay/netplay.c
	lib/netplay/netplay.vcproj
	lib/netplay/netsocket.cpp
	lib/netplay/nettypes.c
	lib/sequence/sequence.c
	lib/sound/oggvorbis.c
	lib/widget/scrap.c
	macosx/Resources/wzlocal/lt.lproj/InfoPlist.strings
	macosx/Warzone.xcodeproj/project.pbxproj
	macosx/configs/Bison-Debug.xcconfig
	macosx/configs/Bison-Release.xcconfig
	macosx/configs/FetchPrebuilt.sh
	macosx/configs/FetchSource.sh
	macosx/configs/Project-All.xcconfig
	macosx/configs/SDLmain-All.xcconfig
	macosx/configs/SDLmain-Debug.xcconfig
	macosx/configs/SDLmain-Release.xcconfig
	macosx/configs/Warzone-All.xcconfig
	macosx/configs/Warzone-Debug.xcconfig
	po/cs.po
	po/da.po
	po/de.po
	po/en_GB.po
	po/es.po
	po/et_EE.po
	po/fi.po
	po/fr.po
	po/fy.po
	po/ga.po
	po/hr.po
	po/it.po
	po/ko.po
	po/la.po
	po/lt.po
	po/nb.po
	po/nl.po
	po/pl.po
	po/pt.po
	po/pt_BR.po
	po/ro.po
	po/ru.po
	po/sk.po
	po/sl.po
	po/uk_UA.po
	po/zh_CN.po
	po/zh_TW.po
	src/astar.c
	src/data.c
	src/fpath.c
	src/frontend.c
	src/hci.c
	src/main.cpp
	src/move.c
	src/move.h
	src/multibot.c
	src/multiint.c
	src/multijoin.c
	src/multiplay.c
	src/multisync.c
	src/terrain.c
2010-10-09 14:44:15 +02:00
Cyp 03cc107b84 Add build script fixer for when renaming files from .c → .cpp, and add branch-switching hack to lib/ivis_opengl. 2010-10-08 13:16:07 +02:00
Cyp 125e7ba9ab Convert pie_MatRot[XYZ] to use uint16_t instead of float. 2010-10-08 11:28:31 +02:00
Cyp 5fa9edc4ad Replace iv_Matrix with pie_Mat, eliminating the need for ivispatch.h. 2010-10-08 11:19:57 +02:00
Giel van Schijndel fd740148c3 piematrix: remove unused function pie_RotateTranslate3iv
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-07 16:10:34 +02:00
Giel van Schijndel 704b32b9ba piematrix: fix rotation math
In 697a97ff18, my interpretation of the
performed matrix math was wrong as a result of (wrongly) reading [xyz]^2
as [xyz]*2.  This commit fixes that error.

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-06 17:03:32 +02:00
Giel van Schijndel ab9711d877 piematrix: get rid of FP12 bitshifting
Use multiplication and division instead of bitshifting as its
conceptually easier to understand (mathematically).

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-05 23:52:54 +02:00
Giel van Schijndel 660f202a9c Fix wrong ordering of matrix cells
Wrong ordering reported by cybershpinx

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-05 23:32:42 +02:00
Giel van Schijndel 697a97ff18 piematrix: document the used math
Add descriptions of the used matrix math and the internal representation
of matrices.

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-05 22:41:51 +02:00
Giel van Schijndel c95f0f8be3 Replace [xy]pshift with the single constant it ever contains
The variables [xy]pshift only ever contain the constant value `10`, so
instead of bothering to keep the variables around use the
STRETCHED_Z_SHIFT constant.  This constant serves the same purpose as
[xy]pshift (only for the Z coordinate) and is defined to `10` as well.

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-05 20:14:55 +02:00
Giel van Schijndel 9870192aa1 Merge r11685 from trunk into the Qt branch: Add lib/framework/opengl.h to noinst_HEADERS
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11687 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:35:11 +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 3390509fe7 piematrix: use floats instead of fixed point DEG degree values for rotations
Allow passing of degrees as floats to the pie_MatRot[XYZ] functions.

This commit further helps in getting rid of fixed point math.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11708 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:42 +02:00
Giel van Schijndel a6cb949c97 piematrix: prepare for removal of fixed point math
* Change some of the PIE matrix functions to accept floating point
   values in the API.
 * Rename the badly named constant `_MATRIX_ID` to `Identitymatrix`

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11707 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:42 +02:00
Giel van Schijndel dc8623a6ec DrawText: Don't be overly pedantic in restoring the previous matrix-mode
Don't retrieve the current matrix mode prior to changing it, and restore
this mode after drawing text.  Instead rely on the assumption that the
current matrix mode is GL_MODELVIEW, which currently is a valid
assumption.

Reason for this change is that OpenGL retrieving the current matrix mode
isn't possible in OpenGL implementations without fixed pipeline, which
lack a matrix mode, e.g. OpenGL ES 2.0 and OpenGL 3.0.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11699 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:42 +02:00
Giel van Schijndel 0aa5d2cef8 Don't #include GLee.h where it isn't required
At places where we only need the ''regular'' OpenGL API, not any
extensions, don't #include GLee.h, #include lib/framework/opengl.h
instead.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11691 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:41 +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
Per Inge Mathisen 780f186dec Fix compile warning that complained about variable being potentially clobbered by longjmp.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11689 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:41 +02:00
Giel van Schijndel f363a02af7 Replace immediate-mode rendering with VA-based rendering
Almost completely (one corner case requires reading GL specs) replace
immediate-mode rendering with VA-based rendering by means of
glDrawArrays.

This, when completed, makes porting to OpenGL ES 2.0 and OpenGL 3.0
without backwards compatibility easier.

This closes #2172

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11686 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 a83560844c Merge r11677:11678 from trunk into the Qt branch: 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/branches/qt-trunk@11679 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-17 14:01:10 +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
Giel van Schijndel 8e000fa325 Replace #ifdef(APPLE) #include <$path/gl.h> sections with <SDL_opengl.h> which handles this already
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11671 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-16 11:05:20 +02:00
Giel van Schijndel b14221a289 Don't #include <GL/glu.h> where it's contents aren't used
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11669 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-15 10:12:20 +02:00
Christian Ohm 7ab97781ae Print the needed port when lobby communication fails.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11639 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-13 10:49:13 +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
Cyp e7c277c3d7 Fix VTOLs flying into hyperspace due to unsigned vertical velocity calculations.
Also, fix all signed-unsigned warnings in src/move.c.
2010-08-15 21:02:32 +02:00
Cyp 6f60e686ae Remove NETuint32_tSmall, make all uint32_t's small, except for one uint32_tLarge.
(The large is a CRC, and CRCs are usually large numbers.)
2010-08-15 21:02:32 +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
Per Inge Mathisen 3f296e5cf7 qt branch: Remove some dead code
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11467 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-15 00:11:14 +02:00
Buginator 26fa2b06f9 Change back to "trunk" form newnet. (less confusion)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11470 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-15 00:10:52 +02:00
Cyp 0c2015425c Merge remote branch 'origin/newnet'
Conflicts:
	lib/gamelib/gtime.c
	lib/gamelib/gtime.h
	lib/netplay/netplay.c

Closes ticket:1573. Closes ticket:805. Probably fixes 100 more issues.
2010-08-14 22:34:30 +02:00
Per Inge Mathisen 57299dc208 Remove all float usage from logical fps calculations. Patch reviewed by Cyp.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11462 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-14 22:08:32 +02:00
Cyp d13fbd9dbc Squelch warnings. (Need a way of doing optimised builds, but still with -Werror...) 2010-08-14 14:16:08 +02:00
Per Inge Mathisen a34997239a Fixes for game elements improperly being dependent on logical fps. Camera animation.
Water animation. Weather animations. Replaced all usages of the generic timeAdjustedIncrement
with proper gameTimeAdjustedIncrement or graphicsTimeAdjustedIncrement as appropriate.
See ticket:2083 for more info. Patch reviewed by Cyp.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11457 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-14 14:10:34 +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
Cyp fcd0b6fe46 Print "Oldname → Newname" instead of "Oldname: -> Newname". 2010-08-14 09:58:36 +02:00
Cyp 18307a7fc1 Eschew ventriloquism assiduously. 2010-08-14 09:57:45 +02:00
Christian Ohm 5c05971428 Add Slovak translation by Koapa.
Closes #2036.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11415 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-11 00:04:44 +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 8dc23cf870 Don't crash in socketAccept when given a NULL socket.
Closes #2033.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11404 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-09 09:15:37 +02:00
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