Commit Graph

2111 Commits (ba36ac6cfd69466d2b36b5cba82fedb2fa6513da)

Author SHA1 Message Date
Freddie Witherden 18870edfd6 Revert r6921. The newline character on OS X is \n, only OS 9 used \r, which we do not target.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6922 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-30 16:10:59 +02:00
Giel van Schijndel 12eccf9d4c An end of line character is "\r" on the Mac
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6921 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-30 16:10:59 +02:00
Giel van Schijndel f179b6f092 Allow compiling and linking with lib/framework/stdio_ext.h and src/version.h from C++ code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6920 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-30 16:10:59 +02:00
Per Inge Mathisen 82a97e938e Various fixes to be able to compile (but not yet link) Warzone with g++
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6912 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-30 16:10:58 +02:00
Per Inge Mathisen 7dfe082475 Fix ticket #293: Crashes in netlog code. 2009-03-21 08:19:49 +01:00
Buginator e1e42928ee Players no longer drop from game after too much data has been sent to them. (Usually happens in longer games, when there is more data that needs to be sent)
Closes ticket:315
Fixes ticket:218

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6881 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-20 20:40:49 +01:00
Per Inge Mathisen 95ff68f350 Improve error message on failed PIE texture flag load
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6879 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-20 20:40:48 +01:00
Per Inge Mathisen f15c0292e8 Fix some issues with 'make dist'.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6853 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-15 23:30:57 +00:00
Dennis Schridde 1199b1e03b Possibly uninitialised variable says GCC
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6847 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-14 19:49:43 +00:00
Gerard Krol dc834b2a3a Place buildings using blueprints (green) instead of highlighting the ground.
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
2009-03-11 22:55:41 +00:00
Elio Gubser 9b76a1480e fixed some nasty bugs in the svgManager
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6839 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-11 22:50:30 +00:00
Gerard Krol 5f288925db Do not use texture compression for interface textures. This makes the interface look better and fixes bug #74.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6834 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-11 13:03:48 +00:00
Gerard Krol 71bc279c9e Fix some spelling errors in debug messages and comments. Patch by Paul Wise <pabs3>.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6832 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-11 11:51:40 +00:00
Per Inge Mathisen 9271cf015e Oops. Fix blooper while editing framework build system.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6794 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-07 18:19:59 +00:00
Per Inge Mathisen 5da9b30f7d Fix missing files in makefiles so that 'make dist' can be run again.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6792 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-07 18:09:58 +00:00
Dennis Schridde ffcf206972 MSVC supports noreturn as well
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6780 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-06 14:52:22 +00:00
Dennis Schridde 58897d42be Report OpenGL 3.0 support during initialisation as well
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6779 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-06 14:40:27 +00:00
Dennis Schridde 6c1bafbf77 Use macro to check for MSVC .NET
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6778 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-06 14:40:19 +00:00
Dennis Schridde c0acc342bb Add more documentation to WZ_DECL_*, use __ attribute names as recommended by GNU for headers, reorder defintions logically
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6777 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-06 14:40:08 +00:00
Dennis Schridde 4c3053b3e1 "restrict" is a C99 feature, thus use the appropriate checks
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6776 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-06 14:39:59 +00:00
Dennis Schridde 8aacce716c Provide noreturn declaration macro (useful for exit-on-failure functions)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6775 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-06 14:39:19 +00:00
Per Inge Mathisen 28c7cb4abb Add new backdrop by B. V. Edwards <cathuria>
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6768 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-02 22:57:26 +00:00
Freddie Witherden 34323e368a Fix compilation of SQLite under OS X. Stats are still broken.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6758 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-01 13:06:59 +00:00
Dennis Schridde d8680df439 Bump internal copy of SQLite to 3.6.11
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6756 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-01 10:05:59 +00:00
Buginator fc8bbc5bd9 Feature fixes & enhancements.
*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
2009-02-28 03:36:26 +00:00
Buginator df0ada9a50 Fixes crash when certain scripts fail to compile, it don't allocate storage, so we shouldn't (try to) reference / free() it.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6736 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-28 02:17:20 +00:00
Buginator f0d0bd7ebe Fixes a dangling pointer issue with a global.
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
2009-02-28 01:40:19 +00:00
Gerard Krol 10ce0cc72b Scale down textures used for 3D when they exceed the size specified with the textureSize option. Also add two assert statements to check for the correct handling of the parameters for glDrawRangeElements.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6720 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-23 18:56:41 +00:00
Buginator 9d868d4c0c Adds LOG_LIFE to track when units are created.
(We already had LOG_DEATH)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6694 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-22 17:59:57 +00:00
Gerard Krol 5601741b95 Brace for impact, this is the new terrain renderer!
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6682 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-21 23:35:21 +00:00
Buginator e920507134 Change debug() output from gametime to real time.
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
2009-02-21 22:24:02 +00:00
Buginator 9e0767ecfd * Fixes memory leak.
* 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
2009-02-21 22:09:58 +00:00
Freddie Witherden 1d9dd3ea82 Fix a minor indentation issue in clipboard.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6663 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-19 20:43:42 +00:00
Per Inge Mathisen 3e96bd6b1d Clean up mapLoad(), using physfs to read directly from file instead of casting structs to a memory buffer. Closes ticket:274.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6662 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-19 20:35:43 +00:00
Per Inge Mathisen f002d651e7 Fix bug #273 - server crashes if more than 6 players join a game. Reviewed by devurandom.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6659 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-19 20:01:10 +00:00
Buginator 60dbe83260 Updates .diff file on what we changed from the 'clean' 5.4 to the version that we use.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6653 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 22:17:05 +00:00
Buginator e2cfc4cc32 This fixes version 5.4 of GLee so that it compiles cleanly on gcc again.
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
2009-02-15 06:17:47 +00:00
Buginator 2b350ea649 Updates GLee to 5.4
**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
2009-02-15 06:14:38 +00:00
Buginator ac9a882f07 Fixes #257
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
2009-02-15 06:09:24 +00:00
Guangcong Luo 1f5ab803ed Updated MinGW32 makefiles; fix "multiple half-tracks" bug.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6639 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 05:49:09 +00:00
Buginator af112296c6 Updated MSVC project & solution file(s).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6638 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 05:46:13 +00:00
Buginator 55d3044f15 Updated MSVC project & solution file(s).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6637 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 05:42:09 +00:00
Dennis Schridde 9dae6df94c Safen includes
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6623 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-11 12:12:00 +00:00
Dennis Schridde c4e55e49a3 Include frame.h in stdio_ext.c, so that we get debug.h and its declarations
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6620 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-11 11:04:08 +00:00
Dennis Schridde aac41748dc Bump copyright
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6617 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 18:01:48 +00:00
Dennis Schridde fcca92459c We no longer need to respect 8-char filename limits, be clear in naming instead
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6616 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:23 +00:00
Dennis Schridde 52b07e9cf0 Move piefixedpoint.h and pievector.h out of ivis, since they are quite generic
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6615 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:18 +00:00
Dennis Schridde 0c5d56b35a Move endian_* functions into a dedicated header and do not include it from frame.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6614 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:14 +00:00
Dennis Schridde cbbc58d1e9 Move files which extend a c std library header to a filename of similar name
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
2009-02-10 17:23:09 +00:00
Dennis Schridde 8050b17162 Cleanup
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
2009-02-10 17:23:03 +00:00
Dennis Schridde 16c9241fa2 Rename Vector*_New() to Vector*_Init(), since that seems less confusing
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6611 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:22:59 +00:00
Giel van Schijndel 516067dec0 Alter frandom's API such that it takes no parameters and returns a float ranging from 0.f to 1.f
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6608 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 22:51:41 +00:00
Dennis Schridde b49952ce1e New function: frandom(x,y)
Returns a random floating point number between x and y

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6604 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 21:53:25 +00:00
Dennis Schridde 0b09ace43a More compact versions of fminf() / fmaxf()
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
2009-02-09 04:07:44 +00:00
Dennis Schridde df6bd00d7e Provide fmaxf() / fminf() for non C99 compilers
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
2009-02-09 03:53:08 +00:00
Dennis Schridde 80e64617b2 Use faster float code for hypotf, instead of falling back to doubles
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6600 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 03:53:05 +00:00
Dennis Schridde 728c68b81e Use format strings where required (script parser)
Should fix #178

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6597 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-09 02:53:52 +00:00
Per Inge Mathisen 4cae3b8f1b Improve handling of an error in NETsendfile reported in issue #215. Add TODO about
rewriting this whole function and reference to ticket.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6580 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-03 17:02:17 +00:00
Giel van Schijndel 94cf481e0f Override operator<< for std::ostream (left operand) and PHYSFS_Version (right operand) instead of using a plain function to perform the version formatting
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6578 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-01 12:13:00 +00:00
Giel van Schijndel db0e543f40 * Fix warnings about "possibly dangerous code" added in r6570:
- 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
2009-02-01 11:54:25 +00:00
Dennis Schridde ed2a2011f6 Improve preprocessor checks for type definitions
* 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
2009-01-31 15:51:47 +00:00
Dennis Schridde e88fb88376 Detect C++98 and do not mix feature detection code with platform hacks (!!)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6571 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-31 15:51:43 +00:00
Dennis Schridde d585762747 Add a few warnings about possibly dangerous code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6570 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-31 15:51:39 +00:00
Dennis Schridde 98842001af Use bool instead of BOOL where the latter is not required
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6569 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-31 15:51:35 +00:00
Dennis Schridde f9ef8289a4 Bump SQLite3 to 3.6.10
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
2009-01-30 18:28:21 +00:00
Giel van Schijndel cb22e77099 * Check whether the system itself already provides strlcpy and/or strlcat
- 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
2009-01-24 18:15:19 +00:00
Giel van Schijndel ca71081504 Add parentheses to resolve operator precedence problems
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6552 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-11 23:35:28 +00:00
Giel van Schijndel ae18d97e54 Don't depend on OpenAL and Vorbis when compiling with --disable-sound
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6542 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-11 14:34:38 +00:00
Freddie Witherden fdf3e351c5 Add the button class; support for greyscaling disabled buttons pending.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6541 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-08 22:01:31 +00:00
Giel van Schijndel dae099706c Set the m4 macro directory in betawidget's configure script
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6540 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-07 20:05:45 +00:00
Freddie Witherden 97c0d84346 Update the svgManager, adding support for fetching the size at which an image will be rendered and cleaning up the interface for specifying the dimensions at which an image should be rendered.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6539 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-06 15:20:22 +00:00
Giel van Schijndel f224f9f2df Fix configure.ac for betawidget
* 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
2009-01-05 22:52:15 +00:00
Per Inge Mathisen 0881493713 New cheat "noassert" and new command line option "--noassert" turns off the abort functionality in ASSERT() calls.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6527 4a71c877-e1ca-e34f-864e-861f7616d084
2009-01-02 11:16:40 +00:00
Dennis Schridde 7432a0e433 More Vector conversion functions and also one to debug printf.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6520 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-30 04:04:27 +00:00
Dennis Schridde efb3a5c4ac More vector conversion constructors: 3uw -> 3f
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6504 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-26 01:46:24 +00:00
Dennis Schridde ab0d671fa6 Add Vector3i_To3uw() and Vector3i_InCircle()
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6502 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-26 00:46:35 +00:00
Elio Gubser 5514e846ee adds a feature that fits in the image in the desired width and height without loosing its proportion
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6463 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-13 15:54:21 +00:00
Per Inge Mathisen 178cb7efa9 Improve logging messages from GLC interface layer.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6455 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-12 16:35:05 +00:00
Freddie Witherden 63b23fe53a Prevent the addition of children to spacers.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6441 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-07 13:37:10 +00:00
Giel van Schijndel 7e18d7e5aa * Compile and link in svgManager.[ch] (its complaining about linker errors otherwise)
* 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
2008-12-07 03:03:50 +00:00
Giel van Schijndel d261ddbbd1 * Generate the (size_t count, const T* array) typemap using a SWIG macro
* 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
2008-12-07 01:29:59 +00:00
Giel van Schijndel c71d586739 Betawidget Lua interface:
* 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
2008-12-06 20:00:20 +00:00
Freddie Witherden 3e9530696d Commit patch #157 by Elio which adds SVG support to betawidget, along with some modifications by myself.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6437 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-06 19:43:10 +00:00
Giel van Schijndel a60dcc9b31 Alter the AC_PROG_SWIG macro:
* 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
2008-12-06 15:12:18 +00:00
Giel van Schijndel 1538c2af41 * Don't use an yyerror implementation with printf-format parsing for parsers/lexers that don't use it
- 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
2008-12-04 12:58:42 +00:00
Giel van Schijndel 550efd000a Remove unused functions setMouseDown and setMouseDown
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6429 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-03 21:16:15 +00:00
Freddie Witherden b7a866a01d Fix a typo in widgetCairoCreate and be sure to explicity set the type of anti-aliasing we want.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6428 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-03 12:11:50 +00:00
Freddie Witherden 179920cb15 Add an interator-like interface to vector.h. Based off patch #157 by Elio.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6425 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-02 21:03:13 +00:00
Freddie Witherden 670ebcd4bb Improve the Doxygen documentation for vector.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6424 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-02 20:47:21 +00:00
Freddie Witherden f25687e130 Remove an unnecessary cast in widget.c.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6422 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-01 13:12:58 +00:00
Freddie Witherden fe1954ca69 Fix some indentation errors in widget.c
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6421 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-01 12:57:13 +00:00
Freddie Witherden 0c0828cf79 Modify the event handling and propagation in betawidget; events are now passed top-down with keyboard and click events terminating once handled.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6420 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-30 23:44:16 +00:00
Gerard Krol 0906040c8b Add an option to rotate the radar when the player rotates the camera. The viewing window on the radar
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
2008-11-30 15:10:49 +00:00
Elio Gubser 28f63005bc revert changes to min/max functions, getMinSize and getMaxSize should remain un-implemented in widget.c
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6408 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-30 11:48:50 +00:00
Elio Gubser d6c203c74a added widgetGetMinSizeImpl() and widgetGetMaxSizeImpl() copied from window.[c/h],because there was an assert when using textEntry
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6407 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-30 11:27:13 +00:00
Giel van Schijndel b2b9e78bbe Use $(LUA_LIBS) instead of $(LUA_LIBTOOL) to link with Lua (the latter variable isn't defined anymore)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6398 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-26 22:17:15 +00:00
Freddie Witherden 8c92c4931b Rewrite the hBox class in terms of the table class. This helps to cut down on code duplication.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6394 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-26 20:42:03 +00:00
Freddie Witherden 6bf597ba14 Improve the tableSetPadding function that it now returns false on failure and true on success.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6393 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-26 20:40:10 +00:00
Freddie Witherden cc25793143 Fix compilation of betawidget after the source move.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6387 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-26 00:49:02 +00:00
Giel van Schijndel 0723d7a5b9 Fix compiling on MSVC:
* 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
2008-11-25 23:53:44 +00:00
Giel van Schijndel e63189b4f9 * Add libtool version information to betawidget
- 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
2008-11-23 21:38:25 +00:00
Giel van Schijndel 0e80daf989 * Don't bother trying to get at the libtool libraries (.la)
- 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
2008-11-23 21:32:26 +00:00
Giel van Schijndel 11f4f2df83 Lets generate a pkg-config .pc-file for betawidget.
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
2008-11-23 20:58:30 +00:00
Giel van Schijndel 2c1e2e282c Include tools/sdl-testapp.lua, src/betawidget.i and src/lua-wrap.h as part of "make dist" (i.e. they're required at build time)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6372 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-23 20:26:26 +00:00
Giel van Schijndel 0505129930 Lets build table.[ch] along with the rest of betawidget
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6371 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-23 20:24:16 +00:00
Giel van Schijndel 97931f21eb Move the actual library code of betawidget from lib/betawidget/ into lib/betawidget/src/
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6370 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-23 19:49:36 +00:00
Giel van Schijndel b48b300697 * Use "recursive make" to build the test apps in lib/betawidget/tools/
- 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
2008-11-23 19:32:54 +00:00
Giel van Schijndel d719e9977b Betawidget:
* 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
2008-11-23 17:57:23 +00:00
Giel van Schijndel fc808a8c89 Only #define va_copy if it isn't #defined yet
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6367 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-23 17:24:48 +00:00
Freddie Witherden 2b11839902 Fix an indentation error in table.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6361 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-22 13:55:01 +00:00
Freddie Witherden 5bca9c8df9 Add support for setting the horizontal/vertical padding of a table and fix a bug in the padding alignment code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6360 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-21 18:51:34 +00:00
Freddie Witherden 4d163dd309 Provide a complete, mostly working, table widget implementation. Unit tests are still required.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6357 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-21 18:10:56 +00:00
Freddie Witherden b278bbb4ee Add the concept of a NUL size to betawidget which is needed to allow widgets to be added to a parent-less container.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6356 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-21 17:52:21 +00:00
Giel van Schijndel ccc6206247 Add Doxygen documentation for v?asprintf
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6289 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-14 14:30:12 +00:00
Giel van Schijndel 7b37001471 Make v?asprintf return -1 on all errors (similar to GNU's implementation)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6287 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-14 14:28:21 +00:00
Giel van Schijndel 11e378ccce Allow WZ_ASSERT_STATIC_STRING to work when compiled as C++ as well
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6262 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-09 23:49:39 +00:00
Giel van Schijndel c99a123b50 * Remove unused list macros: LIST_INIT and LIST_ADD
* 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
2008-11-09 22:58:04 +00:00
Giel van Schijndel 17a0228d18 Remove unused function endian_fract
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6259 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-09 22:58:01 +00:00
Giel van Schijndel 2391ddd622 * Make the endian_*word class of functions/macros inline functions (and the type checking of their parameter) on ''all'' platforms!
* 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
2008-11-09 19:21:20 +00:00
Gerard Krol 03c11abefb Hide the mouse cursor during loading screens and movies.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6252 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-08 21:37:32 +00:00
Giel van Schijndel 03353e833e Allow the initialisation function of the debug callback to fail and report its failure through its return value:
* 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
2008-11-08 19:30:18 +00:00
Buginator c5c02052d6 Add Hack from ticket:115
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
2008-10-26 17:10:42 +00:00
Giel van Schijndel a47f0e94a7 Oops, need to copy filename template into template buffer (see r6214, r6217)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6218 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-25 22:16:13 +00:00
Giel van Schijndel a5c5328609 Make sure we take sizeof(array), not sizeof(pointer)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6217 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-25 22:11:43 +00:00
Giel van Schijndel 0269d11d16 In the exception handler:
* 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
2008-10-25 21:47:00 +00:00
Buginator 6f3419da73 Modify scrOutputCallTrace() to dump the stack on script errors, and act normally whenever it is called normally.
(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
2008-10-25 17:56:43 +00:00
Giel van Schijndel ceeb8780c7 Explain the "funny" iteration used to iterate over OpenAL devices
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6199 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-22 17:19:43 +00:00
Buginator 48eacfbc3d Dump out available devices available for openAL in the PrintOpenALVersion() function.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6196 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-21 18:40:05 +00:00
Giel van Schijndel cb2ec762e2 * Change animObj_Remove such that it doesn't set the passed in ANIM_OBJECT* pointer to NULL (i.e. a ** pointer was passed)
* 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
2008-10-16 17:40:58 +00:00
Giel van Schijndel 64910221e7 Fix several warnings that occur on NDEBUG builds:
* 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
2008-10-16 14:22:29 +00:00
Freddie Witherden 19f1175c04 Making padding a const int, as opposed to accessing it directly, in the hBox class.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6175 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-16 12:34:19 +00:00
Freddie Witherden c12227b453 Simplify the fitting algorithm for the hBox class.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6174 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-16 11:36:38 +00:00
Freddie Witherden f42ce71599 Fix a nasty typo in the hBox class which caused hBoxGetMinSize to be called for widgetGetMaxSize.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6173 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-16 11:33:49 +00:00
Freddie Witherden 3a4b246ff7 Add padding support to the hBox class; also, ensure that we set the default alignment/padding in the constructor; finally, improve the Doxygen documentation.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6172 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-16 10:38:50 +00:00
Freddie Witherden 96509127b1 Add table.[ch] which is a partially completed table container implementation.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6171 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-15 20:06:18 +00:00
Giel van Schijndel e5183abb69 Lets at least keep the comment in front of the declaration it applies to... (regardless of C89/C99, see r6162)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6164 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-15 13:18:51 +00:00
Freddie Witherden ec00337b6c Use alloca as opposed to malloc for allocating temporary storage in hBox.c.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6163 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-15 11:38:09 +00:00
Buginator 2ce52672c7 Declarations *before* statements. (To make a C89 compiler happy.)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6162 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-15 03:22:18 +00:00
Giel van Schijndel 71ddbdc5e4 Cleanup:
* Mark several parameters that aren't being used (but shouldn't be removed) with WZ_DECL_UNUSED
 * Use "(unsigned )?int" instead of "[SU](D?WORD|BYTE)" where the size guarantee is not required
 * Instead of "(X - Y) >= 0" use the logically equivalent and more readable "X >= Y"
 * Remove redundant function prototypes
 * Move variables into a more local scope where possible
 * Assign the result of an expression to a variable once so that the expression doesn't have to be duplicated several times
 * Move constant UNALLOCATED_OBJECT out of the header and into the only source file where it's ever used

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6160 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-14 21:03:23 +00:00
Giel van Schijndel 1df1706440 * Fix several "comparison between signed and unsigned" warnings
* Const correctness
 * Use "(unsigned )?int" instead of "[SU](D?WORD|BYTE)" where the size guarantee is not required


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6158 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-14 20:42:20 +00:00
Giel van Schijndel ec4867f297 dirtyHypot() cleanup:
* Implement hypot() and hypotf() on non-C99 systems
 * Wherever the parameters to dirtyHypot() are signed: use hypotf() instead
 * Move some variables in to a more local scope
 * Merge the conditions of some nested if-statements
 * Get rid of some stupidly named variables (tempx and tempy are ''not'' good variable names, the names should indicate ''what'' the variables contain, not for how long)
 * Remove some unnecessary casting between float and [SU]DWORD


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6157 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-14 20:25:41 +00:00
Giel van Schijndel 29d7c7abfd Fix the raw win32 makefile system which got broken in r6144 and r6145:
* The lexers depend on the parser's headers so make sure to compile the parsers first
 * Move a misplaced line-wrapping backslash in src/makefile.win32


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6153 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-14 18:28:21 +00:00
Giel van Schijndel 55aaffac40 Construct programPath from the iterators of "buf" not from a char* pointer
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6152 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-14 13:00:36 +00:00
Giel van Schijndel 5f5489b650 * Stuff SESSIONDESC.dwUser[1-4] in an array: SESSIONDESC.dwUserFlags\[4]
* Rewrite NETgetGameFlagsUnjoined such that it's not hardcoded for its `flag` parameter anymore

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6150 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-14 12:58:59 +00:00
Giel van Schijndel 0c1a577ee7 * Use GlobalAlloc and GlobalFree instead of malloc() and free() respectively
Do this because we cannot trust malloc()'s heaps to be intact at the time an exception handler gets called.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6146 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-13 15:41:50 +00:00
Giel van Schijndel 810fac209b * Wrap all file lists in the automake and win32 makefiles across lines such that there's only one file on each line
* Alphabetically sort the file lists

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6144 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-13 13:04:37 +00:00
Buginator 6a70a7750d Changes the 'optional file not found' from LOG_WARNING to LOG_WZ, because of too much spam.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6131 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-11 19:15:08 +00:00
Freddie Witherden aa447545b2 Outlaw the use of SDL_SetGamma (patch #83). This closes ticket #83. Approved by Giel.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6129 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-11 10:51:53 +00:00
Buginator 31b3895caf Closes & fixes ticket:99
Using --nosound is handled correctly for the FMVs now.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6125 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-11 03:21:03 +00:00
Giel van Schijndel d871a85964 Add video playback support:
* Add support for decoding and displaying of OggTheora/Vorbis videos
 * Change all references to *.rpl files to *.ogg files (and lower case them)
 * Add a new menu (and config) option for selecting the size at which to display videos (1x (native), 2x, full screen)

This closes ticket:64 and ticket:46

Code changes are ticket:64 (patch by Gerard Krol, Giel van Schijndel and Buginator)

FMVs can be found at http://download.gna.org/warzone/videos/sequences_ogg.zip (for now at least)
Videos encoded by Angus Lees


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6119 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-08 18:24:19 +00:00
Giel van Schijndel 58117a87c0 * Remove duplicate sound effect pcv483.ogg
* Rename pcv483.ogg to power-transferred.ogg


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6117 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-04 21:49:58 +00:00
Giel van Schijndel df801f1b08 * Make seq_Play const correct
* Use "bool" instead of "BOOL" for the return types of lib/sequence functions

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6112 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-04 18:45:18 +00:00
Giel van Schijndel 77d7490ed3 Move all header content of math-help.h inside its header guards
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6111 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-04 12:34:42 +00:00
Giel van Schijndel a74c27019d Make sure to #define the [SU]BYTE_(MIN|MAX) and [SU]D?WORD_(MIN|MAX) constants in terms of the U?INT(8|16|32)_(MIN|MAX) constants
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6110 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-04 12:09:58 +00:00
Giel van Schijndel 953a3a998b Allow #including lib/framework/types.h without lib/framework/frame.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6109 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-04 12:09:53 +00:00
Buginator 4971f0cdcd Adds a message to the console when screenshot key is hit.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6108 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-04 03:31:18 +00:00
Per Inge Mathisen 4a9c00e469 Revert tagfile changes in r6084, r6080 and r6079. Apparently not ready for the unwashed masses yet.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6102 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-02 21:50:05 +00:00
Per Inge Mathisen b66897f058 Port to trunk the fix for virtual group recursion from tagfile branch. Add unit test to ensure
it never comes back.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6084 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-26 19:14:56 +00:00
Per Inge Mathisen 87bf67480e Also port over the required fixes for tagfile.c, or previous commit will not work.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6080 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-26 17:48:33 +00:00
Per Inge Mathisen 6fc021819c Do a dummy load of basic object data from tagfile to stress test tagfile system. Ported from work in tagfile branch.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6079 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-26 17:45:18 +00:00
Per Inge Mathisen 68ca9bef81 Fix tagfile type definition
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6078 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-26 17:39:10 +00:00
Giel van Schijndel 2cea275cb5 * Fully define struct timeval (not just forward declare)
* Forward declare struct timezone


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6063 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-20 23:42:48 +00:00
http://www.openasthra.com/c-tidbits/gettimeofday-function-for-windows/ 05f7761bab Add a gettimeofday() implementation for Windows
Epoch and hint to use GetSystemTimeAsFileTime taken from: http://www.openasthra.com/c-tidbits/gettimeofday-function-for-windows/

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6062 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-20 23:24:17 +00:00
Giel van Schijndel becaf21060 Revert r6058: I stupidly used "git svn dcommit" instead of "git stash pop" (yes I know they don't even look the same...)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6059 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-20 15:54:41 +00:00
Giel van Schijndel 53d6990a55 Initial FMV support
patch: http://developer.wz2100.net/attachment/ticket/64/FMV5c.patch

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6058 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-20 15:52:01 +00:00
Freddie Witherden 784b40d2a0 Slight cosmetic improvement to the window alignment code (factoring out a / 2).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6049 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-18 22:56:36 +00:00
Freddie Witherden ba9c453857 Make sure we correctly enable double buffering for SDL.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6048 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-18 22:21:08 +00:00
Freddie Witherden 6e3ff77160 Vsync for the win, also enable double-buffering.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6047 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-18 22:10:40 +00:00
Freddie Witherden f499f08a49 Use glPushMatrix and glPopMatrix when compositing as opposed to manually restoring it.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6046 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-18 21:56:02 +00:00
Freddie Witherden 994e2d3938 Fix radar corruption under nVidia/Intel cards. This closes ticket #72.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6042 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-18 17:45:16 +00:00
Freddie Witherden dc878823c2 Fix the inclusion of GLEE in betawidget; this fixes the blending problems under nVidia Linux. Plus some minor indentation fixes.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6037 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-18 11:24:36 +00:00
Giel van Schijndel 10ac89541a Update our SQLite copy from 3.5.9 to 3.6.2
* 3.6.0 introduced an interface change to the VFS layer
 * Updated physfs_vfs.c for the interface change in 3.6.0, breaking compatibility with SQLite < 3.6.0
 * Change the configure script to require sqlite3 >= 3.6

This closes ticket:66

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6034 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-16 20:02:16 +00:00
Giel van Schijndel 73bd4b81f9 Don't #define DATADIR when compiling SQLite as it causes conflicts with some Windows headers (objidl.h:95)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6029 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-15 06:06:59 +00:00
Giel van Schijndel 043cc9d278 Fix a spelling error in the MSVC project files causing problems with the #include path
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6027 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 19:47:56 +00:00
Giel van Schijndel ff507b13f0 * Don't use "if USE_SYSTEM_SQLITE" sections in all Makefiles
* Use the pkg-config variables SQLITE_CFLAGS and SQLITE_LIBS to compile and link with instead


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6021 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 14:41:44 +00:00
Freddie Witherden 26444e8e07 Switch from a virtal method to an event handler for re-generating the window's pattern.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6020 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 13:49:37 +00:00
Giel van Schijndel 9d7a8e8d43 Update our SQLite copy from 3.5.4 to 3.5.9
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6019 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 13:48:22 +00:00
Giel van Schijndel 140f553d06 * Change the autotools build system such that if the system provides an SQLite version that meets our requirements we use that instead of the one in our own repository
* Require sqlite3 versions >= 3.5.4 and < 3.6 (due to r5984 these versions are possible)
 * Move physfs_vfs.[ch] from lib/sqlite3/ to lib/framework/
 * Update the autotools, raw win32 Makefile, Code::Blocks and MSVC build systems
  - NOTE: Xcode still requires an update

This closes ticket:59


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6018 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 13:40:28 +00:00
Giel van Schijndel e2fa071a02 Replace the custom crafted Lua interface code for the addEventHandler and addTimerEventHandler methods of class widget with a SWIG typemap
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6017 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 13:27:03 +00:00
Giel van Schijndel 4d79c24838 * Add Lua support for widget animations
* These can be defined using Lua tables; see the example code in sdl-testapp.lua

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6016 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 13:26:48 +00:00
Giel van Schijndel 8681483c7d Make sure to translate before scaling in widgetCompositeImpl as that yields in-place scaling as opposed to scaled translating
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6015 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 13:16:49 +00:00
Giel van Schijndel e3c884a249 When resizing windows make sure to resize their gradient as well
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6011 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 01:34:16 +00:00
Giel van Schijndel e766b2f605 Allow Lua event handlers to remove themselves (i.e. don't segfault in that case)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6010 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 01:32:59 +00:00
Giel van Schijndel 41e74888ef Make sure to use "destroy" as the method name in lua_widget_destroy for error message generation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6009 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 00:48:29 +00:00
Giel van Schijndel ee7cfc1ac5 * Add enum spacerDirection and its contents to the Lua betawidget module
* Add method `destroy` to the Lua class `widget` and its children in the betawidget module
 * Add some code that demonstrates the usage of widget:destroy() and its current flaws (i.e. segfaults ''will'' occur when using widget after calling the destroy() method on it, garbage collection is included in "using")


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6008 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-14 00:37:20 +00:00
Giel van Schijndel c661cb9bc4 * Don't use a single cairo_pattern to store the window gradient for ''all'' windows
* Use a separate cairo_pattern for each window to store the window gradient in


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6007 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-13 23:15:44 +00:00
Giel van Schijndel a2a22b3804 Check both the `lua5.1` and `lua` pkg-config package in betawidget's ./configure script
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6006 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-13 22:36:47 +00:00
Giel van Schijndel 123551b6b6 Initialise the network buffer to send GAMESTRUCTs from across to zero
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6004 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-13 20:39:26 +00:00
Giel van Schijndel 07e8a802f9 Remove the last remnants from platform selection in betawidget/Makefile.am
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6003 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-13 18:36:33 +00:00
Giel van Schijndel ea446b8653 * Use recursive make (through SUBDIRS) to build the `platform` portion of betawidget
* Compile the utility part we use from Warzone (framework/utf.c and ivis_opengl/GLee.c) separately


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6002 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-13 18:35:26 +00:00
Elio Gubser 2395064bc8 outsourced the pathing function from windowDoDrawMaskImpl and windowDoDrawImpl, corrected some obvious nasty bugs
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5998 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-12 18:58:18 +00:00
Elio Gubser 413cc540a9 outsourced the pathing function from windowDoDrawMaskImpl and windowDoDrawImpl, corrected some obvious nasty bugs
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5997 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-12 18:52:23 +00:00
Elio Gubser 426f09cf9b nicer window design implemented
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5996 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-12 18:05:28 +00:00
Per Inge Mathisen 704117f85c Fix various doxygen errors and warnings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5992 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-11 18:25:34 +00:00
Per Inge Mathisen be263e0b8c Fix missing define of WZ_DECL_THREAD on windows
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5991 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-11 18:16:06 +00:00
Giel van Schijndel 50c974f74b Install all betawidget headers into $(pkgincludedir)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5988 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-11 07:56:28 +00:00
Giel van Schijndel 6088fca5af * Make xGetTempname (from the PhysicsFS VFS for SQLite) return a bogus filename to keep SQLite happy
- We can safely catch the only one case where this filename is used (see comment in diff for an explanation)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5984 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-09 20:07:16 +00:00
Freddie Witherden 4bb879d64c Make sure we fill out the event structure for EVT_DESTRUCT events.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5983 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-09 18:10:06 +00:00
Giel van Schijndel 6061eb40d9 Add an example of window/widget destruction by means of employing the garbage collector (this should be improved to something like widget:destroy())
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5980 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-09 11:33:40 +00:00
Giel van Schijndel 9177d9cf2f * Register widgetGetTime() as betawidget.getTime() in Lua
* In the Lua test app use betawidget.getTime() to determine the *true* amount of time passed since registering of the timer event


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5979 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-09 11:17:38 +00:00