Commit Graph

619 Commits (d301fd3a8235a198df999bd1b896d20a4b42ef75)

Author SHA1 Message Date
Dennis Schridde d301fd3a82 Enhance POSIX crashdump with time of execution (not crash!)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1971 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-25 18:04:39 +00:00
Dennis Schridde 0c46dfdea3 - Get full path to warzone binary, so gdb can actually find it. (It runs in an empty env, so it doesn't even have PATH.)
- Add some debug output (which will never get shown, since we setup the crashhandler before the debughandler).


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1968 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-25 17:35:09 +00:00
Dennis Schridde 428c893226 Revert to the old implementation of STATIC_ASSERT. Beware: This does not work in global context (outside of a function).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1965 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-25 12:34:39 +00:00
Giel van Schijndel e3d9c70e94 * remove unused function audio_Get2DPlayerRotAboutVerticalAxis
* remove global var g_bStopAll which seems to function as some kind of crude (and non-functional) mutex lock (while Warzone doesn't even uses threads!)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1961 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-24 21:11:43 +00:00
Giel van Schijndel 46434a1e5d * Remove global var BOOL display3D which is always true anyway
* Adapt all code that depends on display3D by either removing if (!display3D){} code or removing the conditional around if(display3D){}
 * remove now useless function audio_Display3D (returned display3D) and now unused function audio_Get2DPlayerPos

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1958 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-24 19:38:36 +00:00
Per Inge Mathisen d3271aa386 Remove now quite useless encryption and anti-cheat code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1953 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-24 13:38:22 +00:00
Giel van Schijndel 2658fa36aa * Change kf_MoveToLastMessagePos() to be more readable (i.e. simply return on error, don't wrap the actual working, non-error, code in a conditional), also use map_coord instead of `>> TILE_SHIFT`
* Remove unused (and probably useless) function audio_PlayPreviousQueueTrack
 * Remove unused functions audio_ReleaseTrack, audio_GetAvailableID, audio_GetSampleMixVol
 * Remove useless assignment in audio_GetPreviousTrackPos and make check for invalid coordinates more easily readable


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1911 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-21 13:39:05 +00:00
Giel van Schijndel 37be498275 Cleanup:
* Change the array iteration code such that it is a bit easier to read
 * remove audio_CheckAllUnloaded() which only forwarded to sound_CheckAllUnloaded()
 * Add some comments

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1910 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-21 13:03:52 +00:00
Dennis Schridde e5ff965bbc Remove unused "altVal"(disp3d) and macros(fract), make macro safer(map)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1902 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-19 23:32:17 +00:00
Dennis Schridde cc2294112b Clean my WC
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1894 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-19 18:00:46 +00:00
Dennis Schridde 9a5fd28e0c - More generic cleanup
- Reorder debug=yes CFLAGS so the -Wno- flags are at the end
- Make skybox float-uv aware


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1890 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-19 16:51:40 +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
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 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 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
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 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
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 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
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
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 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
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
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 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
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
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
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 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
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
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
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 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 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
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