Commit Graph

4698 Commits (cc94bc2818494ff9590361a66f1b1c4fac43f669)

Author SHA1 Message Date
Freddie Witherden cc94bc2818 Allow for event handlers to have separate (optional) destructors.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5868 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-24 16:58:27 +00:00
Giel van Schijndel fd0084951e Prevent some infinite recursion
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5867 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-24 16:13:20 +00:00
Giel van Schijndel 360dc86ef4 * Make CHECK_OBJECT, CHECK_PROJECTILE and CHECK_STRUCTURE macros that redirect to a function
* Add two new files: src/baseobject.[ch]
 * Have CHECK_OBJECT call any of CHECK_DROID, CHECK_PROJECTILE or CHECK_STRUCTURE depending on the object's type
 * Change CHECK_DROID and checkDroid to use the AT_MACRO to get the current filename and line number
 * Change checkDroid to use ASSERT_HELPER to provide the source of the assertion

NOTE: The autotools, Code::Blocks, win32 Makefiles and MSVC buildsystems are updated, Xcode will still require an update

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5866 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-24 15:56:00 +00:00
Giel van Schijndel 173ee31214 * Split ASSERT out into ASSERT_HELPER:
* ASSERT_HELPER can be used by debug functions that wish to alter the location information attached and printed with ASSERTs
 * Add some missing semi-colons (the previous ASSERT macro had a terminating semi-colon)
 * Change an ASSERT that checks calloc's return value into an if() block (we can also run out of memory on non-debug builds...)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5865 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-24 15:42:59 +00:00
Giel van Schijndel 213070da95 Make function packageCheck const correct
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5863 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-24 14:29:14 +00:00
Giel van Schijndel 50519cff38 * Add some Doxygen comments
* Improve some comments
 * Separate parameters with both a comma and a space, i.e.: ", "
 * Make ForceDroidSync take its psDroid parameter const
 * Add some whitespace to enhance readability (as readability is a very important part of maintainability)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5862 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-24 13:42:17 +00:00
