Commit Graph

625 Commits (9c79b6b10976e505f0c2202b80ddee8faf60cff0)

Author SHA1 Message Date
Giel van Schijndel 9c79b6b109 ISO C 90 (or C-99 without GNU-extensions) compatibility fix:
* change all casts using the typeof() keyword to their respective typename
 * append a compiler flag for GCC (-fno-gnu-keywords) which disables GNU-specific keywords (typeof and asm only in case of C-99, inline as well if C-90 mode is used), to aid in code portability (i.e. among compilers)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@970 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-08 12:42:51 +00:00
Giel van Schijndel 68d435097e enabled some more code to compile with a C++ compiler without -fpermissive (i.e. there should be *less* compile-time errors now)
* moved several #defines to the enums where they belong
 * changed some datatypes on declaration
 * prepended casts to malloc calls (using typeof() style)
 * changed some (void*) casts to (void**) where required
 * removed several #defines and there instances and then replaced them with their corresponding values from an enum

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@969 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-07 23:50:30 +00:00
Roman C dc59e61b9e -fixed assert and debug message
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@968 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-07 20:15:07 +00:00
Roman C 3336e8717a AI update:
-AI can now request help using chat messages when in trouble.
-AI can recognize other players (Humans or AIs) asking for help and react accordingly by sending units to help ally - indicate position on the map with a beacon (Alt+H) and send a chat message requesting help.

Example:
"Help"
Addresses all players sender communicates with.

Certain AIs can be addressed directly:
"Black, Red and SantaClaus help me!!!"

-"i'm fine" or similar forms understood by lexical parser will notify AIs to send its units back.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@967 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-07 20:11:50 +00:00
Roman C ddbc2564b5 Lexical parser update:
-Fixed endless recursion in one of the lexical parser rules.
-Disabled log warnings when no meaningful information could be extracted form a player chat message.
-Small update to the lexical chat parser rules.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@966 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-07 19:44:04 +00:00
Roman C 80a5a97366 Disabled ability to click on help blips - this seem to cause ugly GFX artefacts sometimes, text could not be manually set by players anyway.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@965 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-07 19:36:58 +00:00
Dennis Schridde f1ad4d83c9 - Expand DISP_HEIGTH/DISP_WIDTH
- Remove an unused function


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@964 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-07 19:29:26 +00:00
Roman C d96cc304b1 Fixed a crash when a cyborg mechanic gets destroyed.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@963 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-07 19:08:23 +00:00
Giel van Schijndel 241f40f5fc soundsystem fixes/improvements
* remove file-global var `ALfloat listenerPos[3]` and replaced with function calls to alListener{Get}{n}{fi}{v}( AL_POSITION, ... )
 * modified sound_SetObjectPosition() to be better human-readable (removed some unnecessary temporary vars)
 * modified sound_SetPlayerOrientation() to a more verbose writing (+Doxygen comment)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@962 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-07 16:28:54 +00:00
