Commit Graph

816 Commits (354bf5255ec789aa08d1034aa19ec8513f9d712b)

Author SHA1 Message Date
Roman C dacc1de1ca Scripting engine overhaul - Part I
-compiler and parts of interpreter now use union to store different data types
-got rid of a great deal of pointer->integer casts

-ASSERT() now outputs last event (or function) called by scripts
-implemented float data type support for the scripting engine - basic functionality at the moment

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@846 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-16 14:30:29 +00:00
Ari Johnson 3a54b1ab8d Fix for bug #7708: isHumanPlayer() now checks for player numbers outside
the range if [0,MAX_PLAYERS)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@832 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-11 23:03:02 +00:00
Dennis Schridde f28ff5553a Patch by Gerard Krol and Watermelon: penetration for certain weapon types
Made proj_SendProjectile to accept another BOOLEAN value 'bPenetrate',when set to TRUE it will create a new projectile upon impact and the newly created projectile will try to reach the destination of the impact'ed projectile.(FLAME,ELECTRONIC,GAUSS weapons projectile can penetrate several enemy units)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@831 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-11 21:31:28 +00:00
Dennis Schridde a715b54c9e Patch by Gerard Krol: sensorcrash.patch: fixes a crash when repairing a not damaged command center, corrects the mouse cursor
FIXME why is psDroid->asWeaps[0].nStat set to 0xCD instead of being initialized properly?


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@830 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-11 21:29:27 +00:00
Dennis Schridde d9e99cccec Remove inclusion of malloc.h (Doesn't seem to be needed and was causing problems on Mac)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@829 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-11 21:18:19 +00:00
Dennis Schridde e96aa46780 Patch by Gerard Krol: Clipping fix. (Buildings disappeared (cliped) while not yet fully out of screen.)
This is just a quick hack. Value 7 was only determined in trial and error, no one knows what FP12_MULTIPLIER exactly means.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@828 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-11 21:03:21 +00:00
Dennis Schridde 58441e7970 Add the forgotten Makefile.am
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@827 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-07 21:28:05 +00:00
Dennis Schridde acf370e1d8 Patch by Thomas Rast: droidSetBits() segfault
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@826 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-07 15:27:21 +00:00
Dennis Schridde d177037638 Declaration fixes. (Make declaration/definition match)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@825 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-06 22:09:33 +00:00
Dennis Schridde 7d3ad56fd5 Compilation fixes, macro removal, PHYSFS_fileLength by Gerard Krol.
Some more initialization in interp.c by me.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@824 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-06 21:58:13 +00:00
Dennis Schridde 5293ace6f2 Improve MinGW support. Shamelessly stolen from FreeCiv.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@822 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-06 18:35:59 +00:00
Dennis Schridde fb74a1f8dc Patch by Thomas Rast: Include string.h against warnings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@821 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-06 14:40:07 +00:00
Roman C b5c7fc5bd3 Removed external function prototype for a static function
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@820 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-05 19:47:28 +00:00
Roman C 90077ff547 Patch by Watermelon: New hit-system with target prediction
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@819 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-05 18:26:56 +00:00
Roman C 0fcdc8184e Patch by Watermelon: commander-related crash fix
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@818 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-05 17:32:54 +00:00
Dennis Schridde ae3f8f3fe9 Patch by Thomas Rast: HP/Reload bars overlaping
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@817 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-05 17:13:02 +00:00
Dennis Schridde 51b358a011 Mark trunk to save me from confusion...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@816 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-05 10:56:51 +00:00
Dennis Schridde a91b3f8803 Support crosscompilation for MinGW32
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@814 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-05 03:29:51 +00:00
Dennis Schridde 1899f95f70 Fix usage of CHAR which was removed in r808
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@813 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-04 23:45:28 +00:00
Dennis Schridde 770af57c20 Remove more extra types
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@812 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-04 23:16:51 +00:00
Roman C 9aebc7c2b5 Patch by Watermelon: Droid Multi-Turret Support
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@811 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-04 22:56:28 +00:00
Dennis Schridde b1c7773299 Patches by Charon, slightly modified:
- *WarzoneKeyNumeric definition changed to SDWORD
- Report wrong tracknumbers to LOG_SOUND and don't crash in sound_Play*DTrack
- Correct --help text
- Make console backlog key configurable


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@810 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-04 21:05:31 +00:00
Dennis Schridde ec44ab5e7d - Fix last commit (setDrawShadows() was undeclared, because I forgot to include a header).
- Also change --(no)sound to just set war_setSoundEnabled() and store the config in configuration.c instead.
- resolution config value has been changed to width and height (easier to parse). I probably forgot to tell that I changed the --viewport cl option to --resolution, which should be more clear to non programmers.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@809 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-04 20:49:49 +00:00
Dennis Schridde 67056c8d24 - Droped a lot of (nearly) unused types from lib/framework/types.h
- Remove lots of unused functions (Windows/DDraw related)
- Now store the used bitdepth in the config and thus make it configurable without having to modify the sourcecode


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@808 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-04 01:11:26 +00:00
Dennis Schridde c62d5d6ac2 Replace lots of \ with /
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@807 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-03 23:53:38 +00:00
Roman C 4de2b284a0 Fixed double declaration of "FUNCTION" token for bison.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@806 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-03 22:44:03 +00:00
Roman C abe178d7f1 Restored script 'STRING' datatype changed by STRING -> char patch.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@805 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-03 22:25:24 +00:00
Dennis Schridde d3cd44148d Patch by Gerard Krol: Replace STRING with char (STRING was confusingly defined to char)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@804 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-03 21:35:50 +00:00
Roman C de058ca669 Patch by Gerard Krol: misc
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@803 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-02 20:55:19 +00:00
Roman C 3ea3f99f73 Patch by Gerard Krol: lesswarnings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@802 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-02 20:15:08 +00:00
Roman C 727ed6641c Patch by Gerard Krol: warnings changes
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@801 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-02 19:33:46 +00:00
Roman C 6617c2f400 Patch by Gerard Krol: warnings casts
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@800 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-02 19:26:55 +00:00
Roman C 2f2015340c -added script callback to process key inputs from within scripts
-added in-game debug window (mostly for scripting debugging purposes, something like a watch window)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@799 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-01 13:56:23 +00:00
Dennis Schridde 39ff5cc515 Make lots of __inline, _inline, FUNCINLINE and whatnot static inline. See bug#7591.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@798 4a71c877-e1ca-e34f-864e-861f7616d084
2006-10-31 20:22:01 +00:00
Dennis Schridde b0eceecf36 Backport changes from branches/2.0. (AutoPackage 1.2 support)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@797 4a71c877-e1ca-e34f-864e-861f7616d084
2006-10-30 17:15:30 +00:00
Roman C 9be9d21e09 -automatic target assignment will now give low priority to half-built structures when looking for a target (structures getting full HP upon construction begin was an exploit against unit AI)
-fixed line endings in macro.h
-applied Christian Ohm's "032 - Fixes for src-aiexperience.c-h" and "037 - g++ fix" patches
-made warzone report loading of all *.lev files

Scripting:
-fixed implicit bool/int to string convertion for the scripting language
-STRUCTURESTAT can now be checked for being 0 with NULLSTRUCTURESTAT
-minor scripting function fixes

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@794 4a71c877-e1ca-e34f-864e-861f7616d084
2006-10-24 13:05:40 +00:00
Dennis Schridde 1e34dc870d Fix/mark 2 unused symbols
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@790 4a71c877-e1ca-e34f-864e-861f7616d084
2006-10-21 06:14:35 +00:00
Roman C 4b0ed1be22 Improved droid target selection code, now uses weighted function for target selection.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@789 4a71c877-e1ca-e34f-864e-861f7616d084
2006-10-13 10:33:19 +00:00
Dennis Schridde a07ae17982 Quick fix for float truncation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@788 4a71c877-e1ca-e34f-864e-861f7616d084
2006-10-10 09:58:14 +00:00
Dennis Schridde c661f0ce15 Update website.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@787 4a71c877-e1ca-e34f-864e-861f7616d084
2006-10-09 21:50:50 +00:00
Dennis Schridde 5a4a9288b0 Patch by Christian Ohm: Gamma controls
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@786 4a71c877-e1ca-e34f-864e-861f7616d084
2006-10-09 19:22:24 +00:00
Dennis Schridde b8bdd4d562 Patch by Christian Ohm: Process SDL_QUIT
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@785 4a71c877-e1ca-e34f-864e-861f7616d084
2006-10-09 19:00:20 +00:00
Dennis Schridde b1b8d3ad4d Remove not used (commented out) non TCP/IP networking from connection screen.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@784 4a71c877-e1ca-e34f-864e-861f7616d084
2006-10-09 18:57:18 +00:00
Dennis Schridde ef949a0ea4 Update MSVC project file.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@783 4a71c877-e1ca-e34f-864e-861f7616d084
2006-10-09 16:24:19 +00:00
Roman C f4bf18e390 -Re-enabled some debug keys and disabled unused ones
-Skirmish in-game menu (Numpad-Enter) now shows number of player units and player power instead of ping and number of played games when using debug build and in-game debug mode is on

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@782 4a71c877-e1ca-e34f-864e-861f7616d084
2006-10-09 15:33:50 +00:00
Roman C 0aeea43f15 Changed scripting functions to use british spelling of "color"
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@781 4a71c877-e1ca-e34f-864e-861f7616d084
2006-10-08 14:08:53 +00:00
Roman C e2de834b13 -1.10 AI doesn't build flamer bunkers in the base anymore
-It is now possible to win in a team in 'Locked Alliances' mode, also in this mode a player doesn't lose until all of his team members were defeated
-Game now shows a text message when player has won/lost the game (just a temporary solution to bug #7317)
-Added extra heap debug, should be there at least until we fix bug #6530, as PTRVALID() doesn't seem to detect corrupted DROID pointers on win
-Increased number of iterations A* is allowed to do per frame, which will hopefully speed up pathfinding
-Fixed multiplayer menu slider bug (bug #6529)
-Fixed players not forwarding enemy units visibility to their allies in 'TEAMPLAY' and 'Locked Alliances' modes
-Further scripting engine improvements

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@780 4a71c877-e1ca-e34f-864e-861f7616d084
2006-10-08 08:06:46 +00:00
Dennis Schridde 49a56a27e4 Fix r777: Allways display an error message (with an actual errormessage instead of just a string address) and never display it twice (not even in NDEBUG builds).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@779 4a71c877-e1ca-e34f-864e-861f7616d084
2006-10-08 00:54:23 +00:00
Dennis Schridde 759a6f5d02 Fix for r776.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@778 4a71c877-e1ca-e34f-864e-861f7616d084
2006-10-08 00:05:24 +00:00
Dennis Schridde d163be853d Christian Ohm's PSX removal part 1.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@777 4a71c877-e1ca-e34f-864e-861f7616d084
2006-10-07 16:40:18 +00:00