Commit Graph

29 Commits (34e4246bd4936ffc04bd1975670093e1c9aefd37)

Author SHA1 Message Date
Giel van Schijndel e3a7f0cab8 Return the retrieved string from strresGetIDString and allocateName and use NULL to indicate failure.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5655 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-24 16:13:03 +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 72d3aac053 * Get rid of enumerators INVALID_MOVEMENT and INVALID_WEAPON_EFFECT from enums MOVEMENT_MODEL and WEAPON_EFFECT respectively
* Modify getMovementModel's and getWeaponEffect's API so that we don't need to depend on enums MOVEMENT_MODEL and WEAPON_EFFECT containing an "invalid" enumerator
 * Move enums MOVEMENT_MODEL and WEAPON_EFFECT from statsdef.h to stats-db2.tpl


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5494 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-11 12:56:22 +00:00
Giel van Schijndel 2ae0d61f00 * Get rid of enumerator INVALID_SUBCLASS from WEAPON_SUBCLASS
* Modify getWeaponSubClass's API so that we don't need to depend on enum WEAPON_SUBCLASS containing an "invalid" enumerator
 * Move enums WEAPON_CLASS and WEAPON_SUBCLASS from statsdef.h to stats-db2.tpl
 * Rename NUM_WEAPON_CLASS and NUM_WEAPON_SUBCLASS to WC_NUM_WEAPON_CLASSES and WSC_NUM_WEAPON_SUBCLASSES respectively


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5488 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 22:50:23 +00:00
Giel van Schijndel 66bfab9dcf Prefix all propulsion types (from enum PROPULSION_TYPE) with `PROPULSION_TYPE_` to qualify these names more fully
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5474 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 17:59:35 +00:00
Giel van Schijndel f6853ed368 * Get rid of enumerator INVALID_PROP_TYPE from PROPULSION_TYPE
* Modify getPropulsionType's API so that we don't need to depend on enum PROPULSION_TYPE containing an "invalid" enumerator

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5466 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 15:47:21 +00:00
Giel van Schijndel c6c5c981e6 Remove all TECH_LEVEL related cruft from the code as it's read from the stats files but unused throughout the rest of the code.
Read into a temporary dummy variable when loading stats.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5453 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-09 18:28:37 +00:00
Per Inge Mathisen be566a7d6d Add -Wcast-align and -Wmissing-declarations to autoconf debug builds, and fix warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4403 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-28 23:28:44 +00:00
Dennis Schridde 10f2ccfd56 TRUE->true, FALSE->false (except in scripts)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4311 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 16:51:17 +00:00
Giel van Schijndel 4d65c133b1 const correctness
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4213 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 21:37:21 +00:00
Giel van Schijndel 0e522201e0 Cleanup:
* Turn some file-level comments into Doxygen comments
 * Add #include guards to some headers that didn't have them yet


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4210 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 21:37:01 +00:00
Giel van Schijndel f7186877fe Some const correctness
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3976 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-09 15:20:02 +00:00
Per Inge Mathisen 548653d0d0 Add ECM range parameter. Clean up ECM code. Remove cyborg stealth hack from
trunk in anticipation of future ECM work.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3854 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-22 19:13:13 +00:00
Per Inge Mathisen 3ddb74e0d3 Cosmetic update to stats.c|h, and make more variables static.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3807 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-16 21:04:45 +00:00
Roman C 09ee432cca Commiting old scripting engine changes: this commit adds several new fields for droids necessary for threat avoidance as well as some new scripting functions.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3359 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-05 19:42:43 +00:00
Roman C 68788df771 Make ROF weapon upgrades reduce reload time for weapons with salvo file (otherwise ROF upgrades bring no advantages for weapons with salvo file).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3286 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-31 22:16:51 +00:00
Per Inge Mathisen ca6d31dc6c Remove unused POWER_STATS
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2162 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-22 13:22:01 +00:00
Dennis Schridde 6fa36aa0e9 + const, - unused
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1795 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-03 13:46:50 +00:00
Giel van Schijndel cc17299668 * remove internal forward declarations of functions already declared in the header
* use proper constness:
  * make some functions take arguments of `const char*` rather than just `char*` (also modified some functions' return values to return `const char*` where appropiate)
 * modify rank retrieval functions to use a central array instead; currently ranklimits (i.e. the amount of kills required to promote) is hardcoded in switch statements, as is the case with the names of those ranks
 * `make -C po update-po`

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1409 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-09 22:09:27 +00:00
Per Inge Mathisen 6f32003a02 Start removing unused droid program component code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1327 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-01 21:01:29 +00:00
Per Inge Mathisen a1d02fec76 Prune some dead code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1320 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-01 18:22:27 +00:00
Gerard Krol 8a2df06e16 Move weaponROF(WEAPON_STATS *psStat) from design.c to stats.c
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1262 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-18 00:28:18 +00:00
Gerard Krol 95552bad16 The maximum weapon ROF that can be displayed by the design screen is now
(like all properties) determined on loading the stats file. A VTOL 
weapon that reports a ROF of 600 thus now sets the maximum. This might 
be a too large increase, but I don't think that we need to add more bad 
hacks to WZ. This patch was inspired by patch #690.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1261 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-18 00:07:57 +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
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 840312f8ea Patch by Watermelon with slight modifications:
-new ORDER_CIRCLE VTOL command - will defend a certain position flying over it and engaging enemies nearby
-adds additional armor types for all sides of a droid (rear, front, top, bottom, left, right) - additional armor definitions are in body.txt.
Droid damage is now also a function of the impact side.
-adds multi-turret support for VTOLs
-modifies connectors in bodies: first 5 connectors are for ground units, the rest is for VTOL.
-introduces some fixes

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@901 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-17 17:12:14 +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
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
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