Commit Graph

2148 Commits (bb3975f0892bd49850f79de513ecee70e5d39a84)

Author SHA1 Message Date
Freddie Witherden c174efd0c7 Fix a typo in the doxygen documentation for widget.h.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5959 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 21:10:31 +00:00
Buginator 21fdab0117 Modify debug output to specify the 'real' directory that physfs is using for the file in question.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5958 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 20:00:54 +00:00
Freddie Witherden a7eee1378d Pass the ID of an event handler to destruct events the same way as we would to regular events.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5953 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 16:58:46 +00:00
Freddie Witherden 50747b6e53 Fix compilation of betawidget/platform/sdl/event.c.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5952 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 15:31:34 +00:00
Freddie Witherden b827f0b7d6 Add support for text events to betawidget.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5951 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 14:05:55 +00:00
Freddie Witherden c670477709 Fix the include paths for clipboardWin32.c
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5950 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 13:57:01 +00:00
Freddie Witherden 19345a8d2e Fix the X11 clipboard code so that it now waits for a response before attempting to fetch the data; also make it request a UFT-8 string.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5949 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 13:35:39 +00:00
Giel van Schijndel d4923de07a Conditionally compile in one of platform/sdl/clipboard* depending on the host platform we're compiling for
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5946 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-06 22:39:43 +00:00
Giel van Schijndel d40084dadc Take care of #including utf.h and the content of <stdbool.h> and <stdint.h>
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5943 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-06 17:20:34 +00:00
Giel van Schijndel 01c6ba831c Allow compiling of utf.c outside of framework's debug facilities (i.e. allow it to be used in betawidget)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5942 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-06 16:20:06 +00:00
Giel van Schijndel 330d599916 Apparently betawidget depends on GLee and utf.[ch], so make sure to compile those along
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5941 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-06 16:11:30 +00:00
Giel van Schijndel bdae8ce9ef Only #include types.h in utf.h as we don't depend on the entire framework
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5940 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-06 16:02:26 +00:00
Giel van Schijndel e9ea1df8d9 * Move the addition of SDL's stuff to CPPFLAGS and LIBS to the "platform selection" part
* Make sure to also check for and link against OpenGL


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5939 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-06 15:50:48 +00:00
Giel van Schijndel 6150e58b45 * Make sure that we only have a compile and link time dependency on Cairo when compiling and linking betawidget, not when using it
* When only compiling and linking against betawidget just forward declare cairo_t


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5938 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-06 15:38:31 +00:00
Giel van Schijndel a8aa84dec4 Use libtool for compiling and linking of betawidget
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5937 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-06 15:05:55 +00:00
Giel van Schijndel 5ce8de3abe Add a perliminary buildsystem for betawidget (autotools buildsystem)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5936 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-06 13:26:03 +00:00
Freddie Witherden 2547bdcf29 Revert the changes to window.[ch] which were committed by accident in r5931.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5933 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-06 12:31:44 +00:00
Freddie Witherden 04e2f5f82b Update the widget animation callback to use widgetReposition as opposed to setting the position directly.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5932 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-06 12:26:27 +00:00
Giel van Schijndel 906f766b8a * When using a va_list multiple times make sure to va_copy it first
* Make sure to call va_end on all instances of va_list when we're done with it

Similar to r5930 (which fixed ticket:50)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5931 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-05 20:10:47 +00:00
Giel van Schijndel 37c6b31651 * When using a va_list multiple times make sure to va_copy it first
* Because va_copy is C99 provide a fallback for it on non-C99 systems (which assumes that va_list is just a pointer to the stack)

This fixes ticket:50, thanks to Buginator for finding the cause (though this solution is different from his suggestion)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5930 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-05 19:38:22 +00:00
Freddie Witherden 548c43e6e3 Add support for resize and reposition events to betawidget.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5929 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-05 17:05:56 +00:00
Freddie Witherden 9deaad010d Simplify event creation by adding a helper function to generate the base structure.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5927 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-05 15:03:21 +00:00
Freddie Witherden 4c70b5eb7a Fix a bug similar in ilk to that fixed in r5925, except for vertical as opposed to horizontal window alignment.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5926 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-03 21:36:28 +00:00
Freddie Witherden ad1a6db74e Fix a bug in the window alignment code, thanks to Elio for reporting it.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5925 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-03 19:05:29 +00:00
Freddie Witherden 79df709d5b Improve the Doxygen documentation for widget.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5924 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-03 19:02:39 +00:00
Freddie Witherden 7453cee5bb Add textEntry class (warning: unfinished) to betawidget.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5920 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-02 17:53:34 +00:00
Freddie Witherden a31fbb4561 Minor indentation fix to clipboardWin32.c.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5919 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-02 16:31:42 +00:00
Freddie Witherden 2a8cee26b5 Re-write the Windows clipboard support; Unicode is now supported; add support for setting clipboard text.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5918 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-02 16:27:00 +00:00
Freddie Witherden bef604763f Add an nbytes parameter to UTF8toUTF16 and UTF16toUTF8 which allow for fetching the number of bytes allocated.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5917 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-02 14:37:01 +00:00
Freddie Witherden a8709983e0 Commit the final patch of patch #45; this cleans up utf.[ch].
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5916 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-02 11:21:12 +00:00
Giel van Schijndel 99fe22e0a4 Don't accept out-of-range Unicode codepoints in function unicode_utf8_char_length either
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5915 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-01 19:16:00 +00:00
Giel van Schijndel aabf08d6fa Change the UTF-8 encoder and decoder to only accept valid Unicode codepoints, not just every representable 32 bit unsigned integer
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5914 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-01 19:10:03 +00:00
Giel van Schijndel 0e88a86b8e Add two new functions: utf(8|16)_char_at_offset, which return a pointer to the index-th character in the given stream
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5911 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-31 20:39:17 +00:00
Giel van Schijndel f0f68e7386 Rename utf8.[ch] to utf.[ch] because it deals with different UTFs (Unicode Transformation Format) but not just specifically with UTF-8
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5910 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-31 20:06:40 +00:00
Freddie Witherden de59586edf Fix compilation of betawidget on OS X; ensure we correctly restore the layout if a child could not be added.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5905 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-31 10:17:09 +00:00
Freddie Witherden 8114b1e71f Fix a bug in the window alignment code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5904 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 18:14:58 +00:00
Freddie Witherden 2f1cb8dcdc Add widgetSDLInit and widgetSDLQuit to initialise and uninitialise the widget system under SDL.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5903 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 17:15:43 +00:00
Giel van Schijndel d3eaf3bbd1 Add several new functions for converting between UTF-8 and UTF-16 to utf8.[ch]
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5902 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 15:15:16 +00:00
Giel van Schijndel a0cdfd44ab Rename utf8_(encode|decode) to utf8_(encode|decode)_utf32 because they convert between UTF-8 and UTF-32
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5901 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 15:15:09 +00:00
Giel van Schijndel dfa9c2bc01 Rename function unicode_strlen to utf32_strlen because it really determines the length of a UTF-32 encoded string
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5900 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 13:49:11 +00:00
Giel van Schijndel 2cb4c71883 * Split out the code that encodes a single Unicode character as UTF-8 into a separate function: encode_utf8_char
* This will allow encoding of Unicode strings to UTF-8 regardless of its current encoding

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5899 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 13:47:15 +00:00
Giel van Schijndel ac08ca70b0 * Seperate out the part that determines a single Unicode character's (codepoint actually) length when encoded as UTF-8 into a separate function: unicode_utf8_char_length
* This will allow determining of the length of a string when encoded as UTF-8 regardless of its current encoding

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5898 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 13:47:06 +00:00
Giel van Schijndel 5222037799 Move the duplicated UTF-8 decoding code out of functions utf8_character_count and utf8_decode and into new function decode_utf8_char, which only decodes a single UTF-8 character sequence
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5897 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 13:24:27 +00:00
Giel van Schijndel b10871a0ab Add utf8.c to the win32 makefile system (which I forgot in r5895)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5896 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 12:38:26 +00:00
Giel van Schijndel d45e64bf55 Reintroduce utf8.{c,h} for encoding and decoding UTF-8 strings
This is meant to be used with betawidget

