Commit Graph

1642 Commits (1375e432b72f4bc688e1dc48865f80c4c3b278a1)

Author SHA1 Message Date
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
Giel van Schijndel 3c516a43f4 the exceptionhandler requires $(SDL_CFLAGS) (because it #includes frame.h which depends on that)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4491 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 16:18:37 +00:00
Giel van Schijndel fdcadfcc8f Compile & link in Dr. MinGW's exceptionhandler
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4490 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 16:15:14 +00:00
Giel van Schijndel 53507faee0 Add the exceptionhandler from Dr. MinGW (part of mingw-utils) with my fixes to it (doesn't compile & link in yet)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4489 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 16:00:58 +00:00
Per Inge Mathisen 274ae7c9a4 Enforce strict function prototypes for autoconf builds, and fix function prototype problems.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4487 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 15:34:55 +00:00
Giel van Schijndel 665e57dc12 Move the exceptionhandler to a directory of its own
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4484 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 15:11:43 +00:00
Per Inge Mathisen b41b7358b7 Add safer, proven versions of strlcpy and strlcat from OpenBSD.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4483 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 11:45:29 +00:00
Roman C 0ee1e1b965 Fixed warnings on MSVC.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4469 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-02 17:39:42 +00:00
Roman C 4f0e59e488 Remove ENABLE_NLS, since it breaks compilation on MSVC.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4467 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-01 20:00:47 +00:00
Dennis Schridde b2d8cd5187 ENABLE_NLS for MSVC
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4464 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-01 17:14:17 +00:00
Roman C 49903f9593 Get rid of unnecessary warnings when compiling release build using MSVC.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4462 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-01 15:56:39 +00:00
Freddie Witherden 59f951b0bc Update the arrayMin[F] functions so that they now return the min value and set the index. Also add arrayMax[F] versions.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4461 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-01 11:26:53 +00:00
Freddie Witherden 4e0c1dbafd arrayMinIndex: now in float form\!
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4460 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-31 23:16:01 +00:00
Freddie Witherden 0587cf8674 A the helper arrayMinIndex, which will return the lowest item in an array of ints.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4459 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-31 22:58:34 +00:00
Roman C 35233a1f9b Added a sound for beacons (based on ecmtower.ogg). Use f12 to make wz take you to the beacon location.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4450 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-31 18:25:58 +00:00
Giel van Schijndel e89a224b32 Add in support for coloured mouse cursors:
* Add a new configuration option "ColouredCursor", which if enabled will enable coloured cursors ingame
 * Add a new API for setting cursors with: pie_SetMouse (previously frameSetCursor was used)

Patch #956 by Buginator; pie_.*Mouse API done by me (except for the iV_DrawImage invocation)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4434 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-30 15:44:50 +00:00
Per Inge Mathisen 3ee8a3ed7f Add beginnings of a game self-test. Start with --selftest command line option.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4433 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-30 14:36:11 +00:00
Giel van Schijndel 9002fb5953 * Rename frameSetCursorFromRes to frameSetCursor
* Make frameSetCursor take a CURSOR (an enum) parameter instead of SWORD


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4432 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-30 14:11:33 +00:00
Giel van Schijndel 39b6c60501 * Change and clean up the cursors API
* Get rid of resource.h which duplicated code and as such was a maintenance hell/burden


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4422 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-30 13:23:11 +00:00
Giel van Schijndel c7b40d8566 Revert r4416
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4417 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-29 18:46:37 +00:00
Giel van Schijndel ad68743327 Temporarily disable -Wmissing-declarations for lib/framework
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4416 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-29 18:33:05 +00:00
Per Inge Mathisen be566a7d6d Add -Wcast-align and -Wmissing-declarations to autoconf debug builds, and fix warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4403 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-28 23:28:44 +00:00
Giel van Schijndel 359efe39ac Const fix
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4402 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-28 23:09:32 +00:00
Giel van Schijndel db7f049617 Const correctness
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4401 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-28 22:21:37 +00:00
Per Inge Mathisen b58826bce4 Fix assert in widget code by simply increasing maximum major tabs that can be shown.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4397 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-28 18:41:53 +00:00
Dennis Schridde e28cf1ce77 Using the kludge for GNU Flex < 2.5.30 was slightly incorrect. Correct way is present in 2.5.9 already.
Additionaly use the kludge found on http://flex.sourceforge.net/manual/faq_002dmemory_002dleak.html


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4384 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-28 11:05:19 +00:00
Dennis Schridde f888cc5b69 Revert 4344-4347, 4355, 4357, 4358, 4362: They caused too much slowdown in the scripting engine
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4379 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-27 18:38:25 +00:00
Dennis Schridde 89d1ea6a3d Old versions of GNU Flex (i.e. 2.5.4) dont provide yylex_destroy
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4376 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-27 17:09:16 +00:00
Dennis Schridde e6e09ee72a Differ between deep (i.e. incl strings) and non-deep (just the pointer) copies
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4362 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-26 21:43:39 +00:00
Dennis Schridde ffc7a71601 Make MSVC happy
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4359 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-26 16:42:16 +00:00
Dennis Schridde 496e781146 Dont allocate the string again during direct copy
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4358 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-26 15:37:16 +00:00
Dennis Schridde 9bffb40f82 stackPop can utilise stackReduce
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4357 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-26 15:01:15 +00:00
Dennis Schridde 3eecd4fd7b Move interp*2string to script*2string
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4356 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-26 14:57:35 +00:00
Dennis Schridde 10670360cd Cleaned stackPush and stackShutdown, stackRemoveTop can remove more than 1 item now.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4355 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-26 13:52:31 +00:00
Dennis Schridde 44d2b96472 Removed unused (commented out) chunk of stack manipulation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4354 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-26 13:27:19 +00:00
Dennis Schridde 65b9f9b204 r4351: Port memleak fixes from 2.1
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4353 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-26 12:49:51 +00:00
Dennis Schridde ee286efa0f Fix lexer memleaks
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4348 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-26 11:28:25 +00:00
Dennis Schridde 9019233d1a Properly copy string->string
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4347 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-26 10:26:15 +00:00
Dennis Schridde 6fdc8dd8b1 Dont store values and types seperately.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4346 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-26 02:35:26 +00:00
Dennis Schridde 53e30f187e Remove debugging junk
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4345 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-26 01:58:40 +00:00
Dennis Schridde cb2e3c3201 New interpreter functions for initialisation, cleanup and copy (incl. conversion, will be used later). Shall replace special string handling.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4344 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-26 01:54:27 +00:00
Dennis Schridde b9f91361fc Minor cleanup of script parser
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4343 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-26 01:06:00 +00:00
Dennis Schridde 02ae258b75 Was printing the wrong opcode for binary/unary operators
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4341 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-26 00:48:41 +00:00
Dennis Schridde 480314fed0 Enhance copeprint capabilities and add more 2string functions for the scripting engine.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4340 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-26 00:45:03 +00:00
Dennis Schridde ce8e1d1846 - Generic cleanup
- Strings are not equivalent to anything, only convertible (mistake in one of my last commits)
- Clarify names
- Print user types


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4339 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-26 00:27:56 +00:00
Dennis Schridde c7a9f0f166 Give the bool2string function back...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4337 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-25 23:54:28 +00:00
Per Inge Mathisen eaa506a47f Do not re-enable texturing if it is already enabled.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4332 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-25 19:23:26 +00:00
Dennis Schridde dddbb92429 Move bool2string() conversion function from tagfile.c to frame.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4331 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-25 14:41:04 +00:00
Dennis Schridde 5412840e85 Print another binary operator: concatenation.
You still should not call traceOn() from a script or enable interpTrace in the code...


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4328 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 22:53:09 +00:00
Dennis Schridde 13c531f6cb Print float values, too. (script debug)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4326 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 22:22:56 +00:00
Dennis Schridde 679bfea007 Cleanup stackPopParams and make it handle the different INTERP_VAL types correctly.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4325 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 22:09:31 +00:00
Dennis Schridde e402233597 Add type to string function (i.e. to be used for error messages). Allow bool, int, float to be converted into strings in interpCheckEquiv().
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4323 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 20:57:07 +00:00
Per Inge Mathisen 3dd337b73f Fix variable that might be read unset. Reported by Valgrind.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4318 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 19:24:07 +00:00
Dennis Schridde 927c82aed0 C89 requires NULL
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4315 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 17:19:47 +00:00
Dennis Schridde 1c4901ce29 GCC says: "suggest parentheses around assignment used as truth value"
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4313 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 16:58:26 +00:00
Dennis Schridde 10f2ccfd56 TRUE->true, FALSE->false (except in scripts)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4311 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 16:51:17 +00:00
Dennis Schridde 9b94b011bb Better definition of a NULL pointer
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4310 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 16:44:59 +00:00
Per Inge Mathisen 775637ef95 Fix some -Wextra warnings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4307 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 16:02:11 +00:00
Giel van Schijndel ad67fb8533 Revert the disabling of the exceptionhandler in r4304
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4305 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 15:41:34 +00:00
Giel van Schijndel dcc1536f58 Backport r4221 from the 2.1 branch to trunk:
* Fix warning regarding array bounds


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4304 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 15:40:13 +00:00
Giel van Schijndel ed37f5a2d0 Add some header guards to scrap.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4288 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 00:59:05 +00:00
Giel van Schijndel 918be1e737 Get rid of the widget heap initialisation stuff
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4287 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 00:32:00 +00:00
Roman C a1008c093d Reduce amount of junk in the MSVC compilation output by about 70%.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4279 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 22:15:28 +00:00
Dennis Schridde 1e26e33fc4 Make it look *exactly* how it looked before my commit... Maybe that finally fixes MSVC
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4274 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 20:16:13 +00:00
Roman C 399e92a1ed Make sure chat messages won't be overlooked during mp games by making chat messages stand out from system messages.
If enemy/foe radar colors are on (SHIFT+TAB) then all ally messages are yellow, enemy messages are red. If enemy/foe mode is off all chat messages are simply brighter than system messages.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4272 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 20:04:37 +00:00
Dennis Schridde 5beaf745bf Fix missing identifier LC_MESSAGES for MSVC
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4269 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 19:29:41 +00:00
Dennis Schridde f8b62a6e77 Simplify i18n handling by moving all system dependend stuff into lowlevel functions.
Support changing the language via the menu on Windows.
Don't save the language name to the config file. Use the ISO639 style identifier instead.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4268 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 19:22:09 +00:00
Giel van Schijndel 150f0ed209 #include fixes
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4266 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 19:08:49 +00:00
Giel van Schijndel b19b0bcda6 widgbase.h depends on textdraw.h so #include it...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4263 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 18:33:59 +00:00
Giel van Schijndel ae4faeac64 * Remove an unnecessary #include directive from `clparse.c`
* widgbase.h depends on piedef.h so #include it


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4262 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 18:30:41 +00:00
Giel van Schijndel d4adf8fe42 Use enum `iV_fonts` instead of `int` to represent fonts in the widget code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4261 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 18:12:23 +00:00
Giel van Schijndel 8d15dc2ba1 * Log a warning when we've just decoded an empty OggVorbis track
* On DEBUG builds free() the memory associated with that track and return NULL (which __will__ cause program termination if it occurs)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4254 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 16:14:28 +00:00
Giel van Schijndel 535e12a5ef When failing to load a resource (WRF), generate a debug message about what file failed
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4252 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 15:55:36 +00:00
Dennis Schridde 87f3224fa6 The preprocessor checks never really worked...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4249 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 15:16:29 +00:00
Per Inge Mathisen f698bf5fa7 Set LANG environment variable when changing languages. Attempt to fix
the i18n menu option for Windows users.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4246 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 14:18:23 +00:00
Giel van Schijndel 7785437073 return the success/failure status from the NETenum template
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4244 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 14:00:30 +00:00
Giel van Schijndel cf6ea01b4a * In NETstring use memcpy to copy the string and guarantee NUL-termination manually
* strlcpy() is unsafe if we cannot trust the source string to be NUL-terminated (as strlcpy does "return strlen(src);")


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4242 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 13:50:54 +00:00
Giel van Schijndel 6cd8e03773 Document NETstring (Doxygen documentation) and use strlcpy instead of memcpy to guarantee NUL-termination
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4241 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 13:48:25 +00:00
Giel van Schijndel fbf0395b7e Also test NETenum in the nettypes unit test
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4240 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 13:35:01 +00:00
Giel van Schijndel f26ccb421d Wrap function-macro NETenum in a do{}while(0) loop
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4239 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 13:33:27 +00:00
Giel van Schijndel 6aa9b6fa35 * Declare static string constants as `static const char string[]` rather than `char* string` (guarantees both constness and that we won't accidentily change the pointer)
* In NETcoder declare string str the same size as original (using sizeof), use sizeof() instead of magic numbers


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4237 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 13:12:58 +00:00
Dennis Schridde 2ba55d14a8 Record the time of compilation, too.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4233 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 00:05:41 +00:00
Dennis Schridde 6e89ffe22b Forgot to include physfs
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4231 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-22 19:11:29 +00:00
Per Inge Mathisen 6185741b66 patch #1018: Experimental language selection menu option.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4230 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-22 18:30:08 +00:00
Roman C 3b1c952de1 Speed up script execution when "--debug script" is not enabled.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4228 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-22 17:42:07 +00:00
Roman C 8478728699 Get rid of an unnecessary debug() call.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4225 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-22 17:23:28 +00:00
Giel van Schijndel 57389641e7 Remove the last content of deliverance.h (#define MAX_STR_LENGTH 256) to wzglobal.h and remove it
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4219 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 23:02:22 +00:00
Giel van Schijndel 8138e1b0d8 Turn some file-level comments in lib/widgets into Doxygen comments
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4209 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 21:36:39 +00:00
Per Inge Mathisen a622880946 Increase warning level and do cosmetic cleanup and remove dead code in events.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4208 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 16:52:10 +00:00
Dennis Schridde 9ca4445189 We always only have either config.h or config-macosx.h, but not both.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4207 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 16:38:57 +00:00
Giel van Schijndel 8421b9fee4 Turn some file-level comments in lib/widgets into Doxygen comments
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4206 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 15:40:23 +00:00
Giel van Schijndel de2b3ba61d Move psRetWidget into the W_SCREEN structure (instead of it being a global variable)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4205 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 15:40:09 +00:00
Dennis Schridde b1b2859ea3 New enum TEXPAGE_TYPE, to better control disabling/enabling of texturing. (Changed pie_SetTexturePage accordingly.)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4202 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 14:34:30 +00:00
Giel van Schijndel 9895df559d Make widgCreateScreen return the screen it created or NULL on failure
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4200 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 14:22:42 +00:00
Giel van Schijndel 3ed3acd891 Clean up formCreate and widgAddForm:
* Make formCreate and widgAddForm take their psInit parameters as const
 * Make formCreate return the button it created or NULL on failure


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4199 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 14:22:36 +00:00
Giel van Schijndel 86ca2b5f06 Clean up editBoxCreate and widgAddEditBox:
* Make editBoxCreate and widgAddEditBox take their psInit parameters as const
 * Make editBoxCreate return the button it created or NULL on failure


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4198 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 14:22:30 +00:00
Giel van Schijndel 6ea7968f46 Clean up labelCreate and widgAddLabel:
* Make labelCreate and widgAddLabel take their psInit parameters as const
 * Make labelCreate return the button it created or NULL on failure


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4197 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 14:22:20 +00:00
Giel van Schijndel 7e6e7d8b1f Clean up buttonCreate and widgAddButton:
* Make buttonCreate and widgAddButton take their psInit parameters as const
 * Make buttonCreate return the button it created or NULL on failure


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4196 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 14:22:15 +00:00
Giel van Schijndel a4987cfefb Clean up barGraphCreate and widgAddBarGraph:
* Make barGraphCreate and widgAddBarGraph take their psInit parameters as const
 * Make barGraphCreate return the bar it created or NULL on failure


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4195 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 14:22:05 +00:00
Giel van Schijndel cd8365fb01 Cleanup of widgRunScreen
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4194 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 14:21:53 +00:00
Giel van Schijndel 20448076bf Revert part of r4184:
* Don't use abort() as it'll be triggered in non-debug builds as well, so stick with the ASSERT(FALSE, ...


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4192 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 13:23:35 +00:00
Giel van Schijndel d5e31eb751 Make sliderCreate return a pointer to its created slider and NULL on failure
Const correctness:
 * make sliderCreate and widgAddSlider take its psInit pointers as const


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4185 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 11:47:23 +00:00
Giel van Schijndel dd02289a5e Clean up sliderCreate and widgAddSlider
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4184 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 11:47:19 +00:00
Per Inge Mathisen fe2ff84ed3 Fix bug #11216: When a tooltip is shown, the sky vanishes.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4164 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-20 14:59:33 +00:00
Roman C 3e615ea55f Add a missing definition of a flex symbol.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4159 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-20 01:09:52 +00:00
Roman C cfea441525 Aivolution AI:
-AI became more talkative
-more phrases can be recognized and used as commands
-cleanups

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4158 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-19 21:02:03 +00:00
Dennis Schridde 0c5ecc0efb Fix bug #11277: Strings containing non-ascii characters missing
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4118 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-17 07:23:48 +00:00