There we can check the GL_RENDERER string for more fine control. Currently it
is enabled when the string starts with "Mesa", so it doesn't affect any other
drivers. It might need more checks if new Mesa versions break this.
Fixes#608.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7694 4a71c877-e1ca-e34f-864e-861f7616d084
* Only clean up the IPv4 socket if we are able to enable IPv4 mapping of IPv6 addresses ''and'' are able to create an IPv6 socket
* Add some more debug messages to be able to see what sockets could be created
* Close sockets when they've become useless/invalid
This should fix#534 for real (unlike r7541, which fixed it and then reintroduced another bug causing the same symptom).
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7543 4a71c877-e1ca-e34f-864e-861f7616d084
* Allow failure for setting up of one of the sockets
- More accurately: require only one socket to succeed
* Try to use the IPv4 to IPv6 mapping feature if the host OS provides it
- This allows us to use only a single socket on those systems for both listening to IPv4 and IPv6
This should fix#534.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7541 4a71c877-e1ca-e34f-864e-861f7616d084
* Add a new field: secondaryHosts, an array of two fallback hosts
- Canibalize the entire "misc" field and part of the "extra" field for this
- When connecting, first try the primary "host" field, then fall back to the hosts in secondaryHosts (in order)
* Add a new field: gameId, used on the lobby server to link multiple lobby connections to a single game entry
- First (attempt to) connect to the lobby with all available address families (currently IPv4 and IPv6)
- Then ask for a gameId from the lobby server using the first established lobby connection
- Set the gameId field in the GAMESTRUCT to the one retrieved
- Transmit the GAMESTRUCT using a "addg" command to the lobby over each lobby connection
- The lobby then compares all incoming ID numbers with ID numbers already present
- If there's a match it will use the GAMESTRUCT already present and only add a new hostname to the list
This is the last change, part of, and closes#452
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7364 4a71c877-e1ca-e34f-864e-861f7616d084
* Make the "addg" command return a status code (ranging 200-299 on success) and message (MOTD on succes)
* Don't use the "motd" command anymore to check the lobby status, instead use the returned status code for that purpose.
* Allow MOTD strings of arbitrary length (by sending along the length)
This modification ensures that ''proper'' connectivity checking is being performed on the game server (and reported to the user accurately).
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7323 4a71c877-e1ca-e34f-864e-861f7616d084
* Duplicate the entire ASSERT() call instead of conditionally expanding its parameter
- Depending on whether we are or are not compiling on Windows
Thanks go to Buginator for reporting this.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7306 4a71c877-e1ca-e34f-864e-861f7616d084
This way it is no longer required to first explicitly check whether
connections are pending (through checkSockets, which select(2)s) and
only then accept(2) it. Now you can attempt to accept the connection,
and if one is available it'll get returned, NULL otherwise.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7300 4a71c877-e1ca-e34f-864e-861f7616d084
* Rename read_all to readNoInt because that function is a read(2) variant that doesn't get interrupted by signals (EINTR)
* Add Doxygen comments to readNoInt and writeAll
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7298 4a71c877-e1ca-e34f-864e-861f7616d084
* Use the "SOCKET" typedef to represent socket descriptors (instead of "int")
* Add wrapper functions for getting & setting the last socket error ("errno" on Unix)
* Add a wrapper function for strerror, strsockerror, that works on Windows
* Use recv(2) and send(2) instead of read(2) and write(2) respectively
* Use INVALID_SOCKET and SOCKET_ERROR instead of -1 to find errors
* Move setting of sockets to blocking/non-blocking to a separate function
* Add Windows-specific wrapper functions for getaddrinfo() and freeaddrinfo()
- Currently work only from 2000 *or* XP upwards, documentation is fuzzy.
Addresses #435
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7289 4a71c877-e1ca-e34f-864e-861f7616d084
* Check for write_all() == -1 (error) instead of "< 0" and "!= size" to
see whether sending has failed.
* Don't just mark sockets as "invalid" on error (by setting them to
NULL), close them as well.
* Give decent error messages on write failure (most likely a disconnect)
Addresses #435
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7288 4a71c877-e1ca-e34f-864e-861f7616d084
In this case, 'Remove unnecessary SDL includes.' Removed the #include for C99 types that we use on non C99 compilers.
In case your wondering, using SDL_stdinc.h, since SDL_types.h is Deprecated.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7250 4a71c877-e1ca-e34f-864e-861f7616d084
Adds feedback from the lobby server.
Notes: You have to enter a password *first*, and then either host the game, or join a game.
Thanks to elio for the new icons!
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7079 4a71c877-e1ca-e34f-864e-861f7616d084
* Remove unnecessary "// =====..." and "//~~~~..." comment bars
* Use "bool" instead of "BOOL"
* Use ARRAY_SIZE(registry) instead of REGISTRY_HASH_SIZE to get the amount of hash entries
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7068 4a71c877-e1ca-e34f-864e-861f7616d084
* Enable, at the user's request, FSAA.
- The user can specify the amount of samples (should be a power of 2) with the "FSAA" config option.
- The user can disable FSAA by setting the "FSAA" option to "0" (zero)
This closes#387.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7065 4a71c877-e1ca-e34f-864e-861f7616d084
rectangle extension. It uses one texture with a fixed size for videos (the old code allocated
a new texture once per frame). The texture size is set at 512x512, which is enough
for the current 320x240 videos. In addition the message about the radar not working is
removed and some extra checks added. Patch by Christian Ohm.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7021 4a71c877-e1ca-e34f-864e-861f7616d084
If client connects to host, and they don't respond (within 7secs) to the version packet, then it will auto-kick them.
If client sends wrong version in the version packet, then it will auto-kick them.
Also adds kick message support, for the different types of kicks that we do.
merged from r6992
NOTE: trunk won't connect with 2.2. This is *on purpose*, just testing version checking code for now.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7014 4a71c877-e1ca-e34f-864e-861f7616d084
In C++ enums are treated differently from integers in some cases, causing GCC to emit some rather nasty abort()-like code (x86/x64 instruction "ud2a") when used as the type for va_arg().
This was the compiler message generated:
{{{
stack.c:339: warning: ‘INTERP_TYPE’ is promoted to ‘int’ when passed through ‘...’
stack.c:339: note: (so you should pass ‘int’ not ‘INTERP_TYPE’ to ‘va_arg’)
stack.c:339: note: if this code is reached, the program will abort
}}}
NOTE: Compiling as C++ now works (as does the produced code), using: {{{./configure CC=g++ CFLAGS=-fpermissive --enable-debug=relaxed}}}
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6957 4a71c877-e1ca-e34f-864e-861f7616d084
In fact, WZ_ASSERT_STATIC_STRING should now work on ''all'' valid C++ compilers.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6930 4a71c877-e1ca-e34f-864e-861f7616d084
The blueprint is a green transparent version of the building you want to build. It is bright green when the build location is valid and red when it is not. After the building is placed a darker version of the green building will remain until a droid starts construction.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6840 4a71c877-e1ca-e34f-864e-861f7616d084
*Adds LOG_FEATURE (--debug feature) so we can keep track of features.
*Disallow VTOLs from being able to poach features.
*Changes feature spawning from instant to a variable time period.
*When feature can't be placed, break out of routine instead of sending invalid data.
*Actually remove features, and notify others that the feature was removed. (AKA, actually sync between machines.)
ASSERT() when numNaybors is invalid.
Fix a spamming debug line mistakenly changed in r6677
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6737 4a71c877-e1ca-e34f-864e-861f7616d084
In certain circumstances, if you try to abort out of a MP game (maybe SP as well), it would crash after deleting the widget, since it was still referencing the pointer in the global.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6732 4a71c877-e1ca-e34f-864e-861f7616d084
In MP games, since gametime can vary so much between machines, needed a more reliable time source to sync up messages between them.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6679 4a71c877-e1ca-e34f-864e-861f7616d084
* Fixes eventFireCallbackTrigger which was called multiple times.
* LOG_NET is to *only* be used for network traffic, not for sync issues.
* Adds visual display about when player leaves/drops.
* Adds / cleans up debug messages concerning connection issues.
* Adds new message type NET_PLAYER_DROPPED, (as opposed to NET_PLAYER_LEAVING). One is when we lose a connection, the other is when a player quits 'normally'.
Will be adding icons from Ticket #247 done by Zarel soon.
NOTE: please use --debug net if you have connection issues!
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6677 4a71c877-e1ca-e34f-864e-861f7616d084
We need to change the Glee.diff file as well.
Closes ticket #262
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6642 4a71c877-e1ca-e34f-864e-861f7616d084
**NOTE**: this will break gcc compiles. The fix is in the next commit, so we can get a clean diff from the "clean" 5.4 to the modified version that we require.
Change log:
* OpenGL 3.0 support, and 41 new extensions.
* 5.4 : fixes for GL_NV_gpu_program4, GL_EXT_shader_program4.
* 5.4 : Added 5 new extensions :
o GL_EXT_texture_swizzle
o GL_NV_explicit_multisample
o GL_NV_transform_feedback2
o WGL_NV_gpu_affinity
o GLX_ARB_create_context
* 5.4 : Various dead/dummy extensions have been removed, including :
o GL_NV_geometry_program4 (merged with GL_NV_gpu_program4)
o GL_NV_vertex_program4 (merged with GL_NV_gpu_program4)
o GL_NV_fragment_program4 (merged with GL_NV_gpu_program4)
o WGL_NV_video_out (renamed to WGL_NV_video_output)
* 5.33 : fixes some GCC warnings
* 5.33 : fixes some conflicts with glext.h on OS X
* 5.33 : fixes an issue where 2 extensions could go missing on some platforms
* 5.32 : fixes a potential access violation in __GLeeGetExtensions - thanks to Jacques Beaurain for spotting this bug.
* 5.31 : fixes a GLX compile error
* 5.30 : Better Linux/Mac OS support
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6641 4a71c877-e1ca-e34f-864e-861f7616d084
Can compile OK with MSVC once again.
Frame.h must be included before default system header #includes, so we don't have linker redefinitions & conflicts with the non C99 compliant routines that MSVC uses.
Or in other words, we want our C99 compliant routines to override the default routines that MSVC uses.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6640 4a71c877-e1ca-e34f-864e-861f7616d084
Extension functions dealing with ...
* strings are in string_ext.h
* stdio (namely printf variants) are in stdio_ext.h
* math are in math_ext.h
These headers are no longer included by frame.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6613 4a71c877-e1ca-e34f-864e-861f7616d084
Incl: Move MAX_STR_LENGTH out of wzglobal.h, since it is only used in src
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6612 4a71c877-e1ca-e34f-864e-861f7616d084
Includes a comment on what might appear as magic or
incomplete implementation at first sight.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6603 4a71c877-e1ca-e34f-864e-861f7616d084
Fixes#234.
This is not the patch attached there, since that one was broken.
From the manpage:
DESCRIPTION
These functions return the larger value of x and y.
RETURN VALUE
These functions return the maximum of x and y.
If one argument is a NaN, the other argument is returned.
If both arguments are NaN, a NaN is returned.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6601 4a71c877-e1ca-e34f-864e-861f7616d084
- Don't ignore write(2)'s return value, instead handle it properly to deal with the cases where write(2) gets interrupted (by a signal) or returns prematurely because of non-blocking I/O
- Properly handle popen(3) returning NULL
* Don't assume the data written to stdout by "which" will just fit in our buffer
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6577 4a71c877-e1ca-e34f-864e-861f7616d084
* Check for C99 instead of !MSVC where we deal with C99 stuff
* C++98 defines bool as well
* Move BOOL after the bool checks, so we could define it to bool more easily
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6572 4a71c877-e1ca-e34f-864e-861f7616d084
An change was introduced on sqlite3_vfs which causes an incompatible
pointer error when mixed with older sqlite versions. Thus bump the
required version to 3.6.10 as well.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6564 4a71c877-e1ca-e34f-864e-861f7616d084
- If it does, check whether it's behaviour is consistent with our implementation
- If behaviour is consistent: use the system's implementation
- If not, rename our implementation (to prevent symbol clashes) and use our own
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6556 4a71c877-e1ca-e34f-864e-861f7616d084
* It seems that autoconf (2.63 or 2.62) changed the names that are acceptable as custom variable name, and no longer accepts LT_\w+ as variable names.
This addresses #201 and hopefully fixes it.
@EvilGuru, if this fixes it, please close the ticket.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6538 4a71c877-e1ca-e34f-864e-861f7616d084
* Detect libsvg-cairo in the configure script
* Link against libsvg-cairo
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6440 4a71c877-e1ca-e34f-864e-861f7616d084
* Use this macro definition for widget:addAnimation(frames) instead of the previously custom crafted typemap
* Add src/lua_memberfnptr.i and src/lua_table_as_array.i to the Makefile's EXTRA_DIST list
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6439 4a71c877-e1ca-e34f-864e-861f7616d084
* Alter the "(callback handler, callback destructor, void *userData)" typemap such that it can be used as a more generic member-function callback
* Additionally place this typemap in a file of its own for greater ease of reuse
* Use this new typemap (for type SWIGLUA_MEMBER_FN) in the interface definition because of its greater simplicity
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6438 4a71c877-e1ca-e34f-864e-861f7616d084
* Make its dependency on AC_PROG_SED and AC_PROG_GREP explicit (AC_REQUIRE)
* Depend on AX_WITH_PROG for finding out about SWIG's location
* Use AX_COMPARE_VERSION (instead of lost of customly crafted code) to compare SWIG's version to that required
* Instead of emitting a warning error out when SWIG can't be found or it doesn't satisfy the required version
* Use a ''correct'' commandline (parameters to SWIG and correct regex + substitution) to find out SWIG's version
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6436 4a71c877-e1ca-e34f-864e-861f7616d084
- This reduces the complexity of those functions ''significantly''
* Mark yyerror functions with printf formatting with WZ_DECL_FORMAT(printf, ...)
(@trunk = the original intented target for r6430)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6432 4a71c877-e1ca-e34f-864e-861f7616d084
is thus always facing upwards. This option is now enabled by default to obtain some feedback.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6410 4a71c877-e1ca-e34f-864e-861f7616d084
* Use C89 style variable declarations (i.e. at the beginning of scope-blocks)
* Use a proper set of #include paths
This should fix#160, patch by <i-NoD> slightly modified by me (moved variable declarations to the most local scope where used)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6385 4a71c877-e1ca-e34f-864e-861f7616d084
- Use 0:0:0 as current version (API=0, API_IMPLEMENTATION=0, IMPLEMENTATION_AGE=0)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6375 4a71c877-e1ca-e34f-864e-861f7616d084
- We currently do this for Lua
- Libtool is apparently smart enough to find out about libtool libraries on its own (so we don't need to "hack" our way to finding those)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6374 4a71c877-e1ca-e34f-864e-861f7616d084
This allows easy detection of betawidget by means of pkg-config
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6373 4a71c877-e1ca-e34f-864e-861f7616d084
- Make sure to build libbetawidget.la in lib/betawidget/ first though (because tools/ depends on that)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6369 4a71c877-e1ca-e34f-864e-861f7616d084
* Use plain "cairo" instead of "cairo-svg" because "cairo-svg" is an ''output'' backend in which we're not interested
* When re-running aclocal make sure to pass `-I m4` to it
* For lack of -Werror lets compile with -Werror-implicit-function-declaration to die at implicit function declarations (rather than getting stranger errors)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6368 4a71c877-e1ca-e34f-864e-861f7616d084
* Rename LIST_ADDEND to LIST_APPEND (because that's what it does: append to a list)
* Clean up the assertion in LIST_REMOVE
* Prevent a potential bug in LIST_APPEND by not initialising the psNext pointer to NULL
- doesn't ever occur right now, for one simple reason: the only place where this macro is used is on a structure that's initialised with memset(0)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6260 4a71c877-e1ca-e34f-864e-861f7616d084
* Fix several parameters that got passed wrong and didn't get caught due to the different definitions
Caught by EvilGuru
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6256 4a71c877-e1ca-e34f-864e-861f7616d084
* If initialisation of the debug callback failed, do ''not'' add it to the list of debug callbacks to use
This fixes ticket:136
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6249 4a71c877-e1ca-e34f-864e-861f7616d084
Forces window XP users to also use a software device for openAL. (already the default for the other platforms & vista). This allows 256 sources, instead of 16.
Note: *this is windows specific* and will not affect the other platforms.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6223 4a71c877-e1ca-e34f-864e-861f7616d084
* use mkstemp(3) to create a temporary file that's guaranteed not to exist already
Prevents a potential symlink attack (e.g. where /tmp/warzone2100.gdmp is symlinked by user A to a file owned by user B, then having user B crash warzone)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6214 4a71c877-e1ca-e34f-864e-861f7616d084
(Normally, it dumps only when LOG_SCRIPT is defined, but we can't determine where the script errors are when LOG_SCRIPT isn't used)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6212 4a71c877-e1ca-e34f-864e-861f7616d084