Commit Graph

300 Commits (f829395d963652346c354f8997c482423b314fe8)

Author SHA1 Message Date
Gerard Krol 4465a061c1 Fix warnings, and revert r1241 for effects.c (validatePie really needs a prototype at the top)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1242 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-15 23:17:09 +00:00
Dennis Schridde 7e12df4e35 - Backport r1228 (lib/script/script_parser.y, not initializing ppsLocalVarVal leads to segfault)
- Change some idention and whitespaces


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1229 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-13 20:49:03 +00:00
Roman C b0218cad3e Fixed saving and loading of script string variables.
NOTE: this will break old save games (at least skirmish ones).

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1168 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-23 20:45:05 +00:00
Per Inge Mathisen daaac4b5e3 Clean up redundant copy&paste code. Patch by Gerard Krol with
some stylistic and extra changes by me.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1158 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-21 22:38:52 +00:00
Per Inge Mathisen d3cadd9e4a Start making the code conform to -Wextra
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1146 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-19 16:46:48 +00:00
Per Inge Mathisen 79b3875fc4 This commit fixes all warnings (on my system). -Werror added for
debug builds. Hopefully this will not cause too much pain, but
rather increase code quality for the future.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1144 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-19 14:10:44 +00:00
Per Inge Mathisen 929c4bf2ab Set eol-style for files missing this.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1143 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-19 14:02:24 +00:00
Per Inge Mathisen 9640c6a42d Fix mixed line endings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1142 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-19 14:01:41 +00:00
Per Inge Mathisen 714d15e7e8 Attempt to fix mixed line endings.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1141 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-19 13:57:33 +00:00
Dennis Schridde 8a70df4064 Use some more advanced Automake techniques like noinst_HEADERS. Changes partly autogenerated by KDevelop, so this should be compatible with Automake 1.6.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1118 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-16 14:36:03 +00:00
Roman C cd70a98588 - fixed compilation of script functions consisting of a single return statement
- minor cleanups

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1112 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-14 22:12:48 +00:00
Roman C da3f1e25f8 - removed some ASSERSs doubling debug() error output
- when script runtime error occurs wz first outputs error information and then asserts, not vice versa
- printCallStack() script function will output script call stack to standard output

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1107 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-14 18:29:26 +00:00
Ari Johnson 05bd724b1c Fixed script state saving and loading on big-endian machines
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1100 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-14 03:39:17 +00:00
Roman C 1ac2942948 Make use of the script type compatibility table during compilation of vlo and slo files.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1098 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-12 15:46:54 +00:00
Roman C f13a111a5c Scripting engine update:
-added script call stack trace output on script runtime error
-added STRUCTURE getTileStructure(INT tileX, INT tileY) script function to get a structure on a certain map position
-fixed two stackPopParams() calls with too many actual parameters

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1087 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-10 15:23:47 +00:00
Giel van Schijndel 991b9ceb12 patch by Gerard as provided in message with ID <45CC4A2E.4060706@student.tudelft.nl>:
* fixes usage of negative array index

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1082 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-09 16:29:32 +00:00
Dennis Schridde 49ceba7503 Add GPL notices to all sourcecode files.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1014 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-15 20:09:25 +00:00
Dennis Schridde f723a42e50 Proposed fix for non-MSVC buildsystems
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@984 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-09 22:07:58 +00:00
Dennis Schridde 711af01772 New MSVC project files with custom build rules to support automatic lexer/parser generation.
The include changes might break other buildsystem, I'll fix that when I am back on Linux.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@983 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-09 21:13:58 +00:00
Giel van Schijndel 38a3d8ee82 * cast some void*(*) variables to their respective types
* remove -fno-gnu-keywords from GCC because it seems to be only for C++/ObjectC (Doh!), and the variant for C (being -fno-asm) additionally disables inlines which we definitely don't want disabled
 * remove a large function which reserves memory without it ever being used *at*all* (from hci.*, mapdisplay.* and intelmap.c), also remove a function parameter from another function in mapdisplay.c, (it was this parameter that required the other functions to reserve memory)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@971 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-08 13:40:12 +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 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
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 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
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
Roman C cee8ff2da9 Updated makefiles
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@900 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-17 12:57:14 +00:00
Roman C 7590ea72a7 -added "case-insensitive" %option to chat_lexer.l, so that -i flag doesn't have to be specified during compilation anymore
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@899 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-16 16:54:15 +00:00
Roman C 14cd4b60cc Scripting engine update:
-void pointer is now compatible with any other pointer type
-strings can now be directly compared using '==' and '!=' operators
-added a linguistic chat message parser with some generic messages predefined - to be used for Human<->AI and AI<->AI communication
Note: chat_lexer.l should be compiled using an additional -i switch for case-insensitive lexer

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@898 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-16 14:59:50 +00:00
Roman C ca6d0af961 Fixed a bug which was preventing script increment/decrement operators to function properly
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@895 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-06 18:57:17 +00:00
Roman C 10daf67ea4 -added increase/decrease operators (seems to have a minor flaw atm though)
-fixed MSVC compilation issues and wrong casts in initializations