This is a revert of r2477 (which removed the UTF-8 module)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5895 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 12:34:46 +00:00
Freddie Witherden 0d58106de3 Make tool-tip events irrelevant for child widgets.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5894 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 10:36:52 +00:00
Freddie Witherden cef3ce8060 Improve the Doxygen documentation for clipboard.h; make the return value of widgetSetClipboardText on OS X mean something.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5893 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-30 10:02:28 +00:00
Freddie Witherden d5b0c12182 Slight refactoring of X11 clipboard code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5892 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-29 22:38:26 +00:00
Freddie Witherden e952b616c2 Remove a printline from the X11 clipboard code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5891 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-29 18:59:29 +00:00
Freddie Witherden 0f46539a45 Add clipboard support for X11.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5890 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-29 18:42:54 +00:00
Giel van Schijndel 37c6aa9fd6 Make sure to clean up the sound streams as well in function sound_ShutdownLibrary()
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5884 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-28 20:12:47 +00:00
Freddie Witherden a06bb014df Add partially-finished SDL wrapper code to betawidfet.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5881 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-28 15:34:21 +00:00
Ari Johnson d5b341334d More changes from #ifdef __APPLE__ to #if defined(WZ_OS_MAC)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5880 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-27 15:24:21 +00:00
Freddie Witherden 94bbbf4250 Re-organise betawidget as proposed on the mailing list; add paste support for Win32 (needs testing).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5876 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-26 11:01:17 +00:00
Freddie Witherden 2ea48df684 Fix some more typos in widget.h and correct the indentation.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5875 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-25 20:37:41 +00:00
Freddie Witherden 9e605318d9 Add font.[ch] which abstract Cairo's internal font setting routines.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5874 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-25 18:25:13 +00:00
Freddie Witherden 125dc19e04 Fix a typo in clipboard.h.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5873 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-25 18:19:38 +00:00
Freddie Witherden c699aca070 Include <stdbool.h> in clipboard.h as opposed to clipboardOSX.m; fixing a potential compiler error.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5872 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-25 18:04:21 +00:00
Freddie Witherden 55be99a19d Add sync-to-vblank support to Warzone; this closes ticket #38.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5871 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-25 18:01:49 +00:00
Freddie Witherden 4266827565 Add copy/paste (clipboard) interface to betawidget, along with an OS X implementation.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5870 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-25 17:30:09 +00:00
Freddie Witherden e48b37f6c0 Add tool-tip support to betawidget.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5869 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-25 15:56:58 +00:00
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 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 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
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
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
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
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
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
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 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
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
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
Freddie Witherden dd3944c26c More const-correctness for betawidget.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5792 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-11 10:27:11 +00:00
Freddie Witherden 421335008a Improve const-correctness in betawidget.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5791 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-10 22:51:12 +00:00
Freddie Witherden b752595aae Add the implementation-defined widgetGetTime() function (which returns the current time in ms).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5789 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-10 12:43:45 +00:00
Freddie Witherden 0c527f5c38 Update the doxygen documentation for betawidget.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5788 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-10 11:12:42 +00:00
Freddie Witherden 7403707e37 Ensure that we set the event type correctly for timer events.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5787 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-09 20:52:51 +00:00
Freddie Witherden 0440da3f48 Make it possible to get and set the user-data of event handlers.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5786 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-08 18:15:50 +00:00
Freddie Witherden b8d25a33e2 Fix another (and with any luck the last) bug in vector.c.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5785 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-08 17:16:00 +00:00
Giel van Schijndel 9fb5fd1718 * Add a new function `Vector2f_To2i` to convert float vectors to integer vectors
* Add 4 new functions `Vector[23][fi]_LinearInterpolate` which linearly interpolate the position between to points at a certain distance from the starting point

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5784 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-08 15:49:24 +00:00
Per Inge Mathisen 6f89f25b80 Attempt fix for bug #12118: Could not find string for ID. Has high risk for creating
more asserts - please report them to me.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5781 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-07 15:40:21 +00:00
Giel van Schijndel 81005f3605 Remove the status check for GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT as it was removed from the GL_EXT_framebuffer_object extension and Mac OSX doesn't provide it
Deletion suggested by Buginator. This should fix bug #12136

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5777 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-04 20:58:28 +00:00
Giel van Schijndel 7980737e77 * Use ssprintf instead of snprintf to print into a statically sized string
* Reduce the nesting inside Init_FBO
 * Bail out of Init_FBO as soon as we discovered that FBOs are unavailable

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5771 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-03 22:56:38 +00:00
Giel van Schijndel ef72bf0a43 * "Upgrade" the function comments for NETsendGAMESTRUCT and NETrecvGAMESTRUCT to Doxygen comments
* Restore the empty lines removed in r5732
 * Add a note to GAMESTRUCT containing a list of elements that need to be updated when GAMESTRUCT's definition changes

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5770 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-03 21:34:18 +00:00
Giel van Schijndel 83159f335d Coding style:
* Fix indentation
 * Don't repeat function prototypes in their pre-leading comments
 * "Upgrade" some function comments to Doxygen comments
 * Remove whitespace from the end of lines
 * Reintroduce empty lines removed in r5733

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5769 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-03 21:06:39 +00:00
Buginator 38c54928d3 Delete the FBO (if we are using it) when done with it, and also fix a whitespace issue. :S
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5765 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-03 19:36:02 +00:00
Giel van Schijndel a293a90e76 * Rename audio_Get3DPlayerPos to audio_GetPlayerPos and change it to return a Vector3f instead
* Rename audio_Get3DPlayerRotAboutVerticalAxis to audio_GetPlayerOrientation and change it to return two Vector3f's with a forward and upward pointing vector in it (which can be directly used by OpenAL)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5763 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-03 17:51:43 +00:00
Giel van Schijndel 9b8b577bff * Use deg2radf for degree to radian conversion instead of doing the multiplication ourself
* Use Vector3f_Mult to multiply all members with some number instead of doing it manually

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5762 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-03 17:51:30 +00:00
Giel van Schijndel 4c19888cba * Move the fixed point cruft used for representation of degrees and some matrix math into a seperate header: piefixedpoint.h
* Update the autotools, win32 makefiles, Code::Blocks and MSVC build systems

NOTE: Xcode will need an update for this


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5761 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-03 16:04:41 +00:00
Buginator 8aabfd23b2 If we are going to check for a extension, we should do it correctly.
In this case, check GLEE_EXT_framebuffer_object.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5758 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-03 02:37:02 +00:00
Freddie Witherden 54df5e1b9e Add a special EVT_DESTRUCT event to give event handlers a chance to clean-up/free any resources they have allocated.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5757 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-02 22:56:14 +00:00
Per Inge Mathisen 9699a5080f Improve logging from assert when number of context variables don't match.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5748 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-02 20:54:45 +00:00
Per Inge Mathisen 98bd943cc3 patch #1092: Remove some warnings reported by gcc when compiling lib/netplay/netplay.c by Bertrand Coconnier
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5747 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-02 20:23:37 +00:00
Giel van Schijndel 12612cefc4 Add two new functions:
* Vector3f_ToRadians to convert a rotation vector (Euler angles) from degrees to radians
 * Vector3iPSX_To3fDegree to convert the PSX "wannabe-float" degree vectors into a vector of ''real'' floats, with ''real'' degrees (i.e. 360 is completely round, instead of 65536 representing that)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5745 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-02 17:48:14 +00:00
Giel van Schijndel 5265103c2d Add two new functions Vector3f_EulerToForwardVector and Vector3f_EulerToUpVector which compute a forward and up vector from a rotation vector in Euler angles (pitch, yaw and roll)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5744 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-02 17:30:25 +00:00
Freddie Witherden ed5b269cbd Some cosmetic changes to widget.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5740 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-02 15:47:41 +00:00
Freddie Witherden bfa3f7173c Fix yet another bug in vector.c.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5739 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-02 15:38:11 +00:00
Freddie Witherden 81ba4bec25 Switch to a floating point co-ordinate system which better reflects the underlying APIs (Cairo and OpenGL).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5736 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-02 14:47:12 +00:00
Buginator 6ccaa10f16 Enhances 'map preview' screen with map maker's ordering of the players position.
This allows players to get to the correct starting position on the map they picked, much easier.

Note, this uses a FBO.  If your card doesn't support it, then you will basically notice nothing different.  A fallback routine is done (but not in this patch), it is just waiting for a decent font *bitmap* that we can use.

Please see http://forums.wz2100.net/viewtopic.php?f=19&t=1953 for more discussion on the matter.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5733 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-02 04:28:58 +00:00
Buginator 1578d9ade8 *no code changes* Just adding a note to some functions that can use the master server to transfer the data to/from.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5732 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-02 03:58:26 +00:00
Freddie Witherden 977bc5e327 Add support for showing and hiding widgets; update how events are handled when a widget is hidden or disabled.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5731 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-01 21:24:19 +00:00
Freddie Witherden f7f5d309a7 Move the glTranslatef calls in the widgetCompositeImpl function to outside of the for loop,
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5729 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-01 18:55:42 +00:00
Freddie Witherden 2c20b8e0e7 Fix a minor indentation issue in widget.c
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5727 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-01 17:51:07 +00:00
Freddie Witherden b45fad3ee0 Update the documentation for vector.h and fix a bug in vector.c.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5723 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-01 12:02:18 +00:00
Freddie Witherden 415f4555dc Remove some empty doc-blocks from betawidget.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5722 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-01 11:31:12 +00:00
Freddie Witherden b854f5bcb0 Remove some dodgy forward declarations from betawidget.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5721 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-01 09:15:43 +00:00
Freddie Witherden 7aef59ad0d Allow Betawidget to compile under OS X (OpenGL header location is different).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5720 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-31 19:30:36 +00:00
Freddie Witherden 30b0cfac27 Update the documentation for vectorCreate.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5719 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-31 18:39:59 +00:00
Giel van Schijndel b2e83cabc1 Add some ASSERTs to check for dodgy pointers
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5715 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-30 20:42:02 +00:00
Giel van Schijndel 11cd7ac69f Fix the MSVC project for compiling lib/exceptionhandler
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5712 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-29 21:27:17 +00:00
Giel van Schijndel 231866a510 Allow compiling with Flex < 2.5.9, r5679 and patch #1089 broke this
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5692 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-28 13:34:00 +00:00
Giel van Schijndel 3eabf084ad Get rid of the ID number cruft in the string resource system:
* At the only place where these ID numbers where used (scrValDefSave and scrValDefLoad), use the key-string instead (e.g. "ZNULLBODY" instead of 17)
 * Rename function strresGetStringByID to strresGetString
 * Increment event save file version to 4 (version of savegame.es files)
 * Reject loading of savegames that need to load non-NULL ST_TEXTSTRING variables from version < 4

NOTE: This may break current savegames of games that use scripts with variables of type TEXTSTRING in them (AFAIK currently only ''some'' campaign and tutorial savegames have these).

This closes ticket:19

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5685 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-27 23:58:49 +00:00
Giel van Schijndel 5f496b5b33 Allow (warning-less) compilation with Flex 2.5.33
Patch #1089 by Bertrand Coconnier <bcoconni>

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5679 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-27 13:34:58 +00:00
Roman C f1c2eacb00 Fix release build on MSVC. Patch by Buginator.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5676 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-26 20:41:16 +00:00
Roman C a412bf4b17 An attempt to fix "interpRunScript: max instruction count exceeded - infinite loop ?" error.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5669 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-26 11:28:54 +00:00
Giel van Schijndel 0340c2d9c3 Make it possible for the ST_GROUP loading code in function scrValDefLoad to accept higher savegame event data versions than 3
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5668 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-26 00:55:23 +00:00
Giel van Schijndel f2bc3c056f Change the debug message about a string that couldn't be found from an error message into a warning message because it seems to occur quite often
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5667 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-25 22:14:47 +00:00
Giel van Schijndel b40e7a6a90 Further hardcode the treap management code to the string resource system:
* Don't maintain a secondary linked list of strings in strres.c
 * Add the string that's tracked and it's ID number to the TREAP_NODE structure
 * Let the treap code manage its own memory
 * Have the treap code perform reverse lookups using either the resource string (i.e. not the "key" string) or associated ID number

