Commit Graph

4461 Commits (0c4b256797d4b62aebc3c62dd5430911c0a14a7f)

Author SHA1 Message Date
Giel van Schijndel 0c4b256797 * Out with the (unnecessary! as the size guarantee isn't required) WORDs from treap.[ch]
* Restructure treapStringCmp to be __readable__

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5551 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 22:09:31 +00:00
Giel van Schijndel 8db7c031ff Fix some compile errors that occur when DEBUG_TREAP is #defined
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5550 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 22:09:15 +00:00
Giel van Schijndel 379a905c6c * Move the type definitions of TREAP_NODE and TREAP from treap.h to treap.c (use a forward declaration in the header instead)
* Don't strdup strings retrieved from __FILE__ directives; just store const char* the pointer instead (prevents a memory leak as well)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5549 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 20:41:22 +00:00
Giel van Schijndel 9e70aaf07c Get rid of macro TREAP_NODE_DEBUG and move its contents to the only location where it's used: struct TREAP_NODE
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5548 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 20:25:48 +00:00
Giel van Schijndel 077d4efefe * Remove unused functions treapReset, treapDisplayRec and treapDisplay
* Remove unused macro TREAP_DISPLAY
 * Directly use function treapGetSmallest, treapDel, treapFind and treapDestroy instead of macros TREAP_GETSMALLEST, TREAP_DEL, TREAP_FIND and TREAP_DESTROY respectively

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5547 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 20:22:19 +00:00
Giel van Schijndel 9f3371dc33 Remove macro TREAP_NODE_BASE and move its contents directly into TREAP_NODE as that's the only place where this macro is used.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5546 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 17:53:03 +00:00
Giel van Schijndel 6e9db52984 Get rid of the unused, default comparison function for the values in treap nodes
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5545 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 17:49:10 +00:00
Giel van Schijndel 730188c081 * Get rid of treapint.h which declares prototypes for functions that are only used in treap.c.
* Declare these functions with static linkage instead.
 * Update autotools buildsystem, Code::Blocks project and MSVC project, raw win32 Makefiles don't need an update

NOTE: This may require updating of buildsystems not mentioned above

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5544 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 15:19:08 +00:00
Giel van Schijndel 514d96d72a * Don't #inlcude treap.h in frame.h as only a single file within Warzone depends on the treap code
* Use a forward declaration in strres.h to declare a pointer to a TREAP instead of importing the full treap.h declarations in strres.h and thus large portions of the codebase
 * Rename TREAP's forward declaration name from _treap to TREAP

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5543 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 15:09:00 +00:00
Giel van Schijndel 5348e1e4ae Properly set the svn:eol-style property
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5541 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 14:04:28 +00:00
Freddie Witherden 89523ccf9f Make sure we zero a widgets user data when we initialise it.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5540 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-14 08:51:55 +00:00
Giel van Schijndel b7f1b4aae1 Read some scripts using their __lower-case__ name (as these file's names are lower-case)
This might fix bug #12011

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5539 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-13 22:25:44 +00:00
Giel van Schijndel cb1db1ff61 #include stats-db2.h in stats-db.h, as the former is intended to eventually replace the latter
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5537 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-13 21:30:15 +00:00
Giel van Schijndel ec4784973e Add the used command line to crash dump reports
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5536 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-13 21:26:09 +00:00
Giel van Schijndel 83b63b71b9 Add PhysicsFS version info to crash dump files
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5535 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-13 21:01:28 +00:00
Giel van Schijndel 7749b59280 Don't remove stats-db2.h when using "make clean"
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5534 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-13 19:36:58 +00:00
Giel van Schijndel 30cbbefcbd Mark the #include from src/ in chat_lexer.l with a FIXME
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5533 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-13 19:22:11 +00:00
Per Inge Mathisen d7eabccb74 Comment out alIsSource assert
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5532 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-13 18:46:53 +00:00
Giel van Schijndel 5526f2c61a * Move type OBJECT_POSITION (and macro POSITION_OBJ to declare it) from structuredef.h to the new file positiondef.h
* Update build systems: autotools, raw win32 makefiles, Code::Blocks project and MSVC project
 * Rename _droid and _base_object forward declaration types to DROID and BASE_OBJECT respectively
 * Add two forward declarations for BASE_OBJECT and DROID to scriptfuncs.h so that it can declare pointers to these types
 * src/messagedef.h depends on lib/ivis_common/ivisdef.h and src/positiondef.h so #include those
 * Don't #include stuff from src/ in lib/script/chat_processing.h
 * Remove all unnecessary #inlucdes from src/ from lib/script/chat_lexer.l

NOTE: Build systems not mentioned above might need updating.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5531 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-13 18:15:03 +00:00
Per Inge Mathisen ae2c501b8f Use power-of-two texture for radar again. Fixes support for ancient gfx cards.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5530 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-13 18:10:58 +00:00
Giel van Schijndel 77f6e2e90c Print the dpid on NET_LEAVE messages as well
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5529 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-13 17:36:29 +00:00
Freddie Witherden d4168f712c Make it possible for an event handler to remove itself.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5527 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-13 15:40:58 +00:00
Per Inge Mathisen 96f1ad47af Make CHECK_DROID() call a new function checkDroid() to make it more obvious
which check fails. You can still see in which file and line it failed, as before.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5526 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-13 11:54:41 +00:00
Giel van Schijndel 13c4c559c5 * Move the definition of struct BRAIN_STATS from statsdef.h to stats-db2.tpl
* Make it possible to declare "references" to struct WEAPON by adding a %fetchRowById code block


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5525 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-12 21:45:42 +00:00
Giel van Schijndel 8344514617 Make sure to use the %prefix and %suffix when declaring pointers to structs
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5524 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-12 21:39:49 +00:00
Giel van Schijndel aad47ff640 Add a new struct level qualifier: %fetchByRow
* User code can use this to provide code that the SQLite code generator can use to get a pointer to some other struct
 * Make it so that you can only declare member fields with a `struct` type when the respective struct has a %fetchByRow directive in it
 * Generate loading code for struct-type fields in the c_sqliteload codegenerator by means of the code provided by the %fetchByRow directive


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5523 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-12 21:30:05 +00:00
Per Inge Mathisen c2fe7de339 The fix to bug #11829: When three players join mp dialog, one drops, in r5258
had a little bug of its own, that made player 3, 5, and 7 drop instead. Fixed!


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5521 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-12 20:36:59 +00:00
Giel van Schijndel b464ee82a5 Don't generate SQL code (that's SQL statements for table definitions as well as SQLite loading code) for fields of type C-only-field
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5520 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-12 20:36:45 +00:00
Giel van Schijndel 9eb61150c0 Add a new datatype to the mini database schema meta language: `struct`
* Allows "linking" in the database to other struct instances
 * Will be represented as a pointer to the target struct in the C datastructures
 * Will be represented as an integer ID in tables


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5519 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-12 19:48:39 +00:00
Giel van Schijndel caa467d9ee * Improve error message generated on type mismatch by code generator c_sqliteload
* Fix a syntax error in code generator sql_tabledef and add and initialize the used variables to produce an error message


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5518 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-12 19:17:08 +00:00
Per Inge Mathisen 58792b6df1 Fix erronous error reporting
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5517 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-12 16:21:00 +00:00
Per Inge Mathisen e2064a4927 Add error check in NETsendGAMESTRUCT - dump warning to log if fails.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5516 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-12 11:50:18 +00:00
Per Inge Mathisen a2ca8dedaf Improve logging in NETbcast. Change parameter type of NETBroadcastPlayerInfo so
that it takes unsigned like all its users.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5515 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-12 11:20:47 +00:00
Per Inge Mathisen 117fa9e961 Cosmetic improvements to netplay debug log calls.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5514 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-12 11:02:55 +00:00
Giel van Schijndel 2e5fab25f8 Attach line numbers to the AST of field declarations, and use it when reporting field-related errors
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5513 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-11 22:14:09 +00:00
Giel van Schijndel 1a17b936c9 Move the definition of struct WEAPON_STATS from statsdef.h to stats-db2.tpl
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5512 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-11 22:03:38 +00:00
Giel van Schijndel 65dee90e74 Accept all of ([US]D?WORD|[US]BYTE) as "transition" types in the mini database schema meta language
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5511 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-11 21:53:10 +00:00
Giel van Schijndel e33f083aaf Give errors when encountering unmatched struct-level and enum-level directives
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5510 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-11 21:48:34 +00:00
Giel van Schijndel 859be18724 Move the definitions of structs SENSOR_STATS, ECM_STATS, REPAIR_STATS and CONSTRUCT_STATS from statsdef.h into a single definition in stats-db2.tpl
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5509 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-11 19:40:49 +00:00
Giel van Schijndel dd90404594 Don't include stats-db2.tpl.struct.h, which is used when generating stats-db2.h, in the Doxygen docs
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5508 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-11 18:27:00 +00:00
Per Inge Mathisen ef7a4044e9 Fix bug that made droids seemingly explode randomly during the game. The cause
was that they would pursue the enemy on another person's computer, but not on
yours. Now your droids only decide to pursue on your computer, and sends updates
to other people about such decisions over the network. WARNING: Increases network
usage by unknown amount. Network sync rates could be lowered.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5507 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-11 17:57:25 +00:00
Giel van Schijndel 52255c0ee0 Move the definition of struct PROPULSION_STATS from statsdef.h into a single definition in stats-db2.tpl
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5506 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-11 17:53:41 +00:00
Giel van Schijndel 7f75a8f3c7 Add a new %nomacro directive to prevent macro definition of a struct and its children if the parent of that struct has a %macro directive
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5505 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-11 16:41:59 +00:00
Per Inge Mathisen 6114b01fee Sanity check that structure production by droids have a target in unitUpdateBuild().
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5504 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-11 16:30:06 +00:00
Giel van Schijndel 14a6655690 * Rename macro COMPONENT_STATS and struct COMP_BASE_STATS to STATS_COMPONENT and COMPONENT_STATS respectively
* Move the definition of macro STATS_COMPONENT and the struct COMPONENT_STATS (which was created using the contents of the macro) from statsdef.h into a single definition in stats-db2.tpl


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5503 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-11 15:37:46 +00:00
Giel van Schijndel 05bf9bdcd8 Declare UDWORDs as UDWORD in the C code (doh!) not as unsigned int...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5502 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-11 15:33:48 +00:00
Giel van Schijndel d8d2ad0dd6 Add a transition type "UDWORD" to the mini database schema meta language
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5501 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-11 15:30:32 +00:00
Giel van Schijndel 8ea7e2c54c Move the definition of macro STATS_BASE and the struct BASE_STATS (which was created using the contents of the macro) from statsdef.h into a single definition in stats-db2.tpl
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5500 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-11 14:52:45 +00:00
Giel van Schijndel 975ecbbb95 Add copies of strings declared with the "string" type in the struct definitions; thus have the structs take ownership of these strings (they're allocated with strdup)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5499 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-11 14:48:39 +00:00
Giel van Schijndel 8ce0412a28 * Add new %macro, %macroprefix and %macrosuffix directives to the mini database schema meta language
* Generate macro definitions similar to our current "inheritance-like" structure as created by macros when the above %macro directive is used


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5498 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-11 14:02:17 +00:00