Commit Graph

1528 Commits (a8e813fbbd87c62c344baae14628d28cf44e5924)

Author SHA1 Message Date
Per Inge Mathisen c26f036d05 Clean up src/target.c
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1886 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-19 16:27:10 +00:00
Dennis Schridde 92bf004d99 Cleanup pie_PiePolyFrame and some other minor changes.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1884 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-19 14:27:14 +00:00
Giel van Schijndel 830751b056 * Update Code::Blocks project file to 1.6 format
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1881 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-18 23:28:11 +00:00
Giel van Schijndel 0fc5249f79 Use correct include variable ($includes instead of $include) for custom build commands
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1880 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-18 21:45:12 +00:00
Giel van Schijndel da8d699f03 * Add Code::Blocks project file
This currently compiles clean on GNU/Linux (disables gettext though), I haven't tested Windows yet.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1879 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-18 17:15:45 +00:00
Dennis Schridde 8ee46cc331 Minimal comment/header reordering.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1878 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-18 16:32:38 +00:00
Dennis Schridde a5f74dc850 Use violet instead of black to mark unused tiles. Useful for debugging.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1877 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-18 15:56:33 +00:00
Dennis Schridde 1f723e656c More cleanup...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1876 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-18 15:46:12 +00:00
Dennis Schridde 3f2786c030 - More cleanup
- Teach for to pieblitfunc
- sed DrawTransImage to DrawImage (they were defined this way before anyway) and remove an unnecessary parameter


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1875 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-18 14:25:06 +00:00
Dennis Schridde 083b4c97d5 Remove psPx optimization via pointers to minimise further patches.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1874 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-18 13:18:27 +00:00
Giel van Schijndel d4297bade6 * Replace several instances of 4 spaces with '\t' for indentation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1873 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-17 21:12:02 +00:00
Giel van Schijndel dea07b08a1 * split function dealWithLMB (which was around 350 lines) up into several smaller functions (still not pretty, but easier to read)
Behaviour should be unchanged


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1872 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-17 21:02:57 +00:00
Dennis Schridde 07a8031e94 Introduce PIE5 format.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1871 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-17 18:58:29 +00:00
Dennis Schridde 96609e273b More backdrops by Terminator.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1870 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-17 00:29:34 +00:00
Dennis Schridde b7efd162b2 Another backdrop by Terminator.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1869 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-16 12:31:31 +00:00
Giel van Schijndel e292810a5c Forgot to actually commit this:
* r1866 removed piefunc.c from raw Makefiles instead of rendfunc.c: fixed

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1868 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-14 22:17:45 +00:00
Giel van Schijndel b37345340b * r1866 removed piefunc.c from raw Makefiles instead of rendfunc.c: fixed
* removed rendfunc.c from POTFILES.in
 * `make -C po update-po` (raw makefiles still work for updating the gettext translation files)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1867 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-14 22:16:21 +00:00
Dennis Schridde 5dc0ccb99e Update raw Makefiles and MSVC to the removal of rendfunc.[ch]
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1866 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-14 21:58:36 +00:00
Dennis Schridde e40c830278 Remove more unused code. This includes iV_GetMouseFrame, which returned an undefined value before. scriptextern.c might want to be adapted.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1865 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-14 21:56:36 +00:00
Giel van Schijndel b2b33bbed4 * Use decent assertion expressions for some asserts (e.g. !"string", so that debuggers actually display something more interesting than 'FALSE')
* modify createDroid, createFeature and createStruct to use a NULL pointer as failure notification rather than FALSE
 * get rid of createStructFunc and removeStructFunc which where nothing more than fancy malloc and free wrappers

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1864 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-14 21:50:18 +00:00
Ari Johnson 74ab4f8787 Warning linting for MacOS X
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1863 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-14 21:17:57 +00:00
Ari Johnson b254cea724 Updated Xcode project
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1862 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-14 21:17:36 +00:00
Giel van Schijndel 7a4309c41c * update POTFILES.in for r1859
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1861 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-14 21:05:31 +00:00
Giel van Schijndel 66746c4078 * Use decent assertion expressions for some asserts (e.g. !"string", so that debuggers actually display something more interesting than 'FALSE')
* Fix a syntax error (missing brace)
 * Code cleanup: put curly braces on their own line
 * remove a copy&pasted switch statement, and merged it into the switch directly above (all case labels and break statements where _exactly_ the same, only the statements executed where different)
 * Use #if 0;#endif for commenting out code instead of /*;*/
 * move some vars in the most local scope where they're used

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1860 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-14 20:59:04 +00:00
Per Inge Mathisen 5c23008ee0 Remove the unused 2D map editing code. We are never going there... Notice
that files are removed, so rerun your build systems!


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1859 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-14 20:49:55 +00:00
Per Inge Mathisen 42ea71702d Add two new check macros, CHECK_OBJECT and CHECK_PROJECTILE, and sprinkle them over the code.
This will cause many new asserts, but easier to track down bugs. To find if a bug is caused
by too early object destruction, use "--debug memory" and compare with pointers such as 
"psObj-psDest" (one frequent offender in projectiles).


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1858 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-14 20:27:10 +00:00
Per Inge Mathisen 9c820a0435 Cleanup of object memory system. Remove unused morgue code, and use unused list
checking function in debug mode. Factorise duplicated code. Remove unused defines.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1857 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-14 19:49:19 +00:00
Giel van Schijndel ea325b35ce oops forgot to commit this along with r1855:
* modify accessing a global var to using a set function instead

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1856 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-14 19:41:43 +00:00
Giel van Schijndel 05156439fd * Task #5192: Audit some files for failure to set global pointers to NULL after having called free(global pointer)
* Mark some global pointers/vars for static linkage (the less global, and more local they are, the better!)
 * Add include guards to some files
 * Some code cleanup: braces on their own line
 * loadFile2 now doesn't free memory it didn't allocate itself anymore
 * Use decent assertion expressions for some asserts (e.g. !"string", so that debuggers actually display something more interesting than 'FALSE')
 * Don't assert(pointed_to_data != 0xdddddddd) since that method of detecting usage of dangling pointers only works with MSVC, while MSVC's free() probably (i.e. if it is sane) implementation does this check itself already

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1855 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-14 19:21:52 +00:00
Dennis Schridde 6a43986828 Remove POSIX deprecation warnings for MSVC
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1854 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-14 19:03:43 +00:00
Giel van Schijndel 91adc1ba44 * Task #5192: Audit some files for failure to set global pointers to NULL after having called free(global pointer)
* Mark some global pointers/vars for static linkage (the less global, and more local they are, the better!)
 * Some code cleanup: 4 spaces -> TAB, braces on their own line
 * Don't `if (pointer != NULL) free(pointer);` since free(NULL) is very much legal as well (and more readable IMO)
 * move some vars in the most local scope where they're used
 * make ResearchRelease return void rather than BOOL, since all calling functions ignored its result; plus the function itself never returned anything else than TRUE

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1853 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-14 18:22:57 +00:00
Per Inge Mathisen 1edba5809f More globals free() auditing
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1852 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-12 18:58:14 +00:00
Per Inge Mathisen 9567ce6391 Add hack to make ./configure --enable-debug=yes work on 64bit CPUs
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1851 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-12 18:02:56 +00:00
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