Commit Graph

3895 Commits (448349a24540bcd6eea8cc9d32d15c78c78b7578)

Author SHA1 Message Date
Giel van Schijndel 448349a245 Change 'elio' in the license statement to 'Elio Gubser'
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4858 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-29 17:28:00 +00:00
Roman C 1521a97bd8 Suppress #line creation for scriptvals_parser and level_parser, this fixes MSVC compilation.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4857 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-29 15:22:27 +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 7179a24fb5 Stuff frontend2.png on the background of frontend2.svg so that the improvements are more easily visible
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4853 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-29 00:02:46 +00:00
Giel van Schijndel f86812690c Add a (partial) Scalable Vector Graphics (svg for short) version of frontend2.png
By Elio, from this topic: http://forums.wz2100.net/?topic=1608.msg15980#msg15980


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4852 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-28 23:35:35 +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
Per Inge Mathisen f6919d5b1e Add highlighting for player flags in MP dialog. Icons by Elio.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4848 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-28 21:34:16 +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 0f71381685 Lets use some proper make rules!
* Use $@ and $< to refer to the targets and dependencies of make rules
 * Don't refer to make rule dependencies and targets by copying them!
 * Putting make rules on multiple lines isn't bad, in fact it increases readability!
 * Mark phony make rules (i.e. rules who's actions don't produce files) as `.PHONY`

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4846 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-28 20:58:13 +00:00
Giel van Schijndel a5a74770e8 Allow proper linking of the exceptionhandler with the raw Makefile system
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4845 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-28 20:46:33 +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
Per Inge Mathisen 8837e5630f Make repair facilities that are close to each other share the workload
if one is overloaded and others are out of work.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4843 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-28 19:06:21 +00:00
Giel van Schijndel 282b5793c2 Optimise the management of the 2D node-table `nodeArray`:
* Implement lazy deletion:
  * Keep a counter, `resetIterationCount`, and only treat nodes that have it's `iteration` member set to the same value as valid nodes
  * "Delete" all current nodes from the table by simply incrementing the `resetIterationCount` counter
  * Detect upcoming overflows of `resetIterationCount`, fully clear the node-table and reset the iterator if an overflow is "pending"

Patch #1059 by Dennis Luxen and myself


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4842 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-28 18:42:25 +00:00
Per Inge Mathisen 63d537d458 Also restore the LOS optimization of paths for trunk, removed in r4637, so
that long paths work again.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4841 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-28 18:33:07 +00:00
Giel van Schijndel eedd38bd80 * Fix several Doxygen comments and assign some to the group pathfinding
* Use ARRAY_SIZE(nodeArray[x]) to determine the amount of elements in nodeArray[x], instead of ARRAY_SIZE(nodeArray)
 * Add Dennis Luxen's comment from patch #1059


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4840 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-28 17:33:17 +00:00
Giel van Schijndel ffd381cd63 Rip out the hash table from the pathfinding code and replace it with a two dimensional array
Part of patch #1059 by Dennis Luxen;
 * I ripped out the iteration-counter optimisation to commit it seperately
 * Some small modifications for ISO C89 compliance (MSVC requires this)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4839 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-28 17:02:00 +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