NOTE: Searching a treap for anything else than the key is O(n), but that's no worse than a linked list, which is O(n) as well. Walking a treap has O(log n) as memory requirement, whereas walking a linked list has O(1) as memory requirement (stack size). So the only disadvantage is that searching the treap has a (highly remote!) possibility of stack overflows.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5666 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-25 20:27:54 +00:00
Giel van Schijndel e8e664f85a * Get rid of function strresGetIDString who's only purpose is to determine whether the given ID string has a string resource associated with it, and if so return a string that's equal (according to strcmp) to the passed in ID string
* Replace the only use of strresGetIDString with a call to function strresGetStringByID, which will also return NULL on failure to find the given ID string

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5663 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-24 21:12:43 +00:00
Giel van Schijndel 8a41fb89d3 Make function strresStoreString const correct
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5662 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-24 21:12:39 +00:00
Giel van Schijndel a0e779ceb8 * Add a new function strresGetStringByID which combines the functionality of strresGetIDNum and strresGetString
* Get rid of function strresGetIDNum with its inconvenient API and use strresGetStringByID instead

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5661 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-24 20:10:16 +00:00
Giel van Schijndel 12e5120e69 Replace the linked list of arrays of string pointers (premature) optimisation with just a linked list of strings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5660 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-24 18:57:09 +00:00
Giel van Schijndel 47d02a31da * Change strresGetString to return its string as const (to prevent potential double-free problems)
* Instead use strdup() where a non-const reference to these strings is used
  * NOTE: This may introduce memory leaks, but I'd rather have memory leaks than double-frees, of which I'm frankly surprised that they don't occur ''much'' more often
 * Change FindDroidTemplate to take its parameter as const
 * Don't multi-purpose the parameters of FindDroidTemplate as local variables
 * Store string variables in getName as const
 * scrvGetString:
  * Directly return the string it retrieved and use NULL to indicate failure
  * Return the string as `const'

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5658 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-24 18:18:07 +00:00
Giel van Schijndel da3c28efa2 * Move the allocation and initialisation of STR_ID structures to a function of its own: strresAllocIDStr
* Allocate STR_ID structures in such a way that a single free() call on it will suffice as cleanup

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5657 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-24 16:13:14 +00:00
Giel van Schijndel 8101f3bf5b * Change strresGetIDString to return its ID string const
* Change allocateName to do as the name suggests and actually ''allocate'' a string!

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5656 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-24 16:13:08 +00:00
Giel van Schijndel e3a7f0cab8 Return the retrieved string from strresGetIDString and allocateName and use NULL to indicate failure.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5655 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-24 16:13:03 +00:00
Giel van Schijndel e8efe132f8 * Get rid of global variable *psCurrRes, which is used by the strres_parser to operate on
* Instead pass the current STR_RES* pointer to work on to the parser function

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5654 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-24 14:16:27 +00:00
Giel van Schijndel 16e5fd8764 Get rid of the ID_ALLOC bitflag (marks strings allocated by the string resource system), as ''all'' strings are allocated by the string resource system anyway.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5652 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-24 13:59:16 +00:00
Giel van Schijndel 8eb2ed2827 Add some ASSERTs which I think should always hold true for the purpose of ''understanding'' the string resource code. As it's difficult to understand, due to it multi-purposing one variable to hold two semantically different values (at the same time!).
In any case I ''think'' these ASSERTs always hold true, (and for the testing I've done so far they do). But I'd like some more certainty and confirmation, hence why I'm committing this (before I make changes that rely on that assertion holding true), so other people get a chance to test this and prove my assertion wrong.

Thus, ''if'', these ASSERTs are triggered, please open a bugreport or otherwise notify me of it (e-mail, IRC, text message, postal mail, phone call, etc.)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5649 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-23 23:42:18 +00:00
Giel van Schijndel 0651625733 * Remove unused variable `line_num`
* win32 Makefile system:
  * Compile with debug symbols and all warnings enabled on both debug ''and'' non-debug builds
  * Only use -Werror-implicit-function-declaration when compiling C sources, as for C++ implicit function declarations are illegal anyway (and g++ thus doesn't like this compiler option)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5647 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-23 13:59:12 +00:00
Giel van Schijndel cf374ee5e1 * Move the definitions of the datatypes used by the string resource system from strres.h to strres.c
* Add a forward declaration for STR_RES to strres.h (so that we can still declare pointers to this type)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5645 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-22 22:36:23 +00:00
Giel van Schijndel d430c4b44d * Initialize global psStringRes to NULL
* Return the STR_RES* pointer from strresCreate and use NULL to indicate failure
 * Use size_t to store memory sizes in instead of UDWORD

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5644 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-22 22:33:10 +00:00
Giel van Schijndel 4f3c6d39a4 * Return the resulting STR_BLOCK* from strresAllocBlock and return NULL on failure
* Use calloc instead of a malloc followed by memset(0)
 * Check the return value from malloc&calloc for ''all'' invocations of it

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5643 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-22 22:14:48 +00:00
Giel van Schijndel 7125ab811c Access OpenGL headers on Mac OSX through OpenGL/<header> instead of opengl/<header> (lower case)
This fixes a compile error reported by <ruud> on IRC

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5641 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-22 20:23:24 +00:00
Giel van Schijndel 38f5b64c91 Add a new command line option: --flush-debug-stderr which causes the debug output to be flushed when used
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5636 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-21 19:49:36 +00:00
Giel van Schijndel ef6fa22424 Fix a wrong call to calloc (parameter list was malloc style)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5631 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-21 01:00:37 +00:00
Giel van Schijndel f6a6179569 * Use calloc instead of malloc followed by memset(0)
* Use an unsigned int instead of UDWORD as we don't depend on the size guarantee
 * Move the definition of aUsage into #ifdef DEBUG_CHECK_FOR_UNUSED_STRINGS, because that's the only place where it's used

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5630 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-21 00:57:32 +00:00
Giel van Schijndel 7d42778f80 Don't #define DEBUG_GROUP0 in places where it cannot possibly be used
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5629 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-21 00:52:33 +00:00
Giel van Schijndel a3ecb8a325 Get rid of the custom TREAP* structure and instead use a pointer to a pointer to a TREAP_NODE** structure
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5628 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-21 00:43:33 +00:00
Giel van Schijndel 7c8789f108 * Don't associate line number and file information with calls to treapAdd, as it is only called once
* Replace use of the forwarding macro TREAP_ADD with a direct call to treapAdd
 * Remove treap debugging code (actually that's what the above changes effectively accomplished)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5627 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-21 00:30:55 +00:00
Giel van Schijndel b94c297371 * Don't associate line number and file information with calls to treapCreate, as it is only called once
* Replace use of the forwarding macro TREAP_CREATE with a direct call to treapCreate
 * Return the TREAP* pointer directly from treapCreate and use NULL as an indicator for failure

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5626 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-21 00:23:36 +00:00
Giel van Schijndel 1feee6ea95 Replace uses of "\n" and std::endl with uses of constant `endl`, which is defined to the platform's native line ending.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5620 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-20 22:46:50 +00:00
Giel van Schijndel d451b3f5a1 Remove the terminating newline ('\n') from ctime's output to allow different newline styles (e.g. "\r\n" on Windows)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5619 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-20 22:46:46 +00:00
Giel van Schijndel e029c11bb4 In the MinGW stack dumper, use dbgDumpHeader to dump a generic debug info header, instead of custom crafted (and duplicated) code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5618 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-20 22:46:26 +00:00
Giel van Schijndel 461c6f1002 Don't #include debug.h as we depend on dumpinfo.h instead (thus #include that file instead)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5612 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-20 15:27:17 +00:00
Giel van Schijndel d22a2dcf82 Add table entries to the language tables in i18n.c for the newly added translations of r5596:5597
* Basque (eu)
 * Latvian (lv)
 * Norwegian Nynorsk (nn)
 * Slovenian (sl)
 * Swedish Sweden (se_SE)
 * Turkish (tr)
 * Uzbek Cyrillic (uz)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5599 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-19 22:23:06 +00:00
Giel van Schijndel 3814e5f511 * Update the locale lists for Windows and Unix: add all languages in po/ to them
* Change the Windows locale list to allow specifying sublanguages as well


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5598 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-19 22:01:20 +00:00
Freddie Witherden 4c2fedaff6 Save the current state of the cairo context before drawing and restore once finished.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5588 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-19 19:34:51 +00:00
Giel van Schijndel 1b8a62deca Make the treap code specific for string resources
Because the treap management code is only used by the code for string resources, make it specific for these string resources and don't use casting back & forth from void* all over the place. This simplifies the interaction of string resource code with treap code.

This will allow an easier cleanup and eventually a removal of string resource code. As the string resource code can eventually be replaced with gettext code instead.

This closes #18

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5586 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-19 19:15:02 +00:00
Giel van Schijndel 34b73dcdb5 Invert logically wrong assertion (i.e. assert a pointer to be non-null rather than null)
This fixes bug #12047 (assert failure as soon as you open one of the design/manufacture/construct/research windows)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5583 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-19 14:28:36 +00:00
Giel van Schijndel ed3f1508b8 * Remove the dumpLog function and associated code from debug.c
* Add a new function dbgDumpLog to dumpinfo.cpp for dumping the last debug messages
 * Add a debug output callback to dumpinfo.cpp which is used to fetch the debug messages and store them in a ring buffer


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5581 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-19 01:08:07 +00:00
Giel van Schijndel 859196ed2c Move duplicated code, for printing to ''all'' debug output callbacks, to a function of its own.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5580 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-18 23:13:49 +00:00
Giel van Schijndel 9d77329842 * Add a new statically-sized string macro vssprintf, which allows printing to statically sized strings just like ssprintf, with as difference that this macro function operates similar to vsprintf rather than sprintf
* Replace uses of strncmp, snprintf and vsnprintf with sstrcmp, ssprintf and vssprintf respectively


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5579 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-18 22:47:28 +00:00
Freddie Witherden 36a4191818 Switch to an OpenGL compositing mode; some clean-up still required.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5578 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-18 22:21:54 +00:00
Giel van Schijndel 5554dbe695 * Move duplicated code to fetch a tabbed widget form by ID to a function of its own: widgGetTabbedFormById
* In widgSetTabs depend on functions widgGetNumTabMajor and widgGetNumTabMinor respectively instead of duplicating their code


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5573 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-18 15:17:29 +00:00
Freddie Witherden 5bb3421545 Prototype and document widgetAddTimerEventHandler.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5572 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-18 12:10:47 +00:00
Freddie Witherden 7458d5b499 Fix some more compiler warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5571 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-16 21:19:33 +00:00
Freddie Witherden 2f254ade34 Make sure variables are defined before anything else.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5570 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-16 19:14:35 +00:00
Per Inge Mathisen 94aca87927 Fix bug #12016: radar is broker on trunk, reported by Michael Strobel. We now
use the texture rectangle extension to draw the radar window, which should be
supported on even the oldest OpenGL-capable hardware out there.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5562 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-15 20:06:09 +00:00
Giel van Schijndel ac5c52031b Get rid of unnecessary assignment of `volume` to `music_volume`; just utilize clipf right away on `volume`
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5559 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-15 13:01:22 +00:00
Giel van Schijndel 0d670c0409 Don't bother checking whether bitflag ID_ALLOC is set before removing it, the end result is the same anyway: ID_ALLOC being absent from the bitmask/number
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5558 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-15 11:46:12 +00:00
Freddie Witherden b48b8058e8 Add support for timer events and fix a bug in event id generation.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5557 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-15 10:12:03 +00:00
Freddie Witherden 355d0c0760 Make it so that the event-removal system in betawidget actually works.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5555 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 23:41:53 +00:00
Freddie Witherden 86dd924881 Minor cosmetic improvements to betawidget.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5554 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 23:19:51 +00:00
Giel van Schijndel d7a0c2fa9b Don't bother checking whether bitflag ID_ALLOC is set before removing it, the end result is the same anyway: ID_ALLOC being absent from the bitmask/number
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5553 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 23:17:23 +00:00
Freddie Witherden fede6c6e51 Fix a bug in vectorAt which could cause a segfault; add vectorHead which returns the last element added to the vector.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5552 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 23:08:37 +00:00
Giel van Schijndel 0c4b256797 * Out with the (unnecessary! as the size guarantee isn't required) WORDs from treap.[ch]
* Restructure treapStringCmp to be __readable__

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5551 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 22:09:31 +00:00
Giel van Schijndel 8db7c031ff Fix some compile errors that occur when DEBUG_TREAP is #defined
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5550 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 22:09:15 +00:00
Giel van Schijndel 379a905c6c * Move the type definitions of TREAP_NODE and TREAP from treap.h to treap.c (use a forward declaration in the header instead)
* Don't strdup strings retrieved from __FILE__ directives; just store const char* the pointer instead (prevents a memory leak as well)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5549 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 20:41:22 +00:00
Giel van Schijndel 9e70aaf07c Get rid of macro TREAP_NODE_DEBUG and move its contents to the only location where it's used: struct TREAP_NODE
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5548 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 20:25:48 +00:00
Giel van Schijndel 077d4efefe * Remove unused functions treapReset, treapDisplayRec and treapDisplay
* Remove unused macro TREAP_DISPLAY
 * Directly use function treapGetSmallest, treapDel, treapFind and treapDestroy instead of macros TREAP_GETSMALLEST, TREAP_DEL, TREAP_FIND and TREAP_DESTROY respectively

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5547 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 20:22:19 +00:00
Giel van Schijndel 9f3371dc33 Remove macro TREAP_NODE_BASE and move its contents directly into TREAP_NODE as that's the only place where this macro is used.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5546 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 17:53:03 +00:00
Giel van Schijndel 6e9db52984 Get rid of the unused, default comparison function for the values in treap nodes
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5545 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 17:49:10 +00:00
Giel van Schijndel 730188c081 * Get rid of treapint.h which declares prototypes for functions that are only used in treap.c.
* Declare these functions with static linkage instead.
 * Update autotools buildsystem, Code::Blocks project and MSVC project, raw win32 Makefiles don't need an update

NOTE: This may require updating of buildsystems not mentioned above

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5544 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 15:19:08 +00:00
Giel van Schijndel 514d96d72a * Don't #inlcude treap.h in frame.h as only a single file within Warzone depends on the treap code
* Use a forward declaration in strres.h to declare a pointer to a TREAP instead of importing the full treap.h declarations in strres.h and thus large portions of the codebase
 * Rename TREAP's forward declaration name from _treap to TREAP

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5543 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 15:09:00 +00:00
Freddie Witherden 89523ccf9f Make sure we zero a widgets user data when we initialise it.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5540 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 08:51:55 +00:00
Giel van Schijndel ec4784973e Add the used command line to crash dump reports
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5536 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-13 21:26:09 +00:00
Giel van Schijndel 83b63b71b9 Add PhysicsFS version info to crash dump files
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5535 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-13 21:01:28 +00:00
Giel van Schijndel 30cbbefcbd Mark the #include from src/ in chat_lexer.l with a FIXME
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5533 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-13 19:22:11 +00:00
Per Inge Mathisen d7eabccb74 Comment out alIsSource assert
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5532 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-13 18:46:53 +00:00
Giel van Schijndel 5526f2c61a * Move type OBJECT_POSITION (and macro POSITION_OBJ to declare it) from structuredef.h to the new file positiondef.h
* Update build systems: autotools, raw win32 makefiles, Code::Blocks project and MSVC project
 * Rename _droid and _base_object forward declaration types to DROID and BASE_OBJECT respectively
 * Add two forward declarations for BASE_OBJECT and DROID to scriptfuncs.h so that it can declare pointers to these types
 * src/messagedef.h depends on lib/ivis_common/ivisdef.h and src/positiondef.h so #include those
 * Don't #include stuff from src/ in lib/script/chat_processing.h
 * Remove all unnecessary #inlucdes from src/ from lib/script/chat_lexer.l

NOTE: Build systems not mentioned above might need updating.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5531 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-13 18:15:03 +00:00
Per Inge Mathisen ae2c501b8f Use power-of-two texture for radar again. Fixes support for ancient gfx cards.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5530 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-13 18:10:58 +00:00
Freddie Witherden d4168f712c Make it possible for an event handler to remove itself.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5527 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-13 15:40:58 +00:00
Per Inge Mathisen c2fe7de339 The fix to bug #11829: When three players join mp dialog, one drops, in r5258
had a little bug of its own, that made player 3, 5, and 7 drop instead. Fixed!


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5521 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-12 20:36:59 +00:00
Per Inge Mathisen 58792b6df1 Fix erronous error reporting
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5517 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-12 16:21:00 +00:00
Per Inge Mathisen e2064a4927 Add error check in NETsendGAMESTRUCT - dump warning to log if fails.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5516 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-12 11:50:18 +00:00
Per Inge Mathisen a2ca8dedaf Improve logging in NETbcast. Change parameter type of NETBroadcastPlayerInfo so
that it takes unsigned like all its users.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5515 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-12 11:20:47 +00:00
Per Inge Mathisen 117fa9e961 Cosmetic improvements to netplay debug log calls.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5514 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-12 11:02:55 +00:00
Dennis Schridde 022315eef0 Hardcode top_srcdir to make building from non-topdir possible, dont depend on the touch command, fix LDFLAGS to not depend on the removed TARGET variable
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5476 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 20:10:16 +00:00
Giel van Schijndel 623044cf7c Add some debug messages when failing to create an AUDIO_STREAM in sound_PlayStreamWithBuf
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5467 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 15:47:27 +00:00
Per Inge Mathisen 1f831ebd3d Add beginnings of self-test to openal and general audio subsystems.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5456 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 19:07:42 +00:00
Freddie Witherden 7d5723455c Add keycode.h to the repository (which I forgot in r5445).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5449 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 16:51:17 +00:00
Per Inge Mathisen 2aeda4d91e Improve playlist selftest. It now covers the entire playlist API. Remove unused
playlist declaration from header file.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5448 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 16:19:57 +00:00
Freddie Witherden 631ff7879b Add a dedicated text input event. Switch to our own custom keycode enum rather than depending on SDLs.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5445 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 15:46:46 +00:00
Per Inge Mathisen ee6452eb64 Revert r5426. It will not work quite like that, since the pointers refer
to a list in audio.c. The horror! The horror!


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5428 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 18:24:42 +00:00
Per Inge Mathisen 74aeca0093 Change current_queue_sample to a pointer to an AUDIO_SAMPLE instead of
an integer value. This fixes the problem of AL_INVALID being used for
invalid values, while it is really a perfectly valid ID for a sample.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5426 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 17:45:33 +00:00
Per Inge Mathisen 4d1d5b4c11 Add an error check to patch #1082: Fix AL_INVALID_NAME bug, to catch the
currently impossible case of the sample not being in the active list.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5425 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 17:11:58 +00:00
Freddie Witherden 4f07f76034 Add an initial spacer implementation.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5424 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 16:55:15 +00:00
Freddie Witherden f99660d986 Fix a bug in the resize asserts; fix another bug in the hBox implementation causing sizing and positioning of child widgets to fail.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5423 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 16:46:53 +00:00
Per Inge Mathisen 22d4eb3fe1 patch #1082: Fix AL_INVALID_NAME bug, sans one no good assert.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5422 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 16:12:14 +00:00
Freddie Witherden 8e7d4d0d09 Commit hBox.[ch]; a preliminary horizontal layout container.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5418 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 11:19:29 +00:00
Freddie Witherden 0160a3e859 Make sure that we clear the cairo context before we begin drawing to it.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5417 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 10:15:52 +00:00
Freddie Witherden f2b30f27c8 Update some function prototypes for betawidget.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5416 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-08 09:15:13 +00:00
Freddie Witherden 2dc1063859 Allow widgetResizeImpl to work with containers (by re-laying them out).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5415 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-07 22:39:52 +00:00
Freddie Witherden 20d7cc06be Add support for masking mouse click events as well as mouse movement events.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5414 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-07 21:19:58 +00:00
Freddie Witherden 8895e7efba Add experimental support for masks in betawidget. This allows for non-rectangular widgets.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5413 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-07 19:10:23 +00:00
Dennis Schridde 302a557478 Rename "raw" Makefiles to "win32" Makefiles
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5402 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-06 14:29:04 +00:00
Dennis Schridde ec5aeaf3c7 Make "SCRIPT" release function just indirectly point to scriptFreeCode, so the function types are strictly compatible.
Clean scriptFreeCode's formating and remove unnecessary checks for ptr!=NULL before freeing.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5400 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-06 14:02:46 +00:00
Giel van Schijndel a4e8c96977 Move the code to spawn GDB, and arrange for a communication pipe, to a separate function: execGdb
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5391 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-04 22:41:33 +00:00
Giel van Schijndel 619e1e1943 * Deal with a failure of exeve() by writing a debug message indicating that it failed and terminating the child of our fork()
* Flush the write end of the pipe after writing all GDB commands into it
 * Process the return data (both return value and the contents of the output integer) from waitpid()

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5390 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-04 22:41:25 +00:00
Giel van Schijndel 2d6615a30a Refactor function gdbExtendedBacktrace:
* return as soon as an error condition is detected, thus preventing the need for deep nested if-branches.
 * Add some additional comments
 * Return true or false, false indicating an error, true indicating success

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5389 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-04 22:41:17 +00:00
Giel van Schijndel 6953f0fd6d Move the code that provides GDB backtraces in a function of its own to refactor it later (i.e. get rid of the deep if-branch nesting)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5388 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-04 22:41:07 +00:00
Giel van Schijndel aadfec4677 Document the gdb commands; what they do and why they're there
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5387 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-04 22:41:00 +00:00
Giel van Schijndel 38eea0b640 The syscall open() returns -1 on an error *not* 0, as 0 is a *valid* file descriptor:
* Thus check for a return value of -1, not 0

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5386 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-04 22:40:52 +00:00
Giel van Schijndel f8e5f8ddb8 * Don't duplicate code just because there's a single platform (Mac OSX) on which it isn't used
* Instead compile that code on all platforms except for the given one (Mac OSX)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5385 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-04 22:40:43 +00:00
Giel van Schijndel 43bdd9575d Factor out the code to retrieve absolute program paths and move it into a separate function of its own: fetchProgramPath
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5384 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-04 22:40:20 +00:00
Freddie Witherden 84be0c975d Use eventMisc for FOCUS and BLUR events.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5382 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-04 13:09:23 +00:00
Freddie Witherden c152583935 Fix a bug in vectorMap that could result in a segfault.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5357 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-03 16:19:41 +00:00
Freddie Witherden fc935ca02b Fix indentation (tabs => spaces).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5355 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-02 23:23:23 +00:00
Freddie Witherden 1661c61ac0 Major redesign; widgets now use compositing (rendering off-screen).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5354 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-02 23:18:32 +00:00
Giel van Schijndel a7ab3d9982 Merge lexer rules for the script_lexer that match different forms of the same token (e.g. upper/lower case variants)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5353 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-02 11:29:19 +00:00
Giel van Schijndel fd6b6262ba Apply patch #1078: Expand the GDB exceptionhandler.
With our current backtrace dumps I quite oftenly find that in case of segfaults, which combined with assert failures are the most common crash cause, I cannot easily see what value the dereferenced pointer held.

To be able to see this the exception handler will now invoke the "disassemble" and "info registers" commands when producing a back trace using GDB. This gives us the ability to see the precise assembly instruction that triggered the crash, together with the value of the register that was used as pointer.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5352 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-01 20:40:40 +00:00
Dennis Schridde fec1f446d3 Use clipf to clip float values
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5349 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-29 12:07:32 +00:00
Dennis Schridde 6b8aeb1aaa Add clipf() to clip float values
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5348 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-29 12:07:26 +00:00
Dennis Schridde 45f23a4926 Merge commit 'HEAD@{3}'
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5347 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-28 22:32:44 +00:00
Per Inge Mathisen 5ea6c60eee Do not initialize music sound system when --nosound option given.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5343 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-28 15:32:06 +00:00
Dennis Schridde 9343c485b0 Revert "Some endianness swaping, as found in tags/2.1_beta3. Apparently was forgotten to port back..."
This reverts commit r5335.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5337 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-26 12:57:16 +00:00
Dennis Schridde b524a3f8bd Some endianness swaping, as found in tags/2.1_beta3. Apparently was forgotten to port back...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5335 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-26 12:47:36 +00:00
Giel van Schijndel bc810ca2e2 Reset to the start of the playlist when we've reached the end of it, don't move past the end first. This addresses bug #11879 in part (by preventing it even further from occuring).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5333 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-25 20:15:20 +00:00
Giel van Schijndel 1c6ff360db Use if (condition) something; else something-else; instead of if (condition) something; if (!condition) something-else;
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5329 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-25 14:01:18 +00:00
Giel van Schijndel da0b168df3 Don't pass a NULL pointer to cdAudio_OpenTrack
This should fix bug #11879

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5328 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-25 14:00:20 +00:00
Giel van Schijndel 9fcaf6c08f Slight refactoring of cdAudio_PlayTrack to use a switch on the enum, instead of an if, if-else structure
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5327 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-25 13:56:17 +00:00
Dennis Schridde 050ec39c11 Use the (also new in this commit) relative variants of the directories almost everywhere.
Exception is when generating the .wz files, where we need the path to the build directory and building a reverse relative path to $(srcdir) will be messy.
Also silence submake.mk a great deal.
Bug #11883 should be fixed now for the most part.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5325 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 23:41:52 +00:00
Dennis Schridde fd2bfb0e0f Prepare for another fix for parts of bug #11883: Issues with the improved raw Makefiles
- Rename Makefile.raw to lowercase


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5321 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 22:48:45 +00:00
Dennis Schridde 73b35ab8d6 Rename top_srcdir/top_builddir to abs_top_srcdir/abs_top_builddir, to make this more obvious.
Their use is currently flawed, since it will not work in directories with spaces in them... (


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5319 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 20:19:54 +00:00
Dennis Schridde 452b737b64 Output gameTime for debug messages. Should make it easier to recognize relevant messages and their relation over time.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5317 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 18:07:45 +00:00
Freddie Witherden 2b0bd03914 Updates to the betawidget library; being to document vector.[ch], fix a bug in vectorAdd, const correctness for the widget type system, remove a rouge newline in geom.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5315 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 10:11:03 +00:00
Dennis Schridde 9bd8b24921 Boost raw Makefiles
- Use PACKAGE, PACKAGE_VERSION, remove VERSION
- Allow out-of-source-dir builds (mkdir build && cd build && make -f ../Makefile.raw)
- Move config.mk from $(top_srcdir)/makerules/config.mk to $(top_builddir)/config.mk
   When keeping current behaviour (srcdir=builddir), this means: Move it from makerules into the main directory


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5308 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-23 13:54:47 +00:00
Freddie Witherden 4846760772 Add the beginnings of a type-checking system for betawidget.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5306 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-23 12:18:19 +00:00
Giel van Schijndel cab361eec0 * Only use TABs for indentation, not for alignment
* No whitespace on the end of lines


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5305 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-22 23:28:34 +00:00
Giel van Schijndel 13aeeafc97 Less ASSERT(false, ... crap, use ASSERT(!"description", ... instead
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5301 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-22 18:22:49 +00:00
Freddie Witherden 6ffe6f8f49 Fix a typo in betawidget.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5300 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-22 17:55:52 +00:00
Freddie Witherden ee0e17d2e6 Add EVT_MOUSE_CLICK support and fix a typo.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5299 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-22 17:53:08 +00:00
Freddie Witherden c3d5cc4b93 Make the drawChildren method virtual and fix some typos.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5295 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-22 12:03:42 +00:00
Giel van Schijndel 91c7638ddb Check malloc's return value
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5294 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-21 21:51:35 +00:00
Giel van Schijndel 8987ee3aff Slight refactoring to return as soon as possible, thus not damaging code-readability by large amounts of scope-nesting (specifically if-branches)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5293 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-21 21:51:29 +00:00
Giel van Schijndel 952cd00d05 Only iterator over the linked list `songList` once to determine the end. Then store a pointer to the last ->next pointer and use it to append to the list instead.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5292 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-21 21:51:26 +00:00
Giel van Schijndel f7ead00bb0 * Don't use strtok to separate out lines from files as the line reading loop already takes care of that
* Remove now double variable filename and rename line_buf to filename


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5291 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-21 21:51:21 +00:00
Freddie Witherden 57cb40c1ed Some more work on betawidget's event system.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5283 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-21 17:23:00 +00:00
Per Inge Mathisen d3123eaac4 Fix issue in patch #1075 - use "/" separator for physfs paths.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5282 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-21 16:35:24 +00:00
Per Inge Mathisen a1c47bccf8 patch #1075: Simplify playlist code. Thanks to Giel for patch review.
The playlist file is no a simple list of files to play during the game.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5281 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-21 15:40:56 +00:00
Dennis Schridde 4f77bdc8e6 Fix: warning: 'static' is not at beginning of declaration
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5280 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-20 14:04:10 +00:00
Per Inge Mathisen 4c73e82896 Fix --selftest check in nettypes.c
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5273 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-19 16:44:38 +00:00
Dennis Schridde a128c9df88 Add more vector functions and try to get a common order into them
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5269 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-18 22:21:48 +00:00
Dennis Schridde 419aa5a56b New vector functions: Vector2i_New, Vector2i_Compare and use bool instead of BOOL
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5264 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-18 18:26:13 +00:00
Dennis Schridde c9b9e98dc9 Fix "Create default playlist file; This is an ugly HACK which should be FIXME'd into oblivion some other time" by adding a default playlist file to base.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5263 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-18 18:25:35 +00:00
Per Inge Mathisen 925c3daced Quick fix for crash if --nosound is used together with a soundtrack file
(which is now created by default). Someone should look more carefully at 
this code.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5262 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-18 16:29:10 +00:00
Per Inge Mathisen 1c3835ce23 Add original music soundtracks. If you have a playlist already, you need to delete it
or add the music to it manually.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5261 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-17 19:32:17 +00:00
Per Inge Mathisen 0d706d02fd Forward port workaround for eventRemoveContext crash from 2.1. This will leak some memory.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5260 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-16 20:38:26 +00:00
Per Inge Mathisen 94f523d9ef Fix bug #11829: When three players join mp dialog, one drops
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5258 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-16 19:39:42 +00:00
Dennis Schridde a31dce8cbc More vector functions: Conversion and integer division
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5247 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-12 20:11:27 +00:00
Giel van Schijndel f9171b825f Use sizeof instead of magic numbers
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5245 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-12 13:51:31 +00:00
Giel van Schijndel 05d71e2b19 Don't bother warning about some unused parameters in exchndl.c
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5239 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-09 19:58:56 +00:00
Per Inge Mathisen 14460d938a Make sure that packet size is turned into big endian before we send it.
This breaks network compatibility with everything older than this commit.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5234 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-08 14:22:44 +00:00
Per Inge Mathisen a05859644a Fix two mistakes in r5176 (static string cleanup) that made us copy far
less from two strings than we should.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5233 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-08 13:30:05 +00:00
Dennis Schridde 504ffcc625 Dont output any warnings in external sqlite.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5231 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-07 19:11:14 +00:00
Dennis Schridde a3ff407679 Rename VectorXY_Set to VectorXY_New and make it conform to API of the other vector functions
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5223 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-06 22:21:18 +00:00
Freddie Witherden 5fe6816fdd Fix building on OS X (some bozo forgot to update the Xcode project when adding new .c files). Update the font on OS X to Lucida Grande. Correct Framework install path to allow for moving executables.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5221 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-06 17:42:21 +00:00
Giel van Schijndel 2be33c4286 Use WZ_DECL_UNUSED to squelch warnings about unused parameters in the PhysicsFS SQLite-VFS implementation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5212 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-04 19:50:50 +00:00
Giel van Schijndel 3b4df24942 Use WZ_DECL_UNUSED for the data parameter of debug_callback_win32debug to squelch the warning about it being unused
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5211 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-04 17:50:40 +00:00
Dennis Schridde 8836ce7a4b warning: converting of negative value `-0x000000001' to `UDWORD'
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5206 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-31 23:17:27 +00:00
Giel van Schijndel 91fc8a3b53 * Change colours for some of the status bars in the mission "completion score screen" to be more "vivid"
* Add a new colour: WZCOL_MENU_SHADOW
  * Use this colour instead of WZCOL_MENU_BACKGROUND to create a "Black shadow"

