Commit Graph

1506 Commits (2063d578c3c1c3e28c50497fd3297dc9f1103215)

Author SHA1 Message Date
Giel van Schijndel 85ecafd1de * Widget functions now copy the different strings they're passed into their widget's object-struct (This takes the memory management burden of these strings from the client code into the widget-library code)
* Use decent assertion expressions for some asserts (e.g. !"string", so that debuggers actually display something more interesting than 'FALSE')

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1810 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-04 18:06:07 +00:00
Ari Johnson d411264e17 Reverted changes from r1775 and r1779 that used 'bool' instead of
'BOOL' and thereby prevented the code from building


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1809 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-04 17:26:43 +00:00
Roman C c227835d6a Increase default number of allowed power generators per player to 8, since a power generator can only have 4 oil derricks attached (30 derricks allowed).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1808 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-04 17:15:56 +00:00
Giel van Schijndel 704c6bc653 * Use decent assertion expressions for some asserts (e.g. !"string", so that debuggers actually display something more interesting than 'FALSE')
* Remove usage of widgCopyString

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1807 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-04 16:49:58 +00:00
Dennis Schridde a4046c2cd4 Accidentialy removed %.tab.h from the .y rule. See bug#9275.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1806 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-04 16:39:17 +00:00
Giel van Schijndel c5cb9608d1 Leave the memory management up to the memory management functions!
That is:
 * Don't use a custom memory heap implementation anymore
 * Remove all usages of HEAP code for string allocation (wasn't being used anyway due to conditional compilation)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1805 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-04 16:34:17 +00:00
Giel van Schijndel a381013dc6 Leave the memory management up to the memory management functions!
That is:
 * Don't use a custom memory heap implementation anymore
 * Use malloc & free for memory management

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1804 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-04 12:30:06 +00:00
Giel van Schijndel d1336810a9 * Fix wrongly triggered error messages about OpenAL audio contexts
(The error state simply wasn't cleared before calling a function that could produce an error)

Patch by vs2k5

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1803 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-04 10:01:52 +00:00
Giel van Schijndel b6a27628ba * Go back to using INT_MAX instead of INT32_MAX (this partially reverts r1786)
* Now actually #include <limits.h> so that we can be sure INT_MAX is defined

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1802 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-04 09:37:28 +00:00
Roman C 68a2965390 - increase default number of allowed power generators from 5 to 6 to match the default number of allowed oil derricks (30)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1801 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-03 18:33:51 +00:00
Giel van Schijndel 39829e9ff3 * move CHECK_DROID assertion up, such that it appears _before_ the return statement; this will ensure that this assertion actually gets executed!
* Don't use two definitions for CHECK_DROID; a debug, and empty non-debug variant. This because (aside from the for-statements) the assert macro is the only thing getting invoked by the CHECK_DROID macro, and the assert macro will automatically be defined to a NO-OP if NDEBUG is defined (which is defined for non-debug builds).

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1800 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-03 16:25:21 +00:00
Giel van Schijndel 090e5e17a4 Partially revert r1797
* I.e., do change inline function check_droid back into macro CHECK_DROID. But keep the increased readability of r1797 (as much as that is possible with macros).

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1799 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-03 16:03:10 +00:00
Giel van Schijndel dcb2c3350f * turn some usages of WinAPI types (*WORD) into their native C counterparts (e.g. int, unsigned int, etc.)
* make integers unsigned at places where we never, ever use signed values for their values
 * move some variables into a more local scope (i.e. the only scope where they're used)
 * turn some mixed tab/spaces indentation usage into tabs-only
 * remove unused (and commented out) conditional compilation macro USE_DIRECTPLAY_PROTOCOL


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1798 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-03 15:51:56 +00:00
Giel van Schijndel 8e2837ab97 * Change macro CHECK_DROID into static inline function check_droid
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1797 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-03 15:12:35 +00:00
Dennis Schridde bb61dd2eb0 static
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1796 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-03 14:07:31 +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
Roman C a8a091a604 Updated ChangeLog
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1794 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-03 13:18:40 +00:00
Roman C 16b247dd6d Balance Changes
LasSat weapon:

-blast radius: increased from 2 tiles to 4.5 tiles
-blast radius damage: increased from 1000 to 2800
-reload time: increased from 5 mins to 8 mins
-chance to hit in the blast radius: reduced from 99% to 90%

NOTE: normal damage doesn't seem to have any effect on the LasSat weapon

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1793 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-03 13:09:48 +00:00
Dennis Schridde 68e56823e1 - Constification
- POINT -> Vector2i
- changed internalformat = getPixelFormat() to GL_RGBA in one place
- removed unused variables/functions
- proper intialisation


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1792 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-02 23:01:29 +00:00
Roman C a6b56ed7e9 - added balancing changes overview back to the ChangeLog
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1791 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-02 19:03:03 +00:00
Per Inge Mathisen 2f03ccf5cd Add helpful comments from patch #730 by Watermelon
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1790 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-02 16:37:37 +00:00
Per Inge Mathisen 0ebf1e2278 Add a new assert collection CHECK_DROID(psDroid) and sprinkle it over
the droid code. More carefully initialize some droid variables. Remove
a ton of unused droid code. Hopefully this will make it easier to debug.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1789 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-02 16:26:41 +00:00
Per Inge Mathisen b18c40d58a Oops. I accidentially turned on a gateway illustration debug feature. Turning it back off...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1788 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-01 21:16:44 +00:00
Per Inge Mathisen dc71f601f9 Exorcise hard-coded texture size numbers, so that we can now change the size of
the terrain texture atlas pages.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1787 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-01 20:59:11 +00:00
Per Inge Mathisen 3bc52689dc Remove unused TILE_BITMASK and use INT32_MAX instead of possibly undefined INT_MAX.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1786 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-01 19:40:18 +00:00
Per Inge Mathisen b532b1cc60 Close bug #6897 reported by Dennis. Fix two asserts with edit window's
demolish command, and also add the feature of allowing this demolish 
command remove map features such as oil resources.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1784 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-31 18:19:54 +00:00
Per Inge Mathisen 10cfe3c065 Better fix for move.c droid turning floating point bug. Code is now more
reliable, cleaner and will give better error report should it fail again.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1783 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-31 17:29:52 +00:00
Per Inge Mathisen 3900653046 Fix possible mp crash in armed transporter code. Patch by me and Watermelon.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1782 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-31 16:55:42 +00:00
Dennis Schridde 7355ad466f Revert r1780
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1781 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-31 16:07:50 +00:00
Dennis Schridde f9cb796b4e Added Troman's balacing changes from r1778 to the ChangeLog. (I.e. Kreuvf might be interested.)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1780 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-31 10:57:39 +00:00
Per Inge Mathisen 6eecf830ba Fix two issues with LasSat: You can no longer drag-build it (this would cause
an assert), and you can now build it and other multi-tile defense structures
over walls (plural) without asserting (or crashing) the game. I am sure there
are other issues left. Man, was that feature rushed! ;-)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1779 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-30 18:03:26 +00:00
Roman C 81812b89b4 Balance Issues (better late than never):
Light Cannon:
- weapon damage raised from 25 to 37
- weapon chance hit increased from 20 to 25
- weapon radius damage increased from 5 to 7

Heavy Gunner Cyborg:
- weapon damage raised from 30 to 37

Cyborg Engineer:
- construction component cost decreased from 17 to 10
- construction time for construction component decreased from 85 to 65 (used to be the same as truck's)
- hitpoints of construction component decreased from 50 to 40 (used to be the same as truck's)

Cyborg Mechanic: (all 3 repair components used to have almost same values, which is now history)
- repair component cost reduced from 50 to 35
- repair component build time decreased from 250 to 100

Heavy Repair:
- heavy repair component cost increased from 50 to 70
- heavy repair component build time increased from 250 to 300


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1778 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-30 16:53:17 +00:00
Roman C 2019b3f08d Aivolution Update:
- fixed a bug preventing AI from building a factory when playing with no-bases settings
- implemented minimal requirements for a base
- some clean-ups

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1777 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-30 14:34:08 +00:00
Roman C fd9dd2a93d Aivolution AI Update:
- fixed a bug preventing AI from locating its base
- improved base location routine

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1776 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-30 10:47:16 +00:00
Giel van Schijndel 9c15ebad81 * Use native C types (rather than the ancient WinAPI types, we inherited)
* Declare variables at the most localized scope


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1775 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-30 07:20:50 +00:00
Giel van Schijndel 1faab1bc89 * Fix compiling with MSVC (variable declarations at the start of the function)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1774 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-30 07:17:43 +00:00
Dennis Schridde 1ba7327b0c More verbose SVMESH members:
- s[xyz] -> screen, w[xyz] -> water
- Beware: Besides the name both are (probably) in screenspace coordinates
- .screen and .water only differ for water tiles and then only, because those may have a different .y if they are "PushedDown"
- .water is only used in locateMouse()
- .screen.z is used for basic visbility testing in drawTiles()
- Besides that .screen is only used in locateMouse() and to outline tile corners on keypress


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1773 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-30 02:44:38 +00:00
Dennis Schridde d56e96c52e Fix STATIC_ASSERT to not produce "unused variable" warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1772 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-30 02:26:41 +00:00
Dennis Schridde eca9d2bab6 Simplify code, mX -> mouseXPos (like in input.c)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1771 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-30 02:06:46 +00:00
Dennis Schridde db49a55df0 More constiness and documentation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1770 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-30 01:50:01 +00:00
Dennis Schridde 98cb1153c0 Make trig* functions const, which should be safe since they only depend on arrays which are setup on startup.
Also rename "count" to "i", since it really only is a loop iterator.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1769 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-30 01:41:48 +00:00
Giel van Schijndel 7af99e5645 * make inQuad const correct
* remove several unused and essentially no-op functions


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1768 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 23:11:52 +00:00
Dennis Schridde 9c6a4b29db Use special events structs for event handling.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1767 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 22:57:32 +00:00
Dennis Schridde 58040a0af6 Reorder initialisation/output of main()
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1766 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 21:53:34 +00:00
Giel van Schijndel 1360756487 * Attempt to fix floating point imprecision from triggering annoying asserts
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1765 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 21:37:22 +00:00
Per Inge Mathisen e963c18731 Undo sat uplink fix because it broke lassat. Sorry :(
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1761 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 18:39:46 +00:00
Giel van Schijndel 6cb536c0d1 * Now load the "STR_RES" resource type directly from a file rather than an intermediate memory buffer
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1760 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 18:12:02 +00:00
Per Inge Mathisen 9cecbdcb0d Fix satlink bug for real this time
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1759 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 18:08:17 +00:00
Giel van Schijndel 31d16a09bd * Fix assertion messages (the function names used there where incorrect, probably a copy&paste error)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1758 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 18:00:47 +00:00
Roman C fb6e1cbfd1 Aivolution AI:
- cleaned up debug messages

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1757 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 17:56:51 +00:00