Giel van Schijndel f957004f2c * Improve some comments
* Fix some typos
 * Separate parameters with both a comma and a space, i.e.: ", "
 * Turn a debug(LOG_ERROR for a condition that should never happen into an ASSERT


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5861 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-24 12:41:59 +00:00
Giel van Schijndel 19b72f1ce5 * Use alGetError() instead of sound_GetError() to clear error codes (the latter will also dump a debug message to LOG_SOUND)
* Remove some redundant debug(LOG_NEVER calls (they're preceded by a sound_GetError() call which will already dump that info)
 * Improve some comments
 * Log sound errors to LOG_SOUND, not to LOG_NEVER
 * In sound_DestroyStream make sure to bail out when we fail to retrieve the buffer count (as that could cause memory over-allocation)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5860 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-24 12:41:10 +00:00
Giel van Schijndel dad708f73d Update the French translation: add 83 new translated strings
Patch #1098 by Cassarin-Grand Arthur <zoloom>


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5858 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-24 11:10:00 +00:00
Buginator 82966293ad Fixes a openAL case where we didn't check if a openAL call failed or not.
(NOTE, this is really a temp fix, so it don't crash/cause more openAL errors. The sound code need a rewrite to correctly fix this problem)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5853 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-23 19:44:00 +00:00
Buginator 0ab4d2b32c Fixes r5507 (trunk) & r5568 (branch) and closes bug # 12219 , and report of same bug in forms.
Issue was, orders were not given to pre positioned droid units.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5849 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-23 18:35:59 +00:00
Freddie Witherden 30712505f1 Add the ability to check if an id is a valid event handler or not.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5844 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-21 16:19:51 +00:00
Freddie Witherden 45ba680eb6 Convert a warning in betawidget to an assert; ensure that when adding a child that it has no parent.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5843 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-21 13:46:12 +00:00
Buginator 81395a05b3 Prevents a division by 0 error reported in the forums.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5842 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-21 03:16:31 +00:00
Per Inge Mathisen cf7c584399 patch #1095: Make font configurable
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5841 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-20 21:23:58 +00:00
Freddie Witherden 34e4246bd4 Fix a couple of typos and a compiler warning in betawidget.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5840 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-20 13:05:44 +00:00
Buginator e8f4edbb56 Fixes bug #12053
After a SP game has ended, needed to reset the search path back to mod_multiplay. 

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5839 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-19 05:07:06 +00:00
Buginator 807549b8e2 Fixes bug #12116
Cyborg transports now can load/unload correctly.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5838 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-18 03:28:03 +00:00
Freddie Witherden d3881835d0 Make the id of a widget a const char*.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5837 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-17 20:51:59 +00:00
Per Inge Mathisen 1f806cbb2e Add ugly workaround for buggy maps created by the map editor, where the number of terrain
are apparently larger than the maximum. Reported by gronlund on IRC.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5836 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-17 20:51:57 +00:00
Buginator ebecb854b1 Add a fallback for the map preview when drivers report they have FBO, but we detect a FBO error.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5835 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-17 18:35:22 +00:00
Freddie Witherden 077cfee020 Add widgetGetCurrentlyMousedOver to return the widget that currently has the mouse over it.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5834 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-17 18:22:38 +00:00
Buginator eaffd089b3 Added visual feedback for when there are no games available in the lobby, we notify the user of that fact.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5833 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-17 18:18:31 +00:00
Freddie Witherden dd5a740143 Update the Doxygen comments for betawidget.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5830 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-16 17:49:52 +00:00
Freddie Witherden 38cef47896 Fix some compiler warnings for window.c.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5824 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-15 23:28:03 +00:00
Per Inge Mathisen 30af74e59d Mostly cosmetic cleanup of action update code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5823 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-15 21:48:58 +00:00
Per Inge Mathisen 4cfdec7d58 Remove some dead code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5822 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-15 20:40:38 +00:00
Giel van Schijndel 535c97354f Add Doxygen comments to functions screenDoDumpToDiskIfRequired and screenDumpToDisk
"Poked" by ticket:23 to add these API-level comments, but the comments themselves are completely different.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5821 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-15 20:27:18 +00:00
Giel van Schijndel b8e75ddfbe Make sure to use a `\` (back slash) when breaking lines in Makefiles
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5820 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-15 19:37:46 +00:00
Freddie Witherden 237fbd2514 Add more granular window positioning functions to Betawidget.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5819 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-15 19:29:57 +00:00
Freddie Witherden c51ae395ce Fix a potential memory leak in hBox.c, plus some minor cleanup.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5818 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-15 10:28:48 +00:00
Freddie Witherden d8aca5b13f Add animation support to betawidget (#27), improvements to follow.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5817 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-15 09:59:11 +00:00
Freddie Witherden 4718a24ede Add a preliminary window class. Todo:
* More granular control over window position (relative offsets &c);
 * frame drawing code.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5816 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-14 22:04:10 +00:00
Per Inge Mathisen 1cbb4857b7 wzmviewer: Fix animation support. Add oil derrick sample WZM file for testing. Notice that I have
inverted the rotation numbers, and done away with the multiplied by 1000 from the ANI file format.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5815 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-14 21:23:08 +00:00
Per Inge Mathisen 77f057bd08 Fix team colours in naval PIE propulsion file.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5813 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-14 20:13:18 +00:00
Elio Gubser 1465f18367 reversed first line because order green, orange, grey... is hardcoded
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5812 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-14 20:07:11 +00:00
Per Inge Mathisen 419e25b44f pie2wzm: Fix wrong guesswork on import of team colours.
wzmviewer: Clean up team colour and animation confusion. Update to latest WZM spec.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5811 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-14 20:03:35 +00:00
Giel van Schijndel 4a1c068930 Fix typo in Dutch translation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5809 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-14 15:14:13 +00:00
Freddie Witherden d6da0800f9 Redo the layout for the entire window when a child widget is added or removed.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5808 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-13 22:19:44 +00:00
Freddie Witherden 96e327b46c Add GPLv2 or above licensing cruft to betawidget.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5807 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-13 22:00:17 +00:00
Per Inge Mathisen 44861ebd89 Add naval propulsion PIE model and texture.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5803 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-13 19:15:55 +00:00
Freddie Witherden ab0ba130de Use a triangle strip as opposed to quads for widget compositing.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5802 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-13 16:25:36 +00:00
Freddie Witherden a0384da56a Do not allow setting of widget->offset directly, instead use a setter method.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5801 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-13 11:21:58 +00:00
Freddie Witherden f66a96b560 Add drag support to betawidget. This closes ticket #30.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5800 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-12 13:00:40 +00:00
Freddie Witherden fb6b8d30b6 Clean up the mouse motion event handling code somewhat.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5799 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-12 11:27:54 +00:00
Freddie Witherden 2d54d1b25b Update the doxygen documentation for betawidget some more.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5798 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-11 19:03:48 +00:00
Freddie Witherden c6c9aeb0c6 Extend the mouseEvent structure so that it also contains the location of the previous mouse event.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5797 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-11 17:18:26 +00:00
Giel van Schijndel 2b572a9492 Work around the fact that on FreeBSD POLL_ERR and POLL_HUP are defined to the same value
This problem is similar to DebianBug:492786

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5795 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-11 15:29:51 +00:00
Giel van Schijndel 5e593ad615 Add platform detection code for GNU/kFreeBSD (OS with FreeBSD kernel and GNU utilities and libraries) to allow compiling on this system
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5794 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-11 15:29:44 +00:00
Giel van Schijndel 1e2717ee8f Add a line break ('\') in src/Makefile.am which got removed in r5696
This closes ticket:29 patch by <skellr>

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5793 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-11 10:45:28 +00:00