Closes #11; patch by Buginator


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5201 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-28 22:08:49 +00:00
Giel van Schijndel 19b80a1a6b Make sure to parse `database` __before__ `file` (i.e. group it with other tokens starting with a `d`) to make sure that it gets recognised at all
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5198 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-28 20:55:49 +00:00
Giel van Schijndel c0296aa371 * Apparently the %destructor feature of Bison is implemented differently for 2.1 than it is for 2.3 (or it is broken in 2.1); so don't use it when compiling with Bison 2.1 (leak memory instead)
* Assume __all__ windows builds use Bison 2.1 (this isn't correct, but it's the best I can currently do, as Bison provides no version macros aside from a string macro)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5196 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-27 21:37:54 +00:00
Giel van Schijndel 1d739ce56b * Pass the table name as well from the .wrf resource file
* "table" will now attempt to load the given resource type from the given table (in the currently opened database)
 * Maintain the current database's name (for error message, etc.)
 * Pass the table name to the database loading functions and use it (in combination with sqlite3_mprintf) to produce the SQL statements


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5189 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-25 19:38:59 +00:00
Giel van Schijndel 452c167e9a * Add a new resource loading function type: RES_TABLELOAD
* Add two new keywords to the .wrf files: "database" and "table"
  * "database" will cause the given filename to be opened as a database file (using SQLite3)
  * "table" will attempt to load the given resource type from the currently opened database
 * Don't open the database in the file loading functions (src/data.c) anymore; turn them in table loading functions instead (which get the current database passed as a paramter)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5188 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-25 19:38:53 +00:00