Dennis Schridde 37c74739a2 Patch by Shurcool: Selection Box:
1) [FIX/ADDITION] the selection box is now filled in with a translucent shade of grey, like Pumpkin Studios intended it, but it wasn't working due to a bug. Can be disabled with the --noTranslucent command line parameter (theoretically along with all other transparency effects, but in practice it doesn't seem to affect anything else because the check for war_GetTranslucent() is not used anywhere else).
2) [FIX] the selection box now always pulses consistently inwards, no matter in which orientation you drag it (ie. from top-left to bottom-right, from bottom-left to top-right, etc.)
3) [FIX] the selection box doesn't flash/disappear momentarily sometimes when the mouse cursor is positioned at the very edge of the screen anymore


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@961 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-07 13:16:02 +00:00
Giel van Schijndel c898c17ecb * fix compiler issues with non-C99 conforming compilers
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@960 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-05 18:00:46 +00:00
Roman C c89cadfb97 Added a script function to perform up to 8 (instead of just 1) structure iterations at the same time;
initEnumStructB() - to initialize iteration, enumStructB() - to iterate.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@959 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-04 21:47:12 +00:00
Giel van Schijndel e2de942f02 * fixed some compiler warnings
- except for script and sound all libs can now be compiled using -Werror (means they generate no warnings) and without -fpermissive except for the files generated by flex
  - netplay/netplay.c: changed variable size from unsigned to signed according to SDL spec ( http://www.libsdl.org/cgi/docwiki.cgi/SDLNet_5fTCP_5fSend )

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@958 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-04 20:24:26 +00:00
Giel van Schijndel 851b570bc5 * functions memRecReport & memMemoryReport:
- removed these functions and all calls to it if REALLY_DEBUG_MALLOC isn't defined, because they don't do anything currently when REALLY_DEBUG_MALLOC isn't defined
  - moved the declaration of memRecReport from memint.h to mem.h where it is, together with memMemoryReport, optionally declared depending on REALLY_DEBUG_MALLOC
 * fixed yet another set of signed/unsigned errors (src/seqdisp.c & textdraw.c/h)
 * removed a cast from char* to char* (that's what I call unnecessary; transforming something into something it already is)
 * memory system:
  - added some comments to clarify what certain pieces of code actually do
  - removed some redundant code (e.g. why would you ever want to overwrite memory to zero just before passing it to free()?)
  - made debug-version of free() return immediately when being passed a NULL pointer (i.e. after raising an assert)
  - moved some variable declarations down to the first point of usage
  - *IMPORTANT*: commented the definition of MEMORY_SET out (line 38 mem.c), this might break code that expects freshly malloc'ed memory to be pre-initialized, if you experience any problems due to commenting this out please say so on the mailinglists!

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@957 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-04 18:41:24 +00:00
Roman C bebc8316da -fixed FLEX YY_CURRENT_BUFFER glitch
-added asserts to some scripting functions

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@956 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-04 18:15:17 +00:00
Giel van Schijndel 3d23a48076 * expand the use of compiler-guards (C preprocessor macros) so that not only the forward declarations and referring macros are guarded, but the referred functions as well
* remove some unused things: variables, macros (MEMORYREPORT, MEMORYTREAP)
 * fix some signing errors:
  * change assignments of/comparisons with -1 to unsigned variables ((-1) directly, not through a preprocessor directive) to ~0 (left OpenAL-code alone)
  * remove some casts to (SDWORD) in comparisons which actually cause signed/unsigned errors rather than fix them
  * redefine some vars as unsigned

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@955 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-04 17:03:32 +00:00
Dennis Schridde 33798e384a Multiplayer Command Turrets can now attack/mark air targets. This makes it sensible to attach AA weapons to commanders for defensive purposes.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@954 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-04 14:42:40 +00:00
Dennis Schridde 7c816b265c Crashfix
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@953 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-04 14:41:22 +00:00
Giel van Schijndel 860983318c * Set the bugtraq properties on the nsis directory as well
* Set svn:ignore to:
  * include files which should only occur in a working copy (e.g. makerules/config.mk which is derived from makerules/config.mk.tmpl)
  * prevent files produced by the build-system (e.g. files generated by bison and flex) from showing up in `svn status'

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@952 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-03 23:20:44 +00:00
Dennis Schridde e25d5f511b Patch by Giel: NSIS uninstall info extension:
- This patch adds some additional info (including an URL to http://wz2100.net/) to the MSW Add/Remove software section.
Some additional variable reordering by me.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@951 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-03 19:47:09 +00:00
Roman C 3bfab0ce95 -Implemented C-like #include preprocessor directive for the scripting engine, can be used up to depth of MAX_SCR_INCLUDE_DEPTH. Unlike C counterpart main purpose is to reuse executable and non-executable code.
Example:
#include "multiplay/skirmish/my_include.slo"

-Implemented C-like #define preprocessor directive. Nested macros allowed with up to depth of MAX_SCR_MACRO_DEPTH.
-Added a script function for a fast feature iteration (returns burning as well as non-burning oil resources)
-Replaced some custom Pumpkin routines with default FLEX routines
-Some cleanups

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@950 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-02 20:12:14 +00:00
Dennis Schridde f942dc4700 Make framerate limit configurable (through "framerate" config value).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@949 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-31 20:29:24 +00:00
Dennis Schridde f041357397 Fix broken SCOURGEs yet again. Please check your patches before commiting...
(SCOURGEs exploded immediately when launched.)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@948 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-31 19:54:46 +00:00
Dennis Schridde 8df2091640 Cleanup, fix warnings created by missing braces in intialization of the oaInfo struct.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@947 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-31 19:51:43 +00:00
Per Inge Mathisen 3f88e8e4f2 Remove some more dead graphics code, and fix some warnings.
Happy new year everyone!


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@946 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-31 18:19:19 +00:00
Roman C 4ce5cd91ed Patch by Watermelon:
Multi-Targeting support:
1. Every weapon will try to choose its 'ideal' (this weapon's best
target) target first, if fails choose primary (weapon_slot 0) target.
2. If primary target is not valid for auxiliary (2nd,3rd etc), auxiliary
turret will try to acquire other targets (use primary weapon mortar to
engage remote target while having mg/cannon to engage close-quarter
enemies).
3.Adds DROID_OACTION_INFO struct (contains DROID_MAXWEAPS pointers to
BASE_OBJECT(target)) to handle multiple target info in order
functions.
4.A few weapon-related functions now return boolean values again instead of bitfields.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@945 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-31 15:18:01 +00:00
Dennis Schridde b9bd1a66b4 Temporary fix for breakage discovered in r942 / bug #8129
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@944 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-31 11:50:47 +00:00
Dennis Schridde a7aac74fae - Removed some commented parts
- Removed unneeded check for psTarget == NULL from the establishTarget* functions, would have crashed before anyway
- Patch by Watermelon: Projectile Fix 7: 1.Fixed a crash with VTOL bomber with NULL weapon pIMD.
- Fix include of lib/framework/frame.h


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@942 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-30 22:01:34 +00:00
Per Inge Mathisen 9c22bf56ba Fix possible source of redefined macro warnings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@941 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-30 19:22:08 +00:00
Roman C 5363029ebb Patch by Giel van Schijndel: fixes usage of enum with an increment operator.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@940 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-30 17:04:38 +00:00
Dennis Schridde 4e28453441 src/* and lib/ivis_common/piemode.h by me: Cleanup unused functions.
Rest: Patch by Giel van Schijndel: codecleaning patch: lets delete stuff


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@939 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-29 19:56:06 +00:00
Dennis Schridde 3edcde4ff3 Update the README and patch by Watermelon: Projectile Fix 7
1.Made the Get z 'height'(imd + turret imd) a function called establishTargetHeight to remove hacky checks and such
2.Few minor changes to various variables.
3.Fixed some building height check problems like missile not able to hit fortress etc(hopefully)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@938 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-29 19:02:41 +00:00
Dennis Schridde 067687c5e7 Fix raw Makefiles
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@937 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-28 11:47:58 +00:00
Dennis Schridde 1b7a63f6ef NSIS support for automake.
raw Makefiles might be broken, please report back!


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@935 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-27 21:44:46 +00:00
Dennis Schridde 8745e3038e - Modify NSIS script to support more flexible directory structures
- Use external version definition

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@934 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-27 15:48:28 +00:00
Dennis Schridde 4baada70c7 Add versioninfo to installer
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@933 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-27 15:26:44 +00:00
Dennis Schridde 8d9f48a745 Patch by Giel: NSIS improvements
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@932 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-27 14:57:41 +00:00
Dennis Schridde c4be99146a Part I of Giel's NSIS patch
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@931 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-27 13:35:10 +00:00
Roman C 0fc33f432c Patch by Giel van Schijndel: fixes enum incrementation with postfix increment operator.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@930 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-27 13:21:04 +00:00
Dennis Schridde fde592c49f The NSIS script
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@929 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-26 19:59:34 +00:00
Roman C e526ba4c1d Updated ChangeLog.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@928 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-26 16:53:47 +00:00
Roman C cc5f4ef441 -new 'height-map' radar mode (CTRL+TAB to cycle through radar modes)
-revamped radar modes management

Scripting engine:
-some interpreter speedups
-new script function to modify map tile height from scripts
-made numeric pad keys 0-9 accessible from scripts

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@927 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-26 16:39:07 +00:00
Dennis Schridde 0c6ede6fa4 Patch by Giel van Schijndel: Increase chatconsole displaytime.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@926 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-26 01:22:48 +00:00
Dennis Schridde fed7e0b738 Fix bug #7980 (multiple powerbars), patch by Giel van Schijndel.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@925 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-26 01:20:11 +00:00
Dennis Schridde 7cb58437f4 Changed bugtracker prop
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@924 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-25 20:34:20 +00:00
Roman C 33887643eb Patch by karmazilla: fix to the Tutorial 'blue skybox' bug (bug #8087)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@923 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-25 14:34:03 +00:00
Dennis Schridde 43d2367731 Forgot the ChangeLog
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@921 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-25 01:44:43 +00:00
Dennis Schridde 52e8d3b435 Forward port some missed changes
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@920 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-25 01:43:01 +00:00
Roman C 2da67b99e1 Patch by Watermelon: Fixed campaign loading bug and connector coordinates for Mantis body
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@917 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-24 10:45:22 +00:00
Dennis Schridde e189e064c0 Forward port make install fix for Automake < 1.10
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@916 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-23 17:26:58 +00:00