Commit Graph

34 Commits (7951c86277607a4c4842d64c7c9788dfd4a70403)

Author SHA1 Message Date
Guangcong Luo 75569d156f Fix rearming pads so they actually rearm at the speed they're intended to. Also make rearming upgrades affect rearming pad repair speed. Replaces REARM_PAD.currentPtsAdded with REARM_PAD.timeLastUpdated, but savefiles should still be compatible.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8865 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:27:03 +01:00
Per Inge Mathisen 87a687e15c A small enhancement for GUI subsystem: target origin tracking system for structures (only for ones
with weapons). If structure have some target for main weapon it will show appropriate icon on the 
right side of weapon reload bar/health bar. For now it can distinguish: visual contact targets, 
commander targets, sensor targets, CB sensor targets, counter radar targets, air defense targets.
Closes ticket:686, patch by i-NoD.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8022 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:07:11 +02:00
Gerard Krol dc834b2a3a Place buildings using blueprints (green) instead of highlighting the ground.
The blueprint is a green transparent version of the building you want to build. It is bright green when the build location is valid and red when it is not. After the building is placed a darker version of the green building will remain until a droid starts construction.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6840 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-11 22:55:41 +00: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
Giel van Schijndel 9a2788aca8 * structuredef.h depends on basedef.h so make sure to #include it
* Ignore ./src/stats-db2.tpl.sql.c from the Doxygen documentation (as it'll get included in stats-db2.c
 * Generate an alphabetical "compound" index for the Doxygen documentation
 * Make the typedef name of a struct, union and enum the entity's name in Doxygen

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6330 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-16 14:35:19 +00:00
Giel van Schijndel 46002d39d9 Use WZ_DECL_MAY_ALIAS for the BASE_STATS "derived" structures because we perform "type punning" on these pointers in a similar fashion to the BASE_OBJECT hierarchy.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6177 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-16 13:49:05 +00:00
Per Inge Mathisen 4aaf63015f patch #1104: New turret management code: Part 2: Cleanup actionTargetTurret(). Reduces number of input parameters from 7 to 3.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6070 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-23 20:40:15 +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
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 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 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 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 8837e5630f Make repair facilities that are close to each other share the workload
if one is overloaded and others are out of work.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4843 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-28 19:06:21 +00:00
Per Inge Mathisen 1ef5b2202b Generalize the damage function and move some common variables between the various
object types into the base object type. This also makes the recently added minimum 
damage change apply to structures and features as well. See patch #1000.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4013 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-11 17:47:24 +00:00
Dennis Schridde 303895e5fb Mark all BASE_OBJECT "derived" types as WZ_DECL_MAY_ALIAS (they may alias with any type).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4011 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-11 15:53:45 +00:00
Per Inge Mathisen 527244e5a3 Move sensor and ECM information into base object definition. Add convenience
functions to structures as well, and wrap some more uses. Remove the 2.1 ECM hack
that limited range by a third if ECM was higher than sensor power in expectation
of future work.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3933 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-06 22:06:06 +00:00
Per Inge Mathisen cf36c8a87d Add droid sensor convenience functions, and rename structure ECM modifier to be
the same name as that of droids.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3932 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-06 21:37:47 +00:00
Giel van Schijndel ccfcd0c7fb * Add a Doxygen \file directive to the definition header files, defining objects "derived" from BASE_OBJECT
* Make header guards of these files more consistent:
  * Make them match with the file's name where they didn't match before
  * Place the header guard's name in a comment at the #endif part of the header guard
  * Use a __INCLUDED_filename__ style for them
 * Replace some mixed indentation styles (spaces + tabs) with tabs only for indentation


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3598 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-30 15:19:02 +00:00
Dennis Schridde 76fddad000 Generic cleanup. Mostly remove struct keyword where unnecessary.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3585 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-28 00:02:28 +00:00
Per Inge Mathisen feb9dbdce6 Factories do not have a formation, oddly enough! So remove it.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2788 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 21:20:15 +00:00
Per Inge Mathisen c6316b31d2 Remove unused structure variables
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2787 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 20:42:49 +00:00
Per Inge Mathisen f50b4d11dd The old armour system had a single armour value for structures and features,
while droids had one armour value for each weapon class (there are only two 
weapon classes now, though). The new armour system by Watermelon has for droids
one for droids one set of armour values, in which there is one armour value for 
each weapon class, for each six side of the droid. This patch generalizes the 
armour systems into one, and puts it into the base object definition 
(BASE_OBJECT). This makes it easier to maintain, and is one step toward a more 
advanced armour system for structures as well.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2785 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 19:27:08 +00:00
Per Inge Mathisen ad9885b14b Add some ugly debug code to help track down dangling object references.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2655 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-28 21:47:52 +00:00
Per Inge Mathisen dd4898fe2f Beginnings of a new savegame format. Each time you save, a new file with the
extension .wzs is added to your savegame directory. This is the new world.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2602 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-23 20:52:51 +00:00
Per Inge Mathisen 2e99433ad0 Rename a few files for consistent naming. base.h -> basedef.h.
bulletdef.h -> projectiledef.h. weapons.h -> weapondef.h.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2063 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-12 19:56:16 +00:00
Giel van Schijndel b091d350e0 * Don't take guesses on what kind of struct is the largest; use a union instead so that the compiler can deal with that
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2043 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-08 20:04:39 +00:00
Per Inge Mathisen 5aa373e5b2 Misc cleanup forward ported from reference counting work. Adds new checking
macro CHECK_STRUCTURE().


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1912 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-21 17:43:50 +00:00
Per Inge Mathisen 34b1ca108f Cleanup. Fix indentation. Use enum on structure types to help prevent bugs like
the satlink bug from creeping back in.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1736 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-28 21:44:52 +00:00
Dennis Schridde 2a74242eb3 - Replaced various vectors with Vector3i and Vector3f (idea by Watermelon)
- Vector3i from lib/ivis also used in lib/audio, maybe want to move it to some more generic place?
- Replace iPoint with Vector2i
- Remove additional integer type declarations from pietypes.h
- Rename all iSprite to iTexture
- Various warning fixes: Unsigned/signed comparisons, uninitialized variables, declared but not defined symbols
- Replace DEBUG_BLOCK with DEBUG_MALLOC (it was virtually the same)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1245 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-16 16:20:16 +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 4f837c0c70 Patches by Christian Ohm:
034 - Reorganized src-warcam.c
036 - Cleanup includes and function declarations


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@884 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-02 12:50:28 +00:00
Roman C f3e0227b45 Patch by Watermelon:
-fixes disappearing oil derricks (bug #7740)
-allows structures to have multiple weapons (structureweapons.txt format changed)
-fixes muzzle flash for 2nd and 3rd weapon

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@857 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-25 17:38:27 +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
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