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
Per Inge Mathisen
489bdb4dd2
Make sure network mode is turned off before entering campaign mode.
...
Fixes difficulty settings.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5067 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-12 13:10:26 +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
Per Inge Mathisen
6b0d121d83
Remove debug log call that shouldn't be there
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5058 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 22:32:21 +00:00
Per Inge Mathisen
92ceea0131
Forward port various minimal-impact stuff from tagfile load patch to reduce patch size.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5053 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 20:51:41 +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
Per Inge Mathisen
22d10c80aa
Allow VTOL to uncover fog of war and land-move to unseen areas in distance fog mode.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5048 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 15:20:34 +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
Per Inge Mathisen
ce1ebb31cb
Remove some dead code, and cosmetic cleanup.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5046 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 13:45:37 +00:00
Per Inge Mathisen
1fc9453cf5
Cosmetic cleanup to order.c
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5045 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 12:42:42 +00:00
Per Inge Mathisen
85848067f4
Add more informative assert to solve bug #11659 : crash on first level of
...
campaign reported by Paul Wise.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5042 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 11:04:38 +00:00
Per Inge Mathisen
7d0aae2e0e
Add more logging, used to find previous bugfix.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5039 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 10:50:15 +00:00
Per Inge Mathisen
21fa30ec47
Fix bug #11641 : Bad textures after third load of saved game, by making sure
...
we unload all level data when loading savegames.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5037 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 10:46:38 +00:00
Roman C
14152fd19c
Add an assert to a scripting function.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5033 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 10:19:04 +00:00
Per Inge Mathisen
8e1ad51337
Improve logging
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5031 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-11 09:21:47 +00:00
Giel van Schijndel
6f507abe43
Flex 2.5.4 (used on Windows) doesn't provide yyget_extra(), yyset_extra(), yyget_text() and yyget_lineno(), so work around this with a conditionally compiled section
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5030 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-10 22:12:51 +00:00
Giel van Schijndel
e360135367
Don't use %option bison-brigde in scriptvals_lexer.l as Flex 2.5.4 (used on Windows) doesn't support this option
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5027 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-10 19:35:44 +00:00
Giel van Schijndel
53f1a78b21
Don't use %option header-file in scriptvals_lexer.l as Flex 2.5.4 (used on Windows) doesn't support this option
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5026 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-10 18:52:07 +00:00
Giel van Schijndel
0c07334905
Update scriptvals.h for r5024
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5025 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-10 18:43:49 +00:00
Giel van Schijndel
3fae4ebae3
Make scriptvals_lexer.l non-reentrant as Flex 2.5.4 (used on Windows) doesn't support %option reentrant
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5024 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-10 18:42:59 +00:00
Giel van Schijndel
8049b92179
Don't use %option header-file in level_lexer.l as Flex 2.5.4 (used on Windows) doesn't support this option
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5023 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-10 18:31:17 +00:00
Per Inge Mathisen
a5628c83d9
Fix bug #11669 : "[widgGetNumTabMajor] couldn't find tabbed form from id" after completing any research
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5021 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-10 16:54:38 +00:00
Giel van Schijndel
f35270ab17
* Use lexer_input.[ch] instead of our own custom YY_INPUT implementation for level_lexer
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5017 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-10 15:08:32 +00:00
Giel van Schijndel
4b1ecee02b
* Remove the check whether we're in a comment at the end of file from level_lexer and scriptvals_lexer
...
* Don't use yywrap (%option noyywrap)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5016 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-10 14:43:23 +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
2bce339a72
Make the scriptvals_parser reentrant as well (the lexer was made reentrant already in r5009)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5011 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-10 00:49:29 +00:00
Giel van Schijndel
9cd6c0cef3
Store the return value in a temporary rather than duplicating code paths inside & outside of an if-branch
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5010 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-10 00:44:22 +00:00
Giel van Schijndel
970d167c4f
Make scriptvals_lexer reentrant
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5009 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-10 00:38:26 +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
Giel van Schijndel
2bc35a5714
Slight clean up of Bison & Flex options
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5007 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-10 00:02:48 +00:00
Giel van Schijndel
ab6b574aaa
Use yyextra instead of yyget_extra()
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5006 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-09 23:45:00 +00:00
Giel van Schijndel
baa6d4bcfe
* Use yyget_extra() & yyset_extra() to pass the input to the level_lexer
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5005 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-09 23:43:44 +00:00
Giel van Schijndel
3ad1b3ad91
* Produce level_lexer.lex.h for access to the lexer's functions from the parser
...
* Remove unused macro lev_getc
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5004 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-09 23:26:40 +00:00
Giel van Schijndel
c737a75ce3
* Produce scriptvals_lexer.lex.h for access to the lexer's function from the parser
...
* Use scrv_get_lineno() and scrv_get_text() to retrieve the lexer's data on an error rather than custom function scrvGetErrorData
* Move scrv_parse() out of the scriptvals.h header file as that function is only called from the file it's defined in
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5003 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-09 23:03:57 +00:00
Giel van Schijndel
1badf86412
* Use WZ_DECL_FORMAT to tell the compiler that scrv_error takes its parameters in printf syntax
...
* Fix a truckload of warnings caused due to useing the wrong format specifier when invoking scrv_error/yyerror (%s was used for UDWORD's)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5002 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-09 22:30:54 +00:00
Giel van Schijndel
a4078601ea
* Use the yyerror macro as provided by Bison instead of scrv_error (yyerror maps to the latter)
...
* Perform dynamic stack allocation instead of allocating 1kB in scrv_error
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5001 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-09 22:24:44 +00:00
Giel van Schijndel
b51af0be98
* Use yyextra to pass in the input file for scriptvals_lexer instead of a custom global variable (will make it easier to turn it into a reentrant parser)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5000 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-09 21:08:32 +00:00
Giel van Schijndel
f1846ea88a
* Remove unused function PHYSFS_getc() from the scripvals lexer
...
* Use yytext instead of scrv_text as Flex will take care of the naming
* Use yyget_lineno() instead of global var scrv_lineno
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4999 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-09 21:08:21 +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
Giel van Schijndel
c5d9664316
* Move the actual clearing of the pathfinding node-table to new function fpathHardTableReset()
...
* Call this function from fpathTableReset() and new function fpathShutdown()
* Add a function fpathShutdown() and call it from systemShutdown() in init.c to free up the pathfinding's memory on exit
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4996 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-09 19:57:51 +00:00
Per Inge Mathisen
a98c3f9621
Render super-cyborgs using the bucket list, to avoid jittering HP bars.
...
Patch by Buginator.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4994 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-09 18:24:20 +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
Per Inge Mathisen
fba8eca7a0
Remove unused declaration of fpathSetBlockingTile
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4972 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-08 21:00:20 +00:00
Per Inge Mathisen
50886c9389
Ooops. Committed a debug call too many.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4971 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-08 20:25:18 +00:00
Per Inge Mathisen
7e999b7ead
Make sure we release paths when we exit a map.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4970 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-08 20:10:31 +00:00
Per Inge Mathisen
a65115e162
Add debug calls to try to debug crazy paths when blocked.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4969 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-08 18:55:06 +00:00
Per Inge Mathisen
4f543a66c8
Revert r2570 and adapt it to current trunk. This provides us with a
...
thread-safe function to check whether a tile has a tall structure.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4968 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-08 18:13:27 +00:00
Per Inge Mathisen
4294b5f6c4
Remove non-working path recycling code. Better rewrite this functionality from scratch later.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4967 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-08 17:44:02 +00:00
Per Inge Mathisen
3ac3130e3c
Add some debug calls, remove unused code.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4966 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-08 17:39:27 +00:00
Per Inge Mathisen
8a00071e05
Fix potential crash bug in path-finding code introduced in r4964.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4965 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-07 21:14:37 +00:00
Per Inge Mathisen
1a42ffda05
Remove the limit on how long a path can be, remove the attack wall hack, and remove
...
the line of sight optimization of paths. Experimental changes, so please do not backport.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4964 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-07 20:23:39 +00:00
Per Inge Mathisen
ab90207cc0
Fix GUI crash when loading a specific savegame twice in a row. A button
...
did not exist but we tried to update it anyway.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4962 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-07 19:14:31 +00:00
Per Inge Mathisen
f3a5558e21
Pass propulsion type as a parameter to raycasting, path-finding and tile
...
blocking functions so that we do not have to set global state to know
which kind of propulsion we are testing. This change is experimental,
and may break VTOL behaviour subtly, please do not backport.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4960 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-07 16:37:46 +00:00
Roman C
1fd785ba09
Get rid of 100 "'return' : 'BOOL' differs in levels of indirection from 'BASE_OBJECT *const '" warnings on MSVC.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4957 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-07 14:50:48 +00:00
Freddie Witherden
237f56c1c3
Fix a syntax error in r4942 that gcc did not seem to mind about.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4945 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-06 18:03:35 +00:00
Freddie Witherden
19b062a52a
Cleanup of transporter.c (Dead/commented code removal). There should be no functionality changes.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4942 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-05 18:03:08 +00:00
Freddie Witherden
6846c2645f
Remove some dead-code associated with a never-used ray clipping method.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4941 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-05 16:50:59 +00:00
Per Inge Mathisen
d0d089cfd0
Cosmetic cleanup of raycast.c
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4940 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-05 16:23:48 +00:00
Giel van Schijndel
4cc79156a9
Make tile[SF][XY] const
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4938 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-05 14:01:41 +00:00
Per Inge Mathisen
5741927d9e
More cosmetic cleanups. Add comment on previous hack fix.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4935 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-04 21:31:44 +00:00
Per Inge Mathisen
18571927a5
Various cosmetic cleanups in hci.c
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4933 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-04 20:58:20 +00:00
Per Inge Mathisen
f7aba94675
When upgrading a structure module, close all open stats windows.
...
This fixes a long standing widget assert, and hopefully fixes
bugs #9336 : segfault, widget.c line 867 r1510 and bug #11446 :
multiplayer crash (assert) on wheel level.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4932 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-04 20:54:14 +00:00
Per Inge Mathisen
d2956ea953
Fix error message when displaying EMP VTOL bombs.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4927 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-04 16:22:48 +00:00
Per Inge Mathisen
88d85a26f7
Remove limitation that VTOLs cannot pass over tall cliffs, and allowance that
...
VTOLs can fly over anything to rearm. This removes the ugly g_psDroidRoute hack.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4926 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-04 16:10:14 +00:00
Per Inge Mathisen
0be3471f33
Remove duplicated code from fpathGroundBlockingTile
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4921 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-04 15:26:26 +00:00
Giel van Schijndel
fd9b608a6c
* Remove macro TERRAIN_TYPES which was just an alias for TER_MAX (and replace all instances of it with TER_MAX)
...
* Move some variables into a more local scope
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4918 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-04 15:12:37 +00:00
Giel van Schijndel
7b12081033
sDisplay is a member variable from BASE_OBJECT, so don't bother casting tile->psObject to a STRUCTURE* or FEATURE* before using this member variable
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4917 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-04 15:04:07 +00:00
Giel van Schijndel
3a11c25d54
* Turn macros TILE_OCCUPIED, TILE_HAS_STRUCTURE, TILE_HAS_FEATURE, TILE_HAS_WALL, TILE_HIGHLIGHT, TILE_HAS_TALLSTRUCTURE and TILE_HAS_SMALLSTRUCTURE into static inline functions TileIsOccupied, TileHasStructure, TileHasFeature, TileHasWall, TileIsHighlighted, TileHasTallStructure and TileHasSmallStructure respectively
...
* Move the definition of MAPTILE above these ^^ macros and functions to prevent declarations problems
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4916 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-04 14:56:33 +00:00
Roman C
7f96d8ad29
Don't try to draw effect, that is used to visualize a radius, off map. This prevents an assert in map_Height().
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4911 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-04 11:59:57 +00:00
Giel van Schijndel
bedb5a77cb
Remove function declarations for non-implemented functions receiveWholeDroid and sendWholeDroid
...
PS Thanks Troman for granting me the privilege of removing these declarations. I just love cleaning up code ;-)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4907 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-03 23:13:20 +00:00
Per Inge Mathisen
df4e26104e
Remove unused code
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4906 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-03 22:04:05 +00:00
Roman C
b32efa5ce5
Fixed vertical position of the 'ready' button.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4904 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-03 20:09:17 +00:00
Roman C
aa97edfd3c
Add proper icons for the 'ready' buttons. Icons by elio`.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4900 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-03 17:43:55 +00:00
Per Inge Mathisen
d5200992a1
Remove references to old bitmap font images.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4899 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-03 17:04:15 +00:00
Per Inge Mathisen
5fcc77fe59
Simplify fpathRoute parameters, and its beautify error log calls.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4898 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-03 11:57:54 +00:00
Giel van Schijndel
6a236994ae
Move psActionTarget into a more local scope, to ease debugging of bug #11609
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4897 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-03 11:16:03 +00:00
Per Inge Mathisen
6f7ee5236e
Remove unused aMapLinePoints global.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4891 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-02 21:10:08 +00:00
Per Inge Mathisen
1423e2d742
Add path-finding test and measurement to selftest.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4890 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-02 21:06:39 +00:00
Giel van Schijndel
0071531040
Fix several memory leaks in level_parser.y that occur when parsing errors occur:
...
* In case of a semantic error (i.e. we detect something is wrong in a parsing rule) deallocate the resources of our current tokens __before__ calling YYABORT
* Only add a LEVEL_DATASET* to the psLevels list when we've fully and succesfully finished parsing of the corresponding level_entry
* Add a bison "destructor" that handles destruction of tokens on the parsing stack when a syntax error occurs (i.e. the current tokens cannot be matched to any parsing rule)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4888 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-02 20:37:23 +00:00
Giel van Schijndel
006ec9e71a
clean up levShutDown()
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4886 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-02 19:51:23 +00:00
Per Inge Mathisen
76110b6156
Vastly simplify fpathGatewayRoute
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4885 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-02 19:03:10 +00:00
Giel van Schijndel
ff89c2e63f
Less leaking of memory from level_parser.y
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4884 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-02 18:58:43 +00:00
Giel van Schijndel
d722cb24bb
Allow level files (*.lev) to be empty, though give a warning when they are (LOG_WARNING)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4882 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-02 18:22:59 +00:00
Giel van Schijndel
9c73cefd89
Don't ASSERT on a parsing error, use debug(LOG_ERROR, ... instead (the parser's return-value will be enough to determine that an error occurred)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4879 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-02 17:59:39 +00:00
Giel van Schijndel
91fb082019
Minor cleanup
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4874 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-01 20:50:30 +00:00
Giel van Schijndel
d962bcbf1c
* Use a nice & easy to maintain string to enum mapping-array and utilise a for-loop to fetch the correct value from it (instead of a huge amount of code repetition)
...
* Some const correctness
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4873 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-01 20:25:20 +00:00
Giel van Schijndel
507a1a6da2
Less bitfucking:
...
* Don't store whether a research item is possible in a bitflag; use a boolean instead
* Use functions instead of macros to access research->possible
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4872 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-01 20:00:13 +00:00
Roman C
738344ccf4
Get rid of all references to the 'OK' button that used to start a multiplayer game.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4866 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-01 12:52:24 +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
Per Inge Mathisen
28da8c3c36
Fix warnings
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4864 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-30 17:14:16 +00:00
Roman C
d764b211cb
Scripting engine:
...
-added a way to check map tiles for visibility
-added a function to check for visible droids inside a certain range
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4862 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-30 15:44:04 +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
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
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
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
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
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
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
Giel van Schijndel
c62840d5d8
Don't just ASSERT (debug-only) when we're out of memory, use debug(LOG_ERROR) and abort() instead
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4779 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-26 12:11:16 +00:00
Giel van Schijndel
7211a9e2b5
Revert r4776 as it is a duplicate of r4775
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4778 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-26 12:09:54 +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
Giel van Schijndel
199adccc0a
ASSERT that radarBuffer != NULL at the only place where we use it
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4776 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-26 12:07:43 +00:00
Per Inge Mathisen
f39e1617ba
Revert change in r4767 that moved radar initialization from stage
...
two to stage three, since this caused bug #11578 : segfault in radar.c
reported by Jan Dittberner.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4775 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-26 12:07:07 +00:00
Per Inge Mathisen
1ee52fc422
Fix overzealous assert reported in bug #11569 : crash when starting transport by Jan Dittberner.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4771 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-25 19:15:39 +00:00
Roman C
307694d9d0
Holding down SHIFT while giving unit an order doesn't queue a waypoint anymore (holding down CTRL still does this), instead it gives a unit a scout command instead of a move command. This will make a unit stop when it encounters an enemy on its way to the destination.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4770 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-25 19:11:51 +00:00
Per Inge Mathisen
7533f7880f
More partial patch #969 : Rewritten minimap code merging
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4769 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-24 20:55:55 +00:00
Per Inge Mathisen
81bf897f61
More partial patch #969 : Rewritten minimap code merging
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4768 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-24 20:45:01 +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
Roman C
71752aaa2b
Add missing function declarations.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4766 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-24 20:28:07 +00:00
Roman C
7d6fe6bdff
Fix problems caused by beacon code. This should fix bug #11005 and bug #11373 .
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4765 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-24 20:02:02 +00:00
Per Inge Mathisen
f3922f404a
Add basic map saving to in-game editor. Not yet useful for real world stuff.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4764 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-24 19:49:43 +00:00
Per Inge Mathisen
2ffc569a35
Clean up powerCheck, making the assert more informative.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4760 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-24 18:02:53 +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
Roman C
1b128781cf
-make sure commander's initial level doesn't get boosted in campaign
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4757 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-24 16:50:27 +00:00
Giel van Schijndel
747e22d243
Merge two if-statements
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4748 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-22 23:49:08 +00:00
Giel van Schijndel
b66fbbad42
Clean up fpathGroundBlockingTile, fpathHoverBlockingTile and fpathLiftBlockingTile in fpath.c
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4747 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-22 22:35:42 +00:00
Giel van Schijndel
e18c77c1ab
Revert commit of fpath.c in r4745 (was pure experimental stuff, which I accidentily committed along)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4746 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-22 22:32:54 +00:00
Giel van Schijndel
32e07924fb
Use <a href... for links in mainpage.dox (Doxygen recognizes that tag and uses it to generate documentation, even for, e.g. LaTeX)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4745 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-22 22:29:51 +00:00
Per Inge Mathisen
516974e869
Fix bug #11549 : Placing buildings does not level terrain properly, reported by Dale Gill.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4743 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-22 16:35:14 +00:00
Giel van Schijndel
f7c476374f
Simplify function audio_ObjectDead():
...
* Don't check whether the given pointer is NULL for one billion times
* Move some variables into a more local scope
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4740 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-22 00:59:18 +00:00
Roman C
61cb4979d8
Give enemy weapon droids more priority when looking for a target.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4738 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-21 19:58:14 +00:00
Giel van Schijndel
406ab54031
Lets not use `goto` when a simple `return` suffices
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4737 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-21 18:55:48 +00:00
Giel van Schijndel
11c2f3547e
Mark global variables `psOpen` and `apsNodes` as static since they're not used in other files anyway
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4736 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-21 18:51:03 +00:00
Per Inge Mathisen
843713a153
Add backend support for multiple brush sizes for internal map editor.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4734 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-21 17:14:13 +00:00
Giel van Schijndel
18824153a0
* Add Doxygen documentation to yet some more functions
...
* Rewrite function `fpathHashPresent` to use a for-loop rather than a dirty while-loop
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4726 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-21 09:52:19 +00:00
Giel van Schijndel
489896d627
Make astarInner an `int` and ASSERT that it stays non-negative (i.e. that it doesn't overflow)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4725 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-21 09:25:10 +00:00
Per Inge Mathisen
a36a4fd3c3
When edit pause mode is on, enable the build and manufacture reticule buttons
...
and make them work as if ctrl+o options were chosen.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4724 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-21 09:19:10 +00:00
Giel van Schijndel
d3f0fbc501
* Put fpathUpdate() in the Doxygen documentation group `pathfinding`
...
* Move preprocessor constant FPATH_LOOP_LIMIT from fpath.h to astar.h
* Add Doxygen documentation to FPATH_LOOP_LIMIT and global variable astarInner
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4723 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-21 09:18:37 +00:00
Per Inge Mathisen
c5f949a63e
When creating new map, remove old flags, structure limits, and gateways.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4722 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-21 08:51:36 +00:00
Per Inge Mathisen
3357930250
New ctrl+o menu button and cheat key to realign height of all map objects.
...
Delete keymap before using cheat key.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4721 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-21 08:28:39 +00:00
Per Inge Mathisen
20bd0ab135
Make sensor display key ('z') work with distance fog as well.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4720 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-21 08:18:57 +00:00
Per Inge Mathisen
7c4ae94a0d
Cleanup edit3d and make sure we do not crash on out of map coordinates.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4719 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-21 07:21:52 +00:00
Giel van Schijndel
f83268fd17
* Add a Doxygen documentation module (named `pathfinding`)
...
* Add Doxygen documentation for a lot of path finding related functions & types and add them to the `pathfinding` documentation group
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4717 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-21 00:12:10 +00:00
Dennis Schridde
faff55ad5e
Move -lstdc++ from Makefile to configure.ac
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4715 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 23:56:45 +00:00
Giel van Schijndel
4b6438b30a
* Make function formationFind() return the formation it found (and NULL if none found rather than false) instead of writing it into an output parameter
...
* Add Doxygen documentation to some formation functions
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4710 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 23:42:59 +00:00
Giel van Schijndel
04f46f40ee
Clean up function fpathHashFunc:
...
* Make less assumptions about the amount of bits & bytes in types; use sizeof() instead
* Use int32_t instead of SDWORD as the former guarantees a constant size
* Some less magic numbers
* Add Doxygen documentation to this function
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4707 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 23:03:12 +00:00
Giel van Schijndel
0ec5a34e25
Add Doxygen documentation to some functions in move.[ch]
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4706 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 22:43:14 +00:00
Giel van Schijndel
1d129c1b13
Move the mainpage for the Doxygen documentation from src/main.c to doc/mainpage.dox
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4703 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 20:17:38 +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
Per Inge Mathisen
86f67552ff
Add hack to make player number appear in flag list again, instead of
...
some other random graphic. Also add proper tooltip to this dialog.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4699 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 16:33:32 +00:00
Giel van Schijndel
2a0f803c51
Const correctness
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4695 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 15:08:14 +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
Dennis Schridde
e0fc8e8f2b
Add some more docs on archive mounting
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4686 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 00:06:34 +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
bcf6686b7f
Add saving games and basic checking of results to --selftest.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4683 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-19 13:14:10 +00:00
Per Inge Mathisen
334cdc3e2e
Fix bug #11501 : multiplayer crash with nexus hydras, reported by Paul Wise.
...
Also fix another crash bug with nexus link where a droid would acquire a null target.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4682 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-18 21:19:12 +00:00
Per Inge Mathisen
1c7f32f6c6
Extend addMultiEditBox() to enable highlighted buttons. Make player name,
...
game name, and map name edit box buttons highlightable in MP dialog.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4680 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-18 19:45:10 +00:00
Per Inge Mathisen
359110bf52
Make host game and keymap defaults buttons shaded on mouse highlight, like
...
the other similar buttons. Icons by Elio Gubser.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4677 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-18 18:00:43 +00:00
Per Inge Mathisen
34165e2ec8
Fix bug #11519 : crash when saving the game. Reported by Jan Dittberner.
...
I forgot to add size of compatibility zone header to save buffer size in r4637.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4676 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-18 17:30:59 +00:00
Per Inge Mathisen
01af04febd
Change addMultiBut so that you can specify different images for buttons when
...
they are normal state, pressed state, and highlighted by mouse. Removes ugly
hack to provide highlighting for only some buttons.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4675 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-18 17:05:40 +00:00
Giel van Schijndel
1e0ef48650
Use WZ_DECL_UNUSED to inhibit warnings about unused parameters
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4671 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-17 20:29:19 +00:00
Per Inge Mathisen
af07a3fda7
Move map preview button in line with the buttons above it
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4670 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-17 17:00:19 +00:00
Per Inge Mathisen
01d9402ab5
Add highlight frame around the ready button
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4669 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-17 16:46:55 +00:00
Per Inge Mathisen
f89e3bf1a6
Add a question mark button icon.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4666 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-17 15:49:41 +00:00
Giel van Schijndel
5b0612e881
some const correctness
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4662 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-17 11:53:49 +00:00
Giel van Schijndel
f4d635aab9
ASSERT the type of psDroid __before__ using psDroid
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4660 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-16 21:31:17 +00:00
Roman C
55c1d4362e
Fix MSVC compilation.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4658 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-16 19:12:07 +00:00
Per Inge Mathisen
f432051012
Move assert in formationUpdateSpeed under conditional to stop a crash.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4657 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-16 18:05:18 +00:00
Giel van Schijndel
2f7817c772
* Replace some uses of BASE_OBJECT* with DROID* to reduce yet some casting
...
* Fix indentation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4653 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-16 00:15:29 +00:00
Giel van Schijndel
21b3597284
* Formations work purely, and only with DROIDs, so rather than casting back and forth to BASE_OBJECT* pointers, just stick to using DROID* pointers only
...
* Huge simplification due to not needing to handle other derivatives of BASE_OBJECT than DROID anymore (also a huge reduction in the amount of casting)
* Don't check whether a DROID has -> type == OBJ_DROID anymore (fpath.c left-over)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4652 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-16 00:01:41 +00:00
Giel van Schijndel
1b071cb08f
Cleanup:
...
* Indentation fixes
* Const correctness
* Simplification (less casting) and use "return retval;" rather than "ret = retval; return ret;"
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4651 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-15 23:11:42 +00:00
Giel van Schijndel
0dd849b875
Const correctness
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4650 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-15 23:08:38 +00:00
Giel van Schijndel
a81756eba5
* Pathfinding works purely, and entirely with DROIDs, so rather than casting back and forth to BASE_OBJECT* pointers, just stick to using DROID* pointers only
...
* Get rid of some (SDWORD) casting (in all these cases the assignment operator will take care of that anyway)
* Don't cast an unsigned variable (UDWORD) to a signed integer (int) for printf purposes, use an unsigned integer instead (unsigned int)
* Remove duplicated code (an if-statement had (X == Y || X == Y) as part of its condition, reduced it to (X == Y))
* Make the copy of aDirOffset in astar.c const as well
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4649 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-15 22:54:37 +00:00
Giel van Schijndel
a855f10f4e
* Make static array aDirOffset const
...
* Rewrite the Doxygen comment for fpathUpdate()
* Some style fixes
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4648 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-15 21:51:26 +00:00
Freddie Witherden
12ff794e99
Update fpathRandChoice to use rand() as opposed to a custom generator.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4647 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-15 21:46:03 +00:00
Giel van Schijndel
d96f65d3be
Don't include fpath.h if it isn't necessary
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4646 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-15 21:41:47 +00:00
Giel van Schijndel
ade39a7c6f
Don't include astar.h if it isn't necessary
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4645 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-15 21:35:19 +00:00
Per Inge Mathisen
c485aa69f5
Weed out some forgotten dead code.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4644 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-15 21:31:35 +00:00
Per Inge Mathisen
1403e9c36a
Remove impossible conditional
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4643 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-15 21:20:53 +00:00
Giel van Schijndel
1bb45ae917
Make apsNodes in astar.c a static array (instead of dynamically allocated)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4642 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-15 21:19:24 +00:00
Freddie Witherden
83da7b8008
Commit patch #1055 which cleans up droid.c by removing a large amount of dead code. There should be no functionality changes.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4640 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-15 21:00:20 +00:00
Per Inge Mathisen
ed5ffbfa8b
Remove zones and gateway routing. Also remove optimization of path steps by
...
line of sight raycasting. This removes two whole classes of path-finding bugs
at the cost of some performance. Hopefully we can address performance later.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4637 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-15 20:52:53 +00:00
Giel van Schijndel
d854beb5d5
Throw out my dirty preprocessor abuse to prevent duplication of a few characters in favour of code reability (apparently for MSVC as well)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4634 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-15 18:32:51 +00:00
Per Inge Mathisen
fa0b7162fa
Do not assert with invalid position if a droid tries to build where it
...
stands, and it has no HQ or landing lights to guide it away from there.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4631 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-15 16:55:44 +00:00
Roman C
24e128b5dc
- units get effectiveness boost (equal to the promotion to the next rank) just by being assigned to a commander
...
- commander-related cleanups
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4630 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-15 15:15:19 +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
Roman C
467d88158c
-make sure AI receives gifted droids, this fixes bug #11442 .
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4609 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-14 19:19:16 +00:00
Roman C
7c5c437e9e
-make sure the last AI player doesn't get restored when a client joins an mp game
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4606 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-14 17:25:49 +00:00
Giel van Schijndel
26c2c50036
Add the ability for auto-loading of mods
...
Automatically load all mods found in:
* "mods/global/autoload" in both campaign as well as multiplayer
* "mods/campaign/autoload" in campaign only
* "mods/multiplay/autoload" in multiplayer only
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4604 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-14 16:15:29 +00:00
Giel van Schijndel
a6d84b7c16
Pass NULL to addSubdirs and removeSubdirs, not false (as the target type is a char* pointer)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4603 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-14 16:15:20 +00:00
Roman C
49a6050b07
-don't apply game difficulty setting during multiplayer games, since it can negatively affect syncing.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4602 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-14 15:48:56 +00:00
Giel van Schijndel
da987a28dd
Don't use DEBUG-only member variables in an NDEBUG build
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4593 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-14 00:25:48 +00:00
Giel van Schijndel
465bf14202
Only attempt ot match one string against the DROID's componentName and stop matching when succesfull
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4580 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-13 18:25:45 +00:00
Giel van Schijndel
8e4baea1bf
Slight style fix
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4578 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-13 12:32:22 +00:00
Per Inge Mathisen
e04da6e653
Make currentGameFrame static
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4577 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-13 09:41:48 +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
7605a8bf10
Get rid of an unnecessary extern.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4573 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-12 15:13:58 +00:00
Giel van Schijndel
348eed0cab
INTINGAMEOP_.* apparently enumerates values, so lets make it an enum!
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4572 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-12 15:07:24 +00:00
Giel van Schijndel
c217ebb788
Use static inline functions instead of macros (type checking!)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4571 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-12 13:39:47 +00:00
Giel van Schijndel
921726c260
* Const correctness
...
* Merge the conditions of nested commits
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4570 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-12 13:26:26 +00:00
Giel van Schijndel
7fa6ce0c65
Restructure function visGetBlockingWall:
...
* return a pointer instead of a BOOL (will be a NULL pointer on failure)
* don't `goto` the end of the function when we've found a blocking wall, just return the pointer instead
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4569 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-12 13:26:08 +00:00
Giel van Schijndel
cfbb1aa1ac
Backport r4567 from the 2.1 branch to trunk:
...
* ASSERT that we have non-NULL pointers
Patch from bug #11444 by Paul Wise
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4568 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-12 11:00:53 +00:00
Giel van Schijndel
d78c51050d
Slight restructuring to increase readability of if-statements
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4566 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-12 10:52:16 +00:00
Roman C
1e62c71165
Separated single player and multiplayer frame rate limits. Single player is set to 60 fps and is configurable. Multiplayer fps limit is set to 45 and is hardcoded so that people will not cheat without knowing it.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4565 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-11 21:40:38 +00:00
Per Inge Mathisen
5c368bae76
Adjust log message to include info if player is AI or not.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4564 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-11 18:55:48 +00:00
Per Inge Mathisen
f240da3007
Quiten the gwCheckZoneSizes warnings.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4561 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-11 18:47:03 +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
87cf295898
Reset Ready status when game settings get changed.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4559 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-10 19:19:04 +00:00
Per Inge Mathisen
ed6f0122c7
If software cursors are turned on, also use them for in-game menues, to avoid cursor
...
position wrapping in fullscreen mode due to quirks in SDL. Patch by Buginator.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4556 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-09 20:48:50 +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
3c749e2ee3
Fix bug #11467 : Assert when loading a savegame in campaign. Reported by Dale Gill.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4554 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-09 19:54:14 +00:00
Per Inge Mathisen
0795502283
Remove some remains of the force editor.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4552 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-09 18:57:46 +00:00
Per Inge Mathisen
9d9f9cd747
Fix bug that would make sliders inactive when not hosting a game.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4551 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-09 18:56:35 +00:00
Roman C
53d09806ea
Increased number of objects bucket sort can handle to 4000, 2000 was apparently still not enough.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4546 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-08 19:10:31 +00:00
Roman C
9d473052b8
Increased number of objects bucket sort can handle (was previously lowered in r1286), this should fix bug #11357 .
...
Patch by Buginator with slight changes.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4544 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-08 16:55:50 +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
Giel van Schijndel
021a866db5
Don't wrap the ASSERTs in droidCheckReferences in #ifdef DEBUG sections as ASSERT won't bail out on NDEBUG builds anyway
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4535 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-06 16:47:19 +00:00
Per Inge Mathisen
0f012424c3
Restrict number of buildings that can be created from cheating and network
...
to building limits, and make sure they are sane also for lassat and satlink.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4534 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-06 16:21:50 +00:00
Per Inge Mathisen
dfec7a2994
Fix crash if you place buildings with ctrl+o menu and buildStructure fails.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4532 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-06 16:06:08 +00:00
Giel van Schijndel
1ae21868b3
r4529 was incomplete: turn off the coloured mouse cursor by default
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4530 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-06 15:26:35 +00:00
Giel van Schijndel
6aaefd1720
turn off the coloured mouse cursor by default
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4529 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-06 15:24:06 +00:00
Per Inge Mathisen
17dc690919
Verify that the map created in tagfile savegame is correctly written. This makes
...
saving signficantly slower, but that is the cost of living on the bleeding edge ;)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4528 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-06 13:18:36 +00:00
Per Inge Mathisen
741c6a9c10
Give new maps sensible defaults, and reset grid system. It is now possible to
...
create new maps, populate them with units belonging to different players, and play,
all from inside the game! Well, it is possible. Do not expect much yet.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4518 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-06 00:23:18 +00:00
Per Inge Mathisen
1811698955
Add a pause button to ctrl+o menu which sets the game into a new 'edit pause'
...
state in which most but not all game related mechanics are paused. Activate
this pause mode automatically if a new map is created.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4517 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-06 00:09:13 +00:00
Giel van Schijndel
c93c067336
#include frame.h in src/version.h as it depends on it
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4515 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 23:47:19 +00:00
Per Inge Mathisen
4edccfb7f9
Add button in ctrl+o menu for placing tiles on the map.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4512 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 23:09:55 +00:00
Per Inge Mathisen
5dd5f40759
Enable map new/save/load buttons by default in ctrl+o menu
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4511 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 22:58:33 +00:00
Per Inge Mathisen
4275ae6ff6
Remove dead code
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4510 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 22:42:37 +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
Per Inge Mathisen
0cfb8a1cc1
Add new function droidSetPosition() to sanely teleport droids. This hopefully
...
fixes the current crashes in campaign for trunk.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4507 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 22:11:49 +00:00
Per Inge Mathisen
f246298c42
Mostly cosmetic cleanup of mission code. Remove dead code.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4504 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 21:25:00 +00:00
Per Inge Mathisen
c5084cec31
Remove some dead code
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4502 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 20:50:15 +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
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
Per Inge Mathisen
a2c02f9fb7
Fix savegame bug. Do not use strlcat with sizeof on array pointers of unknown length!
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4485 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 15:27:23 +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
4ca8e85ae4
Remove two asserts to make savegames work again.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4482 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-04 22:50:23 +00:00
Roman C
c3164dc49a
Update comments for a function.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4474 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-03 22:08:25 +00:00
Roman C
f60f39c853
Fix one one the possible reasons for "SendDroidMove: Invalid move order" assert.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4473 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-03 22:00:14 +00:00
Roman C
778a2f907f
Make DROID_CYBORG_SUPER droid type visible to scripts.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4471 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-03 17:31:15 +00:00
Roman C
70884fa8e1
Move victory/loss text messages from scripts to the engine, to make them translatable.
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4470 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-03 16:50:05 +00:00
Freddie Witherden
a2ecc16596
Fix a bug which caused the in-game kill count not to work. (Credit goes to Buggy on this one.)
...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4468 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-02 16:21:38 +00:00
Roman C
173f03519a
-don't add beacons to the map implicitly for the player sending it when using scripts, the scripts must explicitly do that now
...
-fixed beacon sound playing for wrong players
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4458 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-31 22:52:47 +00:00