Scripting Engine:
-lexer will now skip all macros in script files - allows to use macros in IDEs
-float data type can now be used in boolean expressions
-fixed visibility check in initEnumStruct() script function
-fixed playerLoaded() script function
-added some new script functions
-Object.weapon now also works with structures
-added decrement/increment operators

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@889 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-02 23:27:00 +00:00
Dennis Schridde 634435e712 Change VAL_REF from a define to part of the VAL_... enum.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@888 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-02 16:07:00 +00:00
Dennis Schridde 87da22bce1 - Fix maybe bugs introduced in last commits
- Fix a lot of char* related warnings (fixing of scripttabs.c needs to be finished like I started it)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@867 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-26 13:45:04 +00:00
Dennis Schridde fafa69842f x86_64 fixes by Pseudonym404. (Incl. some minor other changes, eg in src/game.c)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@854 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-25 01:26:05 +00:00
Roman C e3b77d82d2 Script functions can now take float data type as parameters and return value
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@848 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-17 17:07:03 +00:00
Roman C 6d8dbda48e -fixed 'cpPrintProgram'
-fixed some spelling mistakes
-minor cleanups

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@847 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-17 11:25:03 +00:00
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
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 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 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 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
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
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
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
Roman C 7f143b5a48 New script callbacks are called delayed now, since there was a problem when forming alliance.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@775 4a71c877-e1ca-e34f-864e-861f7616d084
2006-10-04 02:54:24 +00:00
Roman C b7627bd9c8 Minor cleanup: replaced VOID with void.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@772 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-30 23:57:38 +00:00
Roman C e34c09439c -New script callbacks
-Added ability to rename players through scripts
-New savegame version: 34 (as a result of the previous point)
-Fixed double messages in online games
-Minor cleanups

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@771 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-30 23:09:12 +00:00
Roman C 09f607afbc Unused variables cleanup.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@764 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-26 18:25:36 +00:00
Roman C 9aaae50baa Replaced 'Humans vs AIs' with 'Locked Teams' alliance mode.
Fixed difficulty slider applying settings to the wrong players.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@763 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-26 18:14:05 +00:00
Stefan Huehner b3e3d17b82 Include frameresource.h directly in its users. Fixup after
the big cleanup in 748:749.




git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@750 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-23 18:38:12 +00:00
Dennis Schridde 3261a09baf BIG cleanup of headers.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@749 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-23 17:24:55 +00:00
Roman C 741250cef3 -Added "Humans vs AIs" alliance mode: Humans and AIs make 2 teams, alliances cannot be created or broken
-Added now frontend texture to frend.img
-Disabled "Allied players send vision to each other automatically (only once)" for "Allow alliances" alliance mode, since (x allied y) is not a transitive relation in this mode

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@744 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-21 20:42:48 +00:00
Dennis Schridde bc58f97c4c Patch by Christian Ohm: "g++ unbreakage fix"
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@743 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-20 21:34:38 +00:00
Dennis Schridde f4be2a7f37 Patch by Christian Ohm: "g++ unbreakage"
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@736 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-20 08:16:11 +00:00
Stefan Huehner 1395a7c69c Make some more functions static which aren't used outside their
declaring source files and which have no prototype.



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@731 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-19 18:45:48 +00:00
Dennis Schridde 1b520925ec Clarify names, add docs, add OP_FUNC etc. to aOpSize so the opsize can be retrieved through aOpCode[opcode], make retStack* functions static, improve the return address stack to be easier to understand.
Patch created after ideas of Christian Ohm.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@730 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-19 16:30:50 +00:00
Roman C 15b02fe669 Fixed script compilation bugs,
further scripting enhancements.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@729 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-19 16:07:06 +00:00
Dennis Schridde d889ce9da7 Patch by Christian Ohm: "g++ fixes"
Mainly explicit casts, some type changes, a few fixes.

We need to have a look if this line creates any problems:
lib/script/interp.c @@ -329,7 +329,7 @@
- if(!RetStackRemember(CurEvent, (ip + 2)))       //Remember where to jump back later
+ if(!RetStackRemember(CurEvent, *(ip + 2)))      //Remember where to jump back later


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@719 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-17 20:39:25 +00:00
Dennis Schridde 75af155bbf Patches by Stefan Huehner: "code cleanup: void 5, static 4" and a slightly modified "doxy 1"
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@717 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-16 17:41:40 +00:00
Dennis Schridde 74c69f2a47 Fix VOID type for scripts, broken in r703.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@714 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-16 15:55:52 +00:00
Dennis Schridde 27b07a0ba1 Patch by Stefan Huehner: "code cleanup: const 2"
Patch marks several read-only function parameters and datastructures as such by adding const.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@709 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-13 21:16:17 +00:00
Dennis Schridde b9087ef4ca Patch by Stefan Huehner: "code cleanup: void 4"
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@706 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-13 21:11:11 +00:00
Dennis Schridde 728b9a9913 - Commit patches "code cleanup: void" and "code cleanup: const" by Stefan Huehner
- Replace every occurence of VOID with void (and LPVOID with void*)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@703 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-13 09:09:05 +00:00
Dennis Schridde fe1a94f6dc - Mark possibly breaking assignments
- Don't declare stdint declarations which are allready declared in SDL_config
- Change only use of stdint type to use SDL type instead

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@700 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-08 20:05:38 +00:00
Dennis Schridde e057d6240c Finalize VIDEO_QUIT callback fix on request of Troman.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@688 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-06 17:19:20 +00:00
Roman C 96f59fbb50 Fix to #6735 and #6751,
also fixes some beacon-related code

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@687 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-06 16:58:20 +00:00
Dennis Schridde 915390aa1b Fix possible bugs when having deeper pointers than probably intended.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@685 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-03 20:32:01 +00:00
Roman C e70448bc0d Fixed a #define inside of a Bison grammar rule
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@651 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-26 21:45:21 +00:00
Roman C c1c801383e Fixed compilation on GCC
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@650 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-26 20:51:54 +00:00
Roman C c3eae9e73f Fixed bug #6753 ,
Define DEBUG_SCRIPT to get some more Bison/Flex debug output

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@648 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-26 17:14:04 +00:00
Roman C a9a74444a1 Added beacons for skirmish and multiplayer, default key combination: Alt+H.
Allied players send vision to each other automatically (only once)
Fixed caching problems for variables of type GROUP
Some other scripting engine updates and cleanups

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@647 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-26 15:50:47 +00:00
Dennis Schridde 4208601a38 - Fix string stack reset for scripts
- Clean warnings and a wrapper function for widgets
- Add an assert to intDisplayMessageButton to catch crashes better


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@631 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-25 20:38:27 +00:00
Dennis Schridde 0e288f45e7 - Replace all ASSERT(( )) with ASSERT( )
- Simplify definition of ASSERT(). Now is the same for GCC and MSVC.
  This may not work on versions older than MSVC 2005. If you experience this, please report it!

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@613 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-23 12:58:48 +00:00
Dennis Schridde 62ae49b0ce Replaced all occurences of DBMB, DBPRINTF and DBERROR with their former define.
( DBPRINTF(("Message")); becomes debug( LOG_NEVER, "Message" ); )



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@608 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-22 14:28:49 +00:00
Roman C aee8ea47f7 Fixed bug #6687,
Added debug() for scripts, 
Plus some cosmetic changes

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@603 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-21 21:20:17 +00:00
Roman C 8447972580 Added new scripting functions, cleaned up flex debug output
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@600 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-21 15:33:49 +00:00
Roman C 433d707927 Fixed missing player names in multiplayer messages,
cleaned up Bison logs
enabled logs for loading .slo and .vlo files

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@597 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-21 09:34:42 +00:00
Roman C e4883dabb9 Scripting engine update:
-added new scripting function
-added new callbacks
-added new member variables
-players controlled by AI now receive (and send) multiplayer messages and can process them

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@595 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-20 14:48:14 +00:00
Ari Johnson 89959394d6 Fixed bug that caused garbage to be read from asScrTypeTab, which could confuse
the script parser.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@593 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-20 11:17:51 +00:00
Ari Johnson 8917cea6cb Runtime script parse errors now report a filename and line number rather
than just an inaccurate line number.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@591 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-20 11:15:55 +00:00
Roman C f286ffd1bf Fixed dependencies
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@585 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-19 14:37:36 +00:00
Roman C 797906a0db fixed some warnings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@584 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-19 13:40:19 +00:00
Roman C 92284dc7bc Scripting engine update:
-implemented string support
-functions can now have arguments, example:
function STRING myFunc(DROID myDroid, int myInt2){<code>}
-functions can have return values:
return <statement>;
or just "return;" for void functions
-function calls are made the normal c/c++ way (using the function from the first example):
myString = myFunc(myDroid, 156);

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@583 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-19 13:26:11 +00:00
Roman C e0c93aec7d Scripting engine update:
Implemented local variables, which can be used inside of functions or events.
Syntax:

local int myVar1,myVar2;

 * fixed a bug which made wz crash when local variable was declared inside of an event

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@572 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-16 11:23:43 +00:00
Roman C a891af6a7a git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@570 4a71c877-e1ca-e34f-864e-861f7616d084 2006-08-15 18:38:51 +00:00
Per Inge Mathisen 6d8b190950 Make SBYTE explicitly a signed char, not just a char. This would have broken
some things on platforms where 'just char' means unsigned char. Fix lots of
new signedness warnings resulting from that fix (which would have cropped
up on unsigned char platforms anyway). Also implement a small subset of
stdint.h for windows platform in frame.h, hope this does not create any
conflicts. This allows us to use types like uint64_t where relevant.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@569 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-15 18:20:36 +00:00
Per Inge Mathisen 2149739999 Almost all strings and buffers are now of type char. This fixes
more than half the warnings on gcc4, and makes sure we do not
get signedness problems between platforms where char is defined
with different signedness. Also set line-ending properites for
some bison/flex files that did not have it set.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@563 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-12 16:52:37 +00:00
Roman C 223ea92358 Scripting Engine Update:
-added simple function support

Limitations:
-void return type only
-no arguments support

Example:
function void myFunc() {<code>}

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@557 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-12 10:02:59 +00:00
Per Inge Mathisen 5fce2d6c26 Add and fix a number of ASSERT() calls.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@524 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-04 19:52:38 +00:00
Per Inge Mathisen 8dc0fc2878 Remove some remaining support for saving and loading binary scripts,
used only on the PSX.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@520 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-04 17:19:35 +00:00
Per Inge Mathisen 4838aec32d Fix possible array index bug in script code. Reported by iamtheari on the rts.net forums.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@507 4a71c877-e1ca-e34f-864e-861f7616d084
2006-07-26 18:48:34 +00:00
Dennis Schridde 3116f462fc New Makefile.raw system, works with MinGW/Windows environment and Linux also.
Uses a config.mk.tmpl file to set system dependend stuff, no bash required.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@490 4a71c877-e1ca-e34f-864e-861f7616d084
2006-07-21 21:48:55 +00:00
Dennis Schridde eb7ba7e41d - Again revised the modloading(restrictions were stupid) (src/levels.c,src/init.[ch],src/multiint.c,src/main.c)
- Fixed case problem with noVideo.rpl (lib/sequence/sequence_stub.c)
- Fixed some G++ 4.1 compile problems (mostly invalid conversions) (lib/script/script_parser.y,lib/framework/frame.h,lib/framework/frameresource.c,lib/framework/frameresource.h,lib/framework/input.c,lib/framework/configfile.c,lib/framework/frame.c)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@455 4a71c877-e1ca-e34f-864e-861f7616d084
2006-07-04 13:35:01 +00:00
Dennis Schridde 5175535d9d Full pathname includes
Same as in r431, but now for lib/
- converted the sources in lib/ to use full path includes instead of just the filename.
- marked places where lib/ivis_*implementation* (eg opengl) is needed, because of incomplete lib/ivis_common.

Should improve the understanding of interfaces and code organization.

(Also fixed a double slash (//) include in src/multimenu.c)



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@432 4a71c877-e1ca-e34f-864e-861f7616d084
2006-06-02 19:34:58 +00:00
Rodolphe Suescun e36796f6ce Made necessary changes so that code can be compiled using g++.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@402 4a71c877-e1ca-e34f-864e-861f7616d084
2006-03-01 06:12:28 +00:00
No Author 5ba7ddac6b Create final repository structure.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@362 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-28 17:47:08 +00:00