Giel van Schijndel f6693eebdf Fix a typo strrcat => sstrcat
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5183 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-25 15:42:02 +00:00
Per Inge Mathisen 8419a7008b Use calloc instead of malloc+memset, and make sure we clear the right memory.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5181 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-25 15:40:56 +00:00
Per Inge Mathisen a5e528ebec Fix radarTexture crash.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5179 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-25 15:29:10 +00:00
Giel van Schijndel 855ec725d4 Use sstrcpy|sstrcat instead of strlcpy|strlcat for manipulation of statically sized strings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5176 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-25 13:46:49 +00:00
Per Inge Mathisen 8243c4b2fb Fix the infamous eventRemoveContext crash.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5167 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-24 13:58:26 +00:00
Roman C d89f43106d Make sure we print out script call stack when division by zero occurs.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5152 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-23 14:29:11 +00:00
Per Inge Mathisen 4d845c8067 Fix debug log calls going off when they shouldn't
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5147 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-22 19:33:05 +00:00
Dennis Schridde f94ee4683d *cough*
rad2deg should not look like deg2rad...


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5146 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-22 18:27:48 +00:00
Giel van Schijndel 2102ab0475 Fix warnings: remove unused variables
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5144 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-20 19:57:26 +00:00
Roman C ebaecc07f6 Fix memory leaks in script_paryer.y the correct way.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5142 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-19 13:53:04 +00:00
Per Inge Mathisen d6d6a9919e Commit API only from patch #907: Make texture coordinates into static array.
This fixes a bug with maps smaller than max visible tiles area which would
either crash or create seams, re-reported by Buginator.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5134 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-17 21:48:23 +00:00
Giel van Schijndel 0118573321 Work around Flex 2.5.33 implicitly defining yyget_extra() (rather than forward declaring it)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5130 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-17 10:49:33 +00:00
Per Inge Mathisen 410570c6c1 Set proper svn eol-style on a bunch of files that did not have it.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5125 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-16 17:31:51 +00:00
Dennis Schridde 5b703fb634 Dump OpenGL implementation information to console
Author: Buginator
Signed-off-by: Dennis Schridde <devurandom@gna.org>


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5123 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-15 17:32:39 +00:00
Dennis Schridde b77dfdadad Simplification and slight speedup for trigSin/trigCos. Make trigIntSqrt wrap sqrtf, since the old lookup implementation was probably slower than that.
Author: Björn Bredthauer <Bjoern.Bredthauer@gmx.de>
Date: Thu, 15 May 2008 01:28:55 +0200
Signed-off-by: Dennis Schridde <devurandom@gna.org>


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5122 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-15 00:19:47 +00:00
Dennis Schridde 2334f84c84 Remove unneccessary modulo
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5120 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-14 22:59:00 +00:00
Dennis Schridde 1bc654f8b5 Add float variant to pie_RotateTranslate
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5118 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-14 21:15:59 +00:00
Dennis Schridde be2b8a35ab clip() function for integers (Like CLIP macro) and some slightly altered comments/variable names.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5104 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-13 23:19:10 +00:00
Dennis Schridde 6493ff1d2d More vector functions:
- Set() functions for Vector3i and 3uw
- Add() for Vector3i


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5103 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-13 23:18:53 +00:00
Giel van Schijndel 5828b26a10 * Add functions for changing the volume of an already created AUDIO_STREAM: sound_GetStreamVolume and sound_SetStreamVolume
* Use these functions in cdaudio.c to change the volume of the currently playing AUDIO_STREAM in function sound_SetMusicVolume

