Commit Graph

86 Commits (34e4246bd4936ffc04bd1975670093e1c9aefd37)

Author SHA1 Message Date
Dennis Schridde d1d55cc977 FRACT->float,[if]SQRT->sqrtf
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1658 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-19 21:32:19 +00:00
Giel van Schijndel 26f2672bfd * remove macro PTRVALID
* replace all instances of PTRVALID(ptr,size) by (ptr != NULL)
 * remove asserts of style ASSERT( x == NULL || x != NULL ) because they would evaluate to true always anyhow and as such wouldn't ever trigger
 * remove macros iV_HeapAlloc and iV_HeapFree and replaced them with MALLOC and FREE respectively (that's what they expanded to anyway)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1348 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-03 13:20:41 +00:00
Dennis Schridde 07f6c04ecd Sensor targeting fix by Thomas Rast
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1339 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-02 20:51:08 +00:00
Giel van Schijndel d659136496 * move audio_id.[ch] to lib/sound (because the soundlib depends on it, and libraries shouldn't depend on the main source, i.e. src/)
* further remove audio_GetIDFromStr from src/aud.c and rename audioID_GetIDFromStr (from audio_id.c) to audio_GetIDFromStr
  * also changed calling method of audio_GetIDFromStr, now it returns its retrieved value (ID index number) rather than writing it in a pointer given as parameter

PS MSVC project might be broken, I don't have it so can't check nor fix it

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1288 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-27 18:59:03 +00:00
Per Inge Mathisen 445aa74644 Remove a ton of unused functions that were marked static and started to emit warnings.
A few were given WZ_DECL_UNUSED to silence warnings instead, since they are referenced 
in not yet removed code.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1257 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-16 21:59:43 +00:00
Stefan Huehner 59843ec8a2 Code-cleanup:
- make a lot of functions static
- remove unused extern declarations
- fix one function declarations () -> (void)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1254 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-16 20:23:35 +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
Roman C f4c4c48dd2 Patch by Gerard Krol:
replaces AND/OR macros with &&/||

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1089 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-10 16:39:39 +00:00
Per Inge Mathisen 3d6771a521 Unify the several different definitions of pi in the codebase. Now we use the
C macro M_PI (if available, or we will define it on our own in fractions.h).


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1033 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-24 19:42:20 +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 8df2091640 Cleanup, fix warnings created by missing braces in intialization of the oaInfo struct.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@947 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-31 19:51:43 +00:00
Roman C 4ce5cd91ed Patch by Watermelon:
Multi-Targeting support:
1. Every weapon will try to choose its 'ideal' (this weapon's best
target) target first, if fails choose primary (weapon_slot 0) target.
2. If primary target is not valid for auxiliary (2nd,3rd etc), auxiliary
turret will try to acquire other targets (use primary weapon mortar to
engage remote target while having mg/cannon to engage close-quarter
enemies).
3.Adds DROID_OACTION_INFO struct (contains DROID_MAXWEAPS pointers to
BASE_OBJECT(target)) to handle multiple target info in order
functions.
4.A few weapon-related functions now return boolean values again instead of bitfields.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@945 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-31 15:18:01 +00:00
Roman C bd2dd39e56 -replaced some numbers scattered across the code with defines
-when looking for a new target droids/structures will now take into consideration targets of the friendly droids/structures nearby
-droids/structures are now constantly looking for the best target - will no longer lock on decoys/walls and other crappy targets forever
-ALT+Space now opens a special debug window - set window text with setDebugMenuEntry()
-minor cleanups

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@905 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-22 15:13:04 +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 3f4119994f Fixes by Hikaru:
- bug#7423 : Segfault because of missing argument to COMPRINTF in src/structure.c
- Repair units recieving attack orders and are thus not repairing.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@897 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-09 11:04:35 +00:00
Roman C 2392bc8c9c Disabled CALL_DORDER_STOP script callback - fix to the the callback bug as described by Hikaru-orly
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@891 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-03 00:36:18 +00:00
Stefan Huehner ae103b3de3 fix compilation without #define DEBUG, after r876
Some variables, functions used are only compiled
in with DEBUG so the debugging-calls can only be
used inside DEBUG



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@877 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-01 23:03:17 +00:00
Dennis Schridde c510f87ed7 Patch by Gerard Krol: Removal of debug macros
Changes several DBPx macros to debug() calls and:
I introduced 2 new categories: LOG_MOVEMENT and LOG_ATTACK
and what didn't fit in was set to LOG_NEVER.



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@876 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-01 22:22:29 +00:00
Roman C bb9fbc9fb2 Patch by Watermelon:
-adds penetrate flag to weapons.txt (relevant for multiplayer)
-increases hit-box radius
-adds some fixes to the hit-system

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@868 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-26 16:30:34 +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 f28ff5553a Patch by Gerard Krol and Watermelon: penetration for certain weapon types
Made proj_SendProjectile to accept another BOOLEAN value 'bPenetrate',when set to TRUE it will create a new projectile upon impact and the newly created projectile will try to reach the destination of the impact'ed projectile.(FLAME,ELECTRONIC,GAUSS weapons projectile can penetrate several enemy units)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@831 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-11 21:31:28 +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 9aebc7c2b5 Patch by Watermelon: Droid Multi-Turret Support
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@811 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-04 22:56:28 +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 2f2015340c -added script callback to process key inputs from within scripts
-added in-game debug window (mostly for scripting debugging purposes, something like a watch window)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@799 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-01 13:56:23 +00:00
Roman C 4b0ed1be22 Improved droid target selection code, now uses weighted function for target selection.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@789 4a71c877-e1ca-e34f-864e-861f7616d084
2006-10-13 10:33:19 +00:00
Dennis Schridde d163be853d Christian Ohm's PSX removal part 1.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@777 4a71c877-e1ca-e34f-864e-861f7616d084
2006-10-07 16:40:18 +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 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
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
Dennis Schridde fc4ce66939 Patch "code cleanup: void 2" by Stefan Huehner
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@705 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-13 12:58:32 +00:00
Dennis Schridde 2c460e920b - Remove all references to DBP0()
- Add Irrlicht evaluation to TODO


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@673 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-31 20:14:21 +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 27fadd14cf - converted the sources in src/ 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.



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