Commit Graph

1345 Commits (077433f02fc15aeb426c67e1b6201d43827912e7)

Author SHA1 Message Date
Per Inge Mathisen 077433f02f Audit more globals not being set correctly to NULL.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1850 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-12 17:56:34 +00:00
Per Inge Mathisen 6b9e5043be Audit some files for failures to set global pointers to NULL after calls
to free()


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1849 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-12 17:18:56 +00:00
Per Inge Mathisen 80026d553c Tiny cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1848 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-12 17:16:26 +00:00
Per Inge Mathisen 8a84301e9a Fix bug #9262 where the game would fail when loading savegames because I
expected that an oil derrick would always be placed on top of an oil feature.
This is not the case when loading games, however. In this case, the oil is gone.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1847 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-12 16:22:50 +00:00
Per Inge Mathisen a06b1f8b53 Add recovery fallback for non-debug builds for bug #9262. It will
still assert, though. We need to figure out why it sometimes wants
to build derricks on tiles that do not have oil.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1846 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-11 20:31:36 +00:00
Giel van Schijndel b28d8bbdf6 * Fix array out of bounds access
patch by vs2k5

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1845 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-11 01:04:39 +00:00
Ari Johnson 15a89809d2 Improvement to how Xcode project invokes gcc with --std=gnu99
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1844 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-09 22:53:26 +00:00
Giel van Schijndel 239ea11701 Fix MSVC compilability:
* Declare vars at the beginning of the block

Hinted at the problem by vs2k5

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1843 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-09 21:54:15 +00:00
Per Inge Mathisen f537ad65fb Add a bunch of default m4 macros to ease compilation under some distributions.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1842 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-09 16:20:46 +00:00
Gerard Krol c1afb761f1 PIE import and export scripts. The import script is adapted from Rodzilla. Place these in your ~/.blender/scripts folder and enjoy. Supported:
connectors, team colors (using a second UV layer). Not supported: animations of any kind.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1840 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-08 18:05:16 +00:00
Dennis Schridde d11f659b71 Debian-ChangeLog update. Thanks Jocke.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1839 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-08 00:43:43 +00:00
Dennis Schridde e305f2a566 Move icons and desktop into /icons/. Autotools work, Debian buildscripts may need further adjustments.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1838 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-07 22:51:52 +00:00
Giel van Schijndel c5f107c36b * 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@1837 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-07 18:31:42 +00:00
Giel van Schijndel 0378115e2b * Change variable names to more meaningfull names
* Add explaining comments
 * Remove some pieces of commented out code that only help us stand a better chance at winning the "Obfuscated C" contest
 * Get rid of some copy&pasted code which only has minor differences, and use a more general of the two copies instead
 * Remove armourDamage (held damage dealt to an object's armor) since it wasn't ever used

Cleanup part of patch #745 by Freddie Witherden <EvilGuru>
Plus additional modifications by myself

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1836 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-07 17:01:21 +00:00
Giel van Schijndel 7ede8f9fa1 * Add an assertion to check for NULL pointers (this seems to happen a lot when loading games lately)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1835 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-06 22:47:22 +00:00
Giel van Schijndel b6744218fb Cleanup:
* Remove some commented out lines
 * One of these commented out pieces described lowering armor as a result of being shot; this however would result in high ROF weapons being overpowered (not to mention the code was so old it probably wouldn't compile)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1834 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-06 21:16:44 +00:00
Giel van Schijndel dd337e40eb Some more 64bit safety:
* Use "%zu" as format specifier to print out size_t types


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1833 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-06 18:49:57 +00:00
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