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
* Instead rely on setting that pointer to NULL in the client code that calls animObj_Remove in the first place
- This was already done in all but one case where animObj_Remove was called
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6180 4a71c877-e1ca-e34f-864e-861f7616d084
* Missing returns from function
* Functions that are defined in both DEBUG and NDEBUG builds but only used in DEBUG builds
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6179 4a71c877-e1ca-e34f-864e-861f7616d084