Per Inge Mathisen 4a9db54241 Fix bug #11586: crash when reaching transport destination in mission beta 7
reported by Jan Dittberner. Smoke effect coordinates were not properly clipped.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4835 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-28 16:35:37 +00:00
Giel van Schijndel d16f801020 Add the new LeveLexer from r4833 to the Python Egg as well
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4834 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-28 00:45:15 +00:00
Giel van Schijndel d83e9ff749 * Add yet another Pygments lexer: LevelLexer which lexes .lev files
* Mark the .lev files as text/x-wzlev


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4833 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-28 00:41:59 +00:00
Giel van Schijndel df291b43fc Update the Code::Blocks and MSVC projects for the addition of the level parser in r4830
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4831 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-28 00:11:37 +00:00
Giel van Schijndel e0dc2071f0 Add a new bison/yacc parser: level_parser.y:
* Change level_lexer.l: 
  * Use lev_lval to return token-data in (instead of global vars)
  * Use strdup() to return strings to the parser and let the parser take care of memory clean-up (through Bison's %destructor directive)
  * Use the token constants as generated by Bison (instead of our own custom enum)
 * Rip out the custom state machine-like level parser from levels.c (was function levParse)
  * Remove all global variables associated with this parser
  * Remove the LP_* enum which was only used by this parser
  * Move function lev_error to level_parser.y
 * The new parser provides more verbose error messages if parsing fails

NOTE: The previous state machine-parser actually maintained state in two variables, so it was rather overly complex (quadratic complexity if you like)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4830 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-28 00:04:40 +00:00
Giel van Schijndel 0928c105e9 Change global var levelLoadType to a static one
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4829 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-27 23:57:22 +00:00
Giel van Schijndel ec293faa86 * #Include from the local directory (i.e. remove the "src/" part from some #include directives)
* Line out fix: use spaces, not tabs
 * Use the yy* macros provided by bison/flex instead of prefix*


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4828 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-27 23:44:40 +00:00
Giel van Schijndel 2523625716 r4826 didn't yet fix all, apparently there was commented out code changed as well
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4827 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-27 23:30:02 +00:00
Giel van Schijndel 16cd0c108e Oops! Apparently my search&replace regexp for r4825 contained a small typo causing a syntax error: fixed it
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4826 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-27 23:25:36 +00:00
Giel van Schijndel 62d1a9e5fc * Remove constant MULTI_TYPE_START and replace it by an enumeration value: LDS_MULTI_TYPE_START
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4825 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-27 23:21:19 +00:00
Giel van Schijndel e7269c9fce Lets not #include the Doyxgen generated files from a previous run in the Doxygen docs for the current run (specifically search.php)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4824 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-27 17:53:57 +00:00
Giel van Schijndel 785988922b Change functions levSetInputBuffer and levParse:
* Make them const correct
 * Pass the size parameter as a size_t (as it's a memory/buffer-size we're passing here)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4823 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-27 16:48:14 +00:00
Giel van Schijndel f7dd7eafba * Rename function levError to lev_error (bison/yacc #defines yyerror to lev_error)
* In function lev_error use ASSERT always (even in non-debug builds as it will still output a message there)
 * Don't use a single function levGetErrorData for retrieving the line no & piece of text being parsed, instead use two functions levGetErrorLine and levGetErrorText


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4822 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-27 15:59:03 +00:00
Giel van Schijndel fecc2a50d1 Change function levFindDataSet:
* Make it return it's result rather than write it in an output pointer (NULL will indicate failure instead of `false`)
 * Don't use two nested if-statements, use a single if-statement with double conditions using logical and (&&)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4819 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-27 15:27:39 +00:00
Giel van Schijndel 29e32010a1 Make typdef LEVEL_TYPE refer to the _level_type enum instead of a UDWORD
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4818 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-27 15:27:26 +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 937efd4683 Set the text/x-strres mime-type on all STRRES files
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4815 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-27 01:49:22 +00:00
Giel van Schijndel cbda32117e Add a STRRES lexer as well for Pygments
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4814 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-27 01:46:59 +00:00
Giel van Schijndel 7688f97ed3 * Add support for single line comments to the WRFLexer
* Perform non-greedy matching to match string literals (the data type in WRF files)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4813 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-27 01:46:55 +00:00
Giel van Schijndel c6fb031d82 Don't use a 'Whitespace' token, use 'Text' instead
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4811 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-27 00:50:54 +00:00
Giel van Schijndel 58bf1f3481 Make the WRFLexer parse text/x-wrf files
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4810 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-27 00:47:56 +00:00
Giel van Schijndel 91168e9116 Remove idiotic text/plain mime-types from Python source
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4809 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-27 00:27:44 +00:00
Giel van Schijndel 56e269d2c1 Add a lexer for Pygments (a generic syntax highlighter in Python)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4807 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-26 23:38:28 +00:00
Dennis Schridde cacf875ca9 Updated french by Vincent Laviron <Althalus> et al.
and: update-po


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4806 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-26 21:57:13 +00:00
Per Inge Mathisen ba0b3db627 Fix bug #11580: game crashes with SIGABRT when starting mission beta 1,
reported by Jan Dittberner.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4801 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-26 17:06:57 +00:00
Per Inge Mathisen 7204273bad Double the longest possible path that can be generated at once.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4790 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-26 16:00:53 +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 8154cad286 Note that a "privileged user" usually is "root"
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4786 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-26 14:33:32 +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
Dennis Schridde 477711c9a4 Optimise more pngs
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4784 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-26 13:59:50 +00:00
Dennis Schridde 3c3a5d9a89 Formating and dont download gpg-signatures, which wont be checked by anyone anyway.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4783 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-26 13:54:08 +00:00