This fixes bug #11579 ("Music volume slider dont work")


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5101 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-13 14:01:25 +00:00
Giel van Schijndel 44986c3473 * Make sure to actually set the volume of an AUDIO_STREAM we're creating
* Indentation fixes


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5100 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-13 13:50:08 +00:00
Dennis Schridde 1fcf5bfe97 Render images as alpha, instead of gouraud. This allows alpha-gradients
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5099 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-13 12:53:02 +00:00
Giel van Schijndel 5d0e816aa7 * Put textual tokens as found by audp_lexer.l in heap memory rather than a static string buffer
* Make sure that this heap memory __will__ be released regardless of syntax errors during scanning


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5097 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 20:55:29 +00:00
Giel van Schijndel e8f9fb9ae5 * ONESHOT and LOOP are __not__ value tokens (they're just regular tokens), so don't mark them as such
* Add a new subrule `looping` and use that in rule audio_track instead of duplicating two code paths for audio_track


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5096 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 20:51:46 +00:00
Giel van Schijndel 8529559e7c * Parse quoted text in audp_lexer.l similar to most other parsers/lexers we use (is also less error prone)
* Add single line comments (using '//') to audp_lexer.l


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5095 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 20:42:55 +00:00
Giel van Schijndel d53aa02117 * Use the lexer_input framework instead of a custom YY_INPUT implementation for audp_lexer.l
* Get rid of lexer function parseGetErrorData and use audp_get_lineno() and audp_get_text() instead
 * Add a WZ_DECL_FORMAT declaration to audp_error to enable GCC's printf format checking
 * In audp_error allocate the buffer on the stack using alloca() instead of an auto 1kB text buffer


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5094 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 20:29:13 +00:00
Giel van Schijndel 640ee1f653 * Get rid of never initialised variables g_bParsingSubFile and g_fpOld (the compiler probably set them to false & NULL respectively everytime, if not then this code should have crashed consistently)
* Remove now useless yywrap() function


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5093 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 20:09:10 +00:00
Giel van Schijndel 1799f473c0 Rename some audp_(.*) stuff to yy$1
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5092 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 20:06:19 +00:00
Giel van Schijndel 7be6f76ba3 Remove our own custom definition of YYLMAX (give Flex the liberty of determining this itself)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5091 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 19:55:55 +00:00
Giel van Schijndel f8e4607093 Fix an error causing us to use the wrong names for yyget_extra(), yyset_extra(), yyget_lineno() and yyget_text()
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5089 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 19:40:53 +00:00
Giel van Schijndel 10f021f279 Fix a syntax error introduced in r5086
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5087 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:58:41 +00:00
Giel van Schijndel 59a1c05037 Cleanup:
* Remove our own strcpy implementation: stringCpy
 * Don't use "d = malloc(strlen(s) + 1); strcpy(d, s);" to copy a string into fresh heap memory, use "d = strdup(s);" instead
 * Fix indentation


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5086 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:56:42 +00:00
Giel van Schijndel 942350278b * Put textual tokens as found by strres_lexer.l in heap memory rather than some crazy stack-like static string buffer
* Make sure that this heap memory __will__ be released regardless of syntax errors during scanning
 * Reduce code duplication in strres_parser.y by reducing a single parsing rule with duplicated code up into two rules


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5085 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:47:25 +00:00
Giel van Schijndel dfaf3cea17 * Use yytext instead of strres_text
* Get rid of lexer function strresGetErrorData and use strres_get_lineno() and strres_get_text() instead
 * Don't call abort() in function strres_error as the parser will return an error anyway (causing strresLoad to return false)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5084 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:35:36 +00:00
Giel van Schijndel fdc48bfc94 * Use the lexer_input framework instead of a custom YY_INPUT implementation for strres_lexer.l
* Don't bother to check whether we're in a comment when reaching the end of a string resource file


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5083 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:22:05 +00:00
Giel van Schijndel fae3c7da53 Don't duplicate code that appears in both branches of an if-statement
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5082 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:16:30 +00:00
Giel van Schijndel 2f98b6e39a Minor cleanup and add Doxygen comments
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5081 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:09:25 +00:00
Giel van Schijndel 251317bd9a Cleanup (behaviour should be unchanged)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5080 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:03:26 +00:00
Giel van Schijndel d73949e336 * Put textual tokens as found by resource_lexer.l in heap memory rather than some crazy stack-like static string buffer
* Make sure that this heap memory __will__ be released regardless of syntax errors during scanning


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5079 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 18:00:09 +00:00
Giel van Schijndel 636bce3996 From resource_parser.y: "No longer static ... lets use this area globally":
* Lets __not__ use very bad practices just because we can!!! Make it static again
 * Give strres_lexer.l such an array of its own (static as well)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5077 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 17:50:49 +00:00
Per Inge Mathisen 1819c503c6 Make difficulty work when you start the campaign with the --game parameter.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5076 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 17:50:10 +00:00
Giel van Schijndel 7caf01c08f Use yytext instead of res_text
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5075 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 17:41:00 +00:00
Giel van Schijndel 1aed007c3e Attempt to match an empty string __before__ a non-empty one (otherwise we won't ever match it at all)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5074 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 17:38:45 +00:00
Giel van Schijndel 6bb4f86529 * Get rid of lexer function resGetErrorData and use res_get_lineno() and res_get_text() instead
* Don't call abort() in function res_error as the parser will return an error anyway (causing resLoad to return false)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5073 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 17:34:56 +00:00
Giel van Schijndel f7419596e2 * Use the lexer_input framework instead of a custom YY_INPUT implementation for resource_lexer.l
* Don't add the function name to the debug message in openLoadFile as debug() does that itself already


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5072 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 17:23:33 +00:00
Giel van Schijndel 78f93d3055 Reduce code duplication that occurs in both branches of an if-statement
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5071 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 17:13:11 +00:00
Giel van Schijndel 6bd36ba163 Don't bother to check whether we're in a comment when reaching the end of a WRF file
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5070 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 17:04:32 +00:00
Giel van Schijndel 1c4bafaa2b Let the chat_lexer do some more of the work by returning only a single _T_YES token for "yes", "yea", "yeah" and "yep"
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5063 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 12:48:31 +00:00
Per Inge Mathisen 07c9062105 Cosmetic update of static globals
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5061 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 12:39:16 +00:00
Giel van Schijndel 9640d3b0a6 * Make sure to set psPrev to NULL at the start of the deletion loop
* Also don't dereference it when it's NULL


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5060 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 12:33:38 +00:00
Giel van Schijndel 58176b97bc * Fix GPL headers for some files which where wrongly marked as being Copyright Eidos Interactive in r1014
* Update file-level comment for chat_lexer.l for the change in r899 (i.e. the flex option `-i` doesn't need to be specified anymore)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5059 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 12:16:46 +00:00
Per Inge Mathisen 36e2ff2517 Update changelog in trunk as well
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5056 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 22:11:28 +00:00
Dennis Schridde c67a3ef1be More comments on previous patch, which was by Buginator.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5051 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 19:53:27 +00:00
Dennis Schridde 25c53e1c48 commandline argument --join <host> to join into a lobby directly from the commandline ((needs ChangeLog addition!))
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5050 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 19:09:29 +00:00
Roman C fcfae543ba Revert r5043 because of compilation problems on non-MSVC systems.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5049 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 15:25:43 +00:00
Per Inge Mathisen 91727f270b objTrace() no longer requires a debug part parameter, and always outputs the ID
of the traced droid.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5047 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 14:58:20 +00:00
Roman C da83c65c9c Output script call stack on ASSERT.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5043 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 11:51:23 +00:00
Roman C 03073c8038 Memory leak fix for event.c. Patch by Buginator.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5035 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 10:34:48 +00:00
Roman C f7c684f964 Make it possible for AI to recognize some new words and phrases needed for new commands.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5034 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 10:24:09 +00:00
Roman C b40f5dd5a3 Get rid of some more compiler warnings on MSVC.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5032 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 10:17:49 +00:00
Roman C 3d2dc99003 Scripting:
-allow creation of unit templates on the fly
-allow direct access to major weapon stats from within scripts

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5014 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-10 13:20:23 +00:00
Giel van Schijndel 701f65469c * Provide an abstraction of YY_INPUT so that we have a single definition which we can use in multiple lexers which can read from both in-memory buffers as well as PhysicsFS files
* Utilise this new version of YY_INPUT in script_parser and script_lexer


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5008 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-10 00:35:24 +00:00
Per Inge Mathisen 13fa22fcbf Revert r4932 and try a different fix instead, checking the number of tabs
actually allocated, and resetting the currently highlighted tab if it is
out of bounds.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4998 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-09 20:32:31 +00:00
Per Inge Mathisen bdb6bf9ef0 Silence compiler complaints about memory leaks in tile drawing code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4992 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-09 18:13:03 +00:00
Dennis Schridde 9541f843c4 Fix typo
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4973 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-09 10:01:56 +00:00
Dennis Schridde 0e21488f74 Last commit to solve bug #11656, fix by Paul Wise <pabs>.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4954 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-07 10:09:20 +00:00
Dennis Schridde 7655a44069 Fix issue where hosting a game and then exiting before it starts would not stop warzone from listening on its port.
Signed-off-by: Dennis Schridde <devurandom@gna.org>

- Also seems to fix other issues, like weird number of AIs after host-stophost-hostagain.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4953 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-07 10:06:49 +00:00
Freddie Witherden 073a0e5d55 Add some layout support code to the new widget system and clean-up some code in it.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4944 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-06 16:34:34 +00:00
Giel van Schijndel b58d508ce6 Doxygenize the parameterlist of frameInitialise
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4943 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-05 23:17:35 +00:00
Giel van Schijndel 01958db9a0 We don't #define HAVE_STRLCPY or HAVE_STRLCAT in the configure script anymore
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4939 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-05 15:12:32 +00:00
Roman C 2c7d52d0c8 Fix MSVC compilation.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4914 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-04 12:55:05 +00:00
Per Inge Mathisen 221a2cb4ee Remove MSVC support for WZ_DECL_CONST since it didn't work.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4913 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-04 12:34:20 +00:00
Per Inge Mathisen 6e9732a86a WZ_DECL_CONST now implies WZ_DECL_WARN_UNUSED_RESULT and also works on MSVC.
WZ_DECL_RESTRICT now works on MSVC as well.
WZ_DECL_THREAD added, declares variables thread local, support for it made mandatory.
WZ_ASSERT_STATIC_STRING (gcc only) to assert that a string is static added.
The sstr functions now support pointer-length strings again.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4908 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-04 11:43:28 +00:00
Giel van Schijndel 31fda8026b Don't call function pointers when they're NULL (fixes a segfault bug that occurs when a resource type without release function couldn't be loaded)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4896 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-03 10:24:36 +00:00
Giel van Schijndel 46805bb32f Fix bug #11480:
* Don't call PHYSFS_close if our PHYSFS_file* pointer is NULL


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4895 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-03 10:17:06 +00:00
Giel van Schijndel 510b633251 * Utilise ARRAY_SIZE to determine the amount of elements in a statically sized array
* Use sizeof(*ptr) instead of sizeof(type) in malloc & memset calls


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4892 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-02 21:19:15 +00:00
Giel van Schijndel 03bc81c0fb #include "frame.h" in strlfuncs.h; to hopefully fix bug #11609
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4889 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-02 20:59:35 +00:00
Giel van Schijndel 5154d575da Assert that the pointers to strlcpy & strlcat are not NULL
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4878 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-02 12:38:44 +00:00
Giel van Schijndel b9857f9bf9 Detect whether the OS already supplies strlcpy and strlcat and don't define our own if it does:
* Add m4 macros AC_STRLCPY_CHECK and AC_STRLCAT_CHECK for use in the autoconf script
 * Don't define our implementation when HAVE_STRLCPY or HAVE_STRLCAT is defined

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4876 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-02 12:04:20 +00:00
Per Inge Mathisen 5034cedfd4 Rename astrlcpy and astrlcat to sstrcpy and sstrcat. Add ssprintf and sstrcmp also.
Renaming due to name conflict with a gnu extension. Added debug versions of all the
above, that assert if a char* pointer is passed in. This means they cannot be used
with strings shorter than the shortest expected length of void*.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4865 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-30 17:26:38 +00:00
Giel van Schijndel 4e60f65e8f Don't #include "script_parser.tab.h" in lib/script/stack.c as we don't depend on the parser's token definitions there
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4856 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-29 15:18:42 +00:00
Roman C c3ace2ec9f Redefine __STDC__ to 1, this fixes MSVC compilation.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4855 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-29 15:05:08 +00:00
Giel van Schijndel b047f2c1ef Work around MSVC not #defining __STDC__ (all ISO C89 compliant compiles _should_ #define that macro)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4854 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-29 14:32:14 +00:00
Giel van Schijndel bfb035d41a Merge r4804 from the 2.1 branch into trunk (except for the removal of the SQLite stuff from the XCode projectfile)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4849 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-28 21:41:12 +00:00
Giel van Schijndel fbf8efefde Only truncate the programPath if it's followed by an EOL
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4847 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-28 21:16:51 +00:00
Giel van Schijndel 0555874c44 Pass programCommand to dbgDumpInit() so that it can use that to set up debug dump info
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4844 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-28 20:45:28 +00:00
Giel van Schijndel 30e790a7b8 Add a Doxygen comment to function iV_GetTexture
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4838 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-28 16:51:03 +00:00
Freddie Witherden 5d8b2c688a Add a new method for adding points together to geom.[ch]; update Doxygen documentation for geom.h; remove bounds from struct _widget, replacing it with an offset; add a method to compute the absolute offset.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4817 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-27 15:14:42 +00:00
Giel van Schijndel ab2bafd7a4 Merge r4271 from deprecated 2.1 branch into trunk:
* Make log output use LOG_SCRIPT instead of LOG_NEVER and LOG_WARNING
 * Some random cleanups


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4788 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-26 15:21:23 +00:00
Giel van Schijndel 61c8bbc4b9 * Don't "Guarantee nul-termination" after snprintf as snprintf does that itself already (per the C99 spec)
* Use strlcpy for copying strings instead of snprintf "%s"
 * Don't cast the return value from vsnprintf to (void)
 * When we use va_start make sure to use va_end as well...
 * Fix indentation


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4785 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-26 14:21:41 +00:00
Freddie Witherden d5e651127e Add a trailing \n to the files in betawidget/ (which got trimmed for some reason)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4780 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-26 13:22:48 +00:00
Per Inge Mathisen 914cf90fb4 Add macros astrlcpy and astrlcat that work like strlcpy and strlcat
but with automatic length detection for fixed size arrays.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4777 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-26 12:08:30 +00:00
Freddie Witherden 3914e26f1b Fix a bug in widgetBlurImpl which could cause a segfault.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4774 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-26 11:23:55 +00:00
Freddie Witherden 471e68f998 Fix a typo/spelling error in widget.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4773 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-26 10:52:41 +00:00
Freddie Witherden b22e2c8aae Update the betawidget library; add Doxygen docblocks for the methods in widget.h; make the event handler callbacks accept void *userData.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4772 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-25 23:20:16 +00:00
Per Inge Mathisen 9de00487a8 Merge in mostly cosmetic pieces of patch #969: Rewritten minimap code
to minimize the size of the patch.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4767 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-24 20:32:24 +00:00
Freddie Witherden f8eb466d16 Commit an early non-functional prototype of the new widget code. Feel free to modify as you see fit.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4761 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-24 18:07:47 +00:00
Per Inge Mathisen cefef3651c Add doxygen markup to projectile code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4759 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-24 17:23:11 +00:00
Per Inge Mathisen 5533cf265a Add more doxygen markup, especially for widget code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4758 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-24 17:06:25 +00:00
Giel van Schijndel 12d2e20f47 Use the correct function prototype
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4739 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-21 23:33:59 +00:00
Per Inge Mathisen e853c606f8 A little bit of indentation cleanup so that the code can be read.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4733 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-21 17:12:56 +00:00
Per Inge Mathisen 650447d833 Fix crash when trying to delete text coming from a clipboard paste.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4732 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-21 17:11:48 +00:00
Per Inge Mathisen 81c88dbf38 Purely cosmetic cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4731 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-21 17:02:46 +00:00
Dennis Schridde 4c10f714c5 Use std::endl instead of EOL
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4713 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 23:56:35 +00:00
Dennis Schridde 655fd8e6e3 windows.h is not needed after frame.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4712 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 23:56:28 +00:00
Giel van Schijndel 7f847d9b08 Fix yet some more "function declaration isn’t a prototype" warnings (for the wiggle extensions)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4709 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 23:15:01 +00:00
Giel van Schijndel 8d2524be31 Const correctness
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4708 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 23:10:19 +00:00
Giel van Schijndel 4a17aeeec7 * Delete unused and empty function StartTacticalScroll()
* Mark the parameters for several functions as WZ_DECL_UNUSED (for those functions that require the parameter as part of their interface)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4701 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 17:17:50 +00:00
Giel van Schijndel 73fcb5eb6a Enable NLS for our parsers when it's enabled for us (using --enable-nls)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4700 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 16:38:27 +00:00
Giel van Schijndel 648a2b933b Update GLee.diff for r4693
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4697 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 16:09:09 +00:00
Giel van Schijndel 1252538097 * Make pIdent for VAR_SYMBOL and FUNC_SYMBOL const so that we're const correct with the function tables in scripttabs.c
* Replace "nstr = malloc(strlen(str) + 1); strcpy(nstr, str);" by using "nstr = strdup(str);" instead
 * Remove a non-sensical self-assignment ("pIdent = pIdent;")
 * In scriptAddVariable:
  * "Overallocate" for the new VAR_SYMBOL so that we can store the identifier in that single chunk of memory
   * This allows deallocating the entire structure with a single free() call (which prevents problems with the constness change to VAR_SYMBOL mentioned above)
  * Don't take ownership of the memory pointed to by psVarIdent->pIdent, just copy its contents instead
  * Make FREE_VARIDENTDECL a function instead: freeVARIDENTDECL
   * In this function also free psDcl->pIdent


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4696 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 15:18:28 +00:00
Giel van Schijndel 10eac267e3 Remove unused global variable psLocalVarsTemp
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4694 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 15:04:24 +00:00
Per Inge Mathisen 5d3700bb1c Fix GLee warnings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4693 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 15:02:54 +00:00
Giel van Schijndel e8ff8255a9 Some const correctness
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4692 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 15:01:52 +00:00
Giel van Schijndel 457c7005f3 * Remove global variable psLocalVars which was __always__ NULL
* Remove unused function scriptClearLocalVariables() (which was effectively a NOP due to psLocalVars being NULL)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4691 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 14:56:49 +00:00
Giel van Schijndel f494f40dde Remove global var psFunctions which is __always__ NULL
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4690 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 14:18:06 +00:00
Giel van Schijndel 1fae16dedc * Revert r4688 for GLee.h (use some GCC pragmas to ignore warnings in the GLee header)
* Actually *fix* the "function declaration isn’t a prototype" warnings


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4689 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 13:32:18 +00:00
Giel van Schijndel 055903cca2 Use some GCC pragmas to ignore warnings in the GLee header and source file (so that we can compile cleanly, even with -Werror)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4688 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 13:01:10 +00:00
Giel van Schijndel 0859814e16 Replace our custom OpenGL extension checking mechanism by GLee:
* import the code from GLee into our repository (a single source and header file), and replace all use of the check_extension function by use of GLee functions
 * Remove function stencil_one_pass and replace all calls to it with `if (GLEE_EXT_stencil_two_side && GLEE_EXT_stencil_wrap)`

Patch from ticket 8 by Buginator (with some minor additions by me)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4687 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 12:52:19 +00:00
Per Inge Mathisen f0226edf93 Add new debug level for messages and new log calls.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4685 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-19 21:41:18 +00:00
Per Inge Mathisen 28669696a4 Clean up debug log. We now print the function name first automatically - no need to
put that into the debug call. Rename some categories to make them line up correctly in log.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4684 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-19 14:52:35 +00:00
Per Inge Mathisen 69a4b6a380 Fix bug #11520: crash when saving the game in campaign mission alpha 4, reported
by Jan Dittberner. If a tagfile group had only default values, it would consume
the group end tag and the rest of the file would be read corrupt.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4681 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-18 20:43:07 +00:00
Per Inge Mathisen f106d10772 Do not leak VRAM when displaying map previews. Patch by Buginator with changes by me.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4679 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-18 18:04:55 +00:00
Giel van Schijndel 1585b7d55a Add a workaround for the X11 headers #defining Status (i.e. #undef it), to prevent problems
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4672 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-17 20:55:46 +00:00
Roman C 4c5d34f22b Scripting engine:
Allow global variable declarations to be mixed with trigger and event/function declaration. This allows us to #include script files which variable/event declaration.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4667 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-17 15:59:43 +00:00
Roman C 2734594eef Don't abuse interpCheckEquiv() since most type checking is done during compilation.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4659 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-16 19:14:58 +00:00
Giel van Schijndel 5de54b2936 Lets not depend on the preprocessor's ability to concatenate strings as MSVC doesn't seem to be that good at it
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4636 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-15 18:52:16 +00:00
Giel van Schijndel 8c9e8193aa #define PACKAGE_DISTRIBUTOR to "UNKNOWN" if it isn't defined at the compiler commandline
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4635 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-15 18:45:35 +00:00
Giel van Schijndel 983e48834c Use GetModuleFileNameA instead of GetModuleFileName to make sure we can build properly, even on Unicode builds
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4633 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-15 18:25:20 +00:00
Giel van Schijndel 36766ec8ce Use a more unified system for the "default" info in exception reports (i.e. the same code for the Windows & GDB on GNU/Linux handlers)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4623 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-14 23:17:51 +00:00
Giel van Schijndel c6a0ad011e restrict is not a keyword to C++, so don't use it when compiling as C++
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4615 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-14 21:39:14 +00:00
Roman C 89fc6d5edd Allow a script to have more than strings at a time.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4614 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-14 20:12:27 +00:00
Giel van Schijndel ff663196a3 * Forward declare debug_callback_win32debug when compiling for Windows
* Don't define windowsExceptionHandler when compiling with MinGW (as we don't use it on MinGW)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4587 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-13 22:54:58 +00:00
Giel van Schijndel 85d51e6a32 Rather than pretending that our UserMusicPath isn't hardcoded, lets just admit it and make it a `static const char`
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4576 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-12 21:31:29 +00:00
Roman C daf4a00039 Get rid of some unnecessary MSVC warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4574 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-12 15:17:47 +00:00
Per Inge Mathisen 9da6c7eb96 Netplay bugfixes from Buginator, with changes by me.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4560 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-11 18:35:53 +00:00
Roman C 78f4b01231 Implemented 'Ready' button for the lobby. The game starts when all players have clicked on it.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4555 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-09 20:05:09 +00:00
Per Inge Mathisen f64e3a8033 Fix bug in tagfile where we would not skip boolean values properly.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4542 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-07 20:01:56 +00:00
Per Inge Mathisen b1000ce106 Map preview patch by Buginator in patch #1040
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4541 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-07 19:07:43 +00:00
Roman C 674db841fa Fix a bug in whosResponsible() which caused execution of AI scripts on a client instead of the host in some cases.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4540 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-07 17:31:57 +00:00
Roman C ab1629285b Fix MSVC compilation. Patch by Buginator.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4533 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-06 16:07:36 +00:00
Per Inge Mathisen 0edf5f08e5 Fix erronous handling of skipped group separators in the tagfile code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4527 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-06 13:14:12 +00:00
Per Inge Mathisen 8dca456c24 Fix bug in tagfile code. We would not properly skip groups that we did not intend to read.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4526 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-06 12:13:41 +00:00
Ari Johnson 685948940e Fixed cursors16.c to work again
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4525 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-06 03:20:27 +00:00
Giel van Schijndel 624f992e62 In the Dr. MinGW exceptionhandler additionally dump:
* The version as returned by version_getFormattedVersionString()
 * Compiler name and version
 * Pointer size
 * Last two log lines (with `dumpLog`)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4516 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 23:54:12 +00:00
Giel van Schijndel 9c90950e4a Add exceptionhandler to the MSVC project for r4484
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4514 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 23:44:15 +00:00
Giel van Schijndel 678edfead2 Provide an alternative `dumpLog` implementation:
* one that works with the POSIX write() syscall on an integer file descriptor
 * and one that works with WinAPI's WriteFile() function on a HANDLE

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4513 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 23:37:46 +00:00
Freddie Witherden 6459f52cf2 Rename PIELIGHT.argb to PIELIGHT.rgba so that it reflects its actual format.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4509 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 22:33:22 +00:00
Giel van Schijndel 5bcc0ed6df Keep track of the previous exceptionhandler and call it when we're finished in our own
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4508 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 22:14:16 +00:00
Giel van Schijndel 85c2a8a3cf Remove whitespace from the end of lines
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4506 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 22:06:04 +00:00
Giel van Schijndel 0ae93346f0 Only set up Dr. MinGW as exceptionhandler when compiling with MinGW (the BFD lib is a huge pain to compile with MSVC)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4503 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 21:10:36 +00:00
Per Inge Mathisen 566e050cf3 Remove useless and wrong comment.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4498 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 19:30:05 +00:00
Giel van Schijndel 80917fb4a9 Allow compiling without warnings if HAVE_BFD isn't defined
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4493 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 16:24:45 +00:00
Per Inge Mathisen 3dafc4e62a Fix some warnings generated by -Wextra
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4492 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 16:22:05 +00:00