Commit Graph

1528 Commits (a8e813fbbd87c62c344baae14628d28cf44e5924)

Author SHA1 Message Date
Giel van Schijndel 98e6c05da1 * Allow compilation without sound; when used this eliminates the compile & link time requirement of libvorbisfile, libvorbis, libogg and libopenal
* This conditional compilation is controlled by WZ_NOSOUND (which replaces WZ_NOOGG)
 * Remove an unneed inclusion from oggvorbis.h (track.h)

NOTE: This is currently integrated in none of the build systems

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1832 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-06 17:09:23 +00:00
Giel van Schijndel 2adc6e3515 * Add a check for the special case of a commander playing in multiplayer (it needs less kills to achieve ranks then); I missed this when replaceing the specialized version of getDroidLevel for commanders
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1831 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-06 13:44:52 +00:00
Giel van Schijndel cc5de7ec37 * Refactor HashString and HashStringIgnoreCase to be a (very tiny) bit more readable
* Create a dedicated function for conversion of ASCII characters into upper case: upcaseASCII
 * Make HashStringIgnoreCase use upcaseASCII instead of an ugly bitmask hack which won't even work as expected on all strings!!

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1830 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-06 13:22:21 +00:00
Giel van Schijndel 00b8c344ad Made a type in last commit; this fixes it
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1829 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-06 10:37:48 +00:00
Giel van Schijndel abe777fd7a * Only assert that the build location of a droid is on the map if we're not playing single player since we can be on an away mission
This fixes one assert of bug #9280

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1828 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-06 10:32:47 +00:00
Giel van Schijndel a9a5b965ab * remove specialization of getDroidLevel: cmdDroidGetLevel
* modify getDroidLevel to provide the functionality of cmdDroidLevel for command and sensor droids

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1827 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-05 23:22:44 +00:00
Giel van Schijndel 6d2e839bf4 * Fix incorrect XML caused by (wrong) update to MSVC project file for deletion of lib/framework/heap.[ch]
(I simply should have enabled my VIM XML validation script, doh!)

Patch by vs2k5

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1826 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-05 22:09:02 +00:00
Dennis Schridde 8c49cf5a91 Remove unused file streamer.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1825 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-05 18:41:19 +00:00
Dennis Schridde 60cb577b1b Wrong number, reported by Kreuvf. (Shouldn't this function instead retrieve its numbers from some file?)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1824 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-05 18:29:26 +00:00
Ari Johnson d2d77144c9 Updated Xcode project
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1823 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-05 17:01:09 +00:00
Giel van Schijndel c0bddbb0e1 Add some translations to Dutch translation file
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1822 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-05 12:46:50 +00:00
Giel van Schijndel 12f21d0b0c * Replace usage of uint8_t with char for C-strings; while (u)int8_t works perfectly nice for numbers it isn't nice for text (char-array)
* To make sure we still have the guarantee that a char is 8bit I've inserted a static assertion for this (CHAR_BIT == 8)
 * Use exact length types for lobbyserver

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1821 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-05 12:01:59 +00:00
Giel van Schijndel ed73e62898 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 and replace it with malloc/free

NOTE: MacOSX projectfile probably requires an update

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1820 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-05 11:46:00 +00:00
Giel van Schijndel 5af0c2c1a3 Some more heap abolishing:
* Replace use of heaps psDroidHeap, psStructHeap, psFeatureHeap and psGrpHeap with malloc/free
 * 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@1819 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-05 10:59:08 +00:00
Giel van Schijndel 72e28131de Some more heap abolishing:
* Replace use of heaps psStructFuncHeap and psFlagPosHeap with malloc/free

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1818 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-05 10:25:39 +00:00
Giel van Schijndel 9e9a17e58f Some more heap abolishing:
* Replace use of heap psTemplateHeap with malloc/free

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1817 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-05 10:15:33 +00:00
Giel van Schijndel 7ae1b1bee7 Some more heap abolishing:
* Replace a lot of heap usage with malloc/free usage

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1816 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-04 22:02:05 +00:00
Giel van Schijndel d65f88beb5 * Replace a lot of heap usage with malloc/free usage
* 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@1815 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-04 20:46:30 +00:00
Giel van Schijndel 5839fb21ea Revert r1810 since it somehow results in undefined behaviour (can't find the cause right now, so this revert is to leave the trunk in a stable state while I work on finding the cause)
PS: "Dang! That GUI code really is borked stuff!"

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1814 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-04 19:52:07 +00:00
Giel van Schijndel 8144a45d6f The assertion alone should suffice
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1813 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-04 19:42:18 +00:00
Giel van Schijndel 376323c9dc * added an additional function to lib/widget's interface: `widgSetTipText(WIDGET* psWidget, const char* pTip)`
* intdisplay.c now uses the widget interface to set tooltips on its widgets (which is the const-correct way, and better localizes memory management code; i.e. strdup() would be the dirty-hack style alternative)
 * Change mixed space/tab indentation into tab indentation (only for one function though)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1812 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-04 18:33:36 +00:00
Ari Johnson 6e3ff3d1ee Updated Xcode project to use '--std=gnu99'
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1811 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-04 18:24:52 +00:00
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