Commit Graph

23 Commits (f829395d963652346c354f8997c482423b314fe8)

Author SHA1 Message Date
Buginator 405d03224c Fix overzealous BOOL->bool conversion
Structures *must* remain the same size, BOOL was initially cast as a int,
and we would read/write values expecting 32bit values, needless to say,
this caused issues.
The same applies to varaiables that pretend to be a BOOL, and may indeed have
been used as a bool, but again, the size is 32bits, not 1 byte.


Revert "fix [s]BOOL[/s] bool by 4B0/\/\1|\|4710|\|"
This reverts parts of commit a72c41aeec

fixes ticket:2556
2011-03-19 18:40:25 -04:00
abomination a72c41aeec fix [s]BOOL[/s] bool by 4B0/\/\1|\|4710|\|
[Edit by Cyp: Removed a "typedef int bool;" when building on non-windows.]
2011-03-13 12:32:24 +01:00
Cyp a7730ccd15 Change "typedef struct {...} Blah;" into "struct Blah {...};".
Removed a few structs due to disuse.
2011-02-25 21:30:13 +01:00
Cyp ae2ce18314 Bump year.
sed -i 's/\(Copyright (C) .*-201\)0\( *Warzone 2100 Project\)/\11\2/' {src,lib/*{,/*}}/*.{c,cpp,h,y,l}
2011-02-25 18:45:27 +01:00
Cyp 23d5dcd5dd Remove extern "C" {} from most places, due to longer being needed. 2010-12-21 17:20:48 +01:00
safety0ff 8c9e7d5bd0 Fix an invalid pointer dereferencing issue in the script events system.
Closes #2300.
2010-11-21 15:48:31 -05:00
Buginator edb644a03b Fix (and add missing) headers to files.
2009  Warzone Resurrection Project -> 2010  Warzone 2100 Project

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11298 4a71c877-e1ca-e34f-864e-861f7616d084
2010-07-28 18:58:33 +02:00
Cyp 6ddb1eadb2 cpp: Add extern "C" {} in headers.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9336 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:21 +01:00
Dennis Schridde aac41748dc Bump copyright
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6617 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 18:01:48 +00:00
Dennis Schridde fcca92459c We no longer need to respect 8-char filename limits, be clear in naming instead
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6616 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:23 +00:00
Dennis Schridde 2537bfc61c Cleanup #includes a bit
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4107 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-16 12:39:08 +00:00
Giel van Schijndel c51bd8ae10 * Get rid of a large quantity of unused parameters
* Turn some signed integers ("int" or "SDWORD") into unsigned integers where it made more sence (and signed integers caused warnings about comparing signed with unsigned integers)
 * At some places cast to an unsigned integer (where the type of the expression is a signed integer but the result of it logically _always_ is an absolute value)
 * Remove unused struct-type EVENT_INIT
 * Convert use of malloc->memcpy->free to one single realloc call (and now make sure to actually check realloc's return value, which wasn't done with the malloc call)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3037 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-10 23:15:46 +00:00
Roman C 1c2ec5e07d Enabled recursive function calls for scripts.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1311 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-31 16:03:21 +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
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 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
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 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
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 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
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 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
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