Commit Graph

948 Commits (927aa2c39d2e2078a59d871cb16410b9583f8c69)

Author SHA1 Message Date
Dennis Schridde 6134810a78 My most dumb commit ever: Dummy reference vorbisfile.h symbols to prevent warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3233 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-29 23:24:33 +00:00
Dennis Schridde 5143e3e165 Add MKID macro for dummy symbols.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3232 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-29 23:21:20 +00:00
Per Inge Mathisen 877ac6456c Add lots of doxygenized comments.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3230 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-29 22:34:41 +00:00
Per Inge Mathisen 5cca5e2893 Make droid experience a floating point in tagfile format, and add better
error reporting for user errors when they forget to update definition file.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3229 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-29 19:53:14 +00:00
Per Inge Mathisen 52aa90d200 Fix a few spelling errors, and add a new debug category 'multisync'.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3227 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-29 17:55:20 +00:00
Ari Johnson 47816967a7 Updated Xcode project and some endian fixes; also changed endian_*() calls
to expand to ((void) (x)) on little-endian systems, so that the compiler
will catch little-endian developers who forget to update the endian_*()
calls when they change the names of structure fields.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3205 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-27 23:55:34 +00:00
Freddie Witherden 6a338c71ce Use the endian swapping functions provided by SDL.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3201 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-27 19:29:53 +00:00
Per Inge Mathisen 0c10287938 Add some doxygen documentation for tagfile code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3196 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-27 15:37:15 +00:00
Per Inge Mathisen f7e7e44329 Add new tagfile method tagRead8vDup which reads an unsigned byte array of unknown
length, allocates a memory buffer for it, and returns it. Not recommended for
general usage.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3193 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-27 14:57:22 +00:00
Per Inge Mathisen fae5745233 Remove unused function pie_DrawImageFileID. Rename pie_SetColourKeyedBlack to
pie_SetAlphaTest, and do not enable it while drawing the ordinary terrain.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3189 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-27 01:05:37 +00:00
Per Inge Mathisen 2390ed5d63 Remove wrongly set (ie was unused) water xyz for tiles, and fix wrong comments.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3176 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-25 20:37:33 +00:00
Giel van Schijndel bc66705498 * In Vector3uw explicitly use uint16_t instead of UWORD
* Add a function NETVector3uw to use for passing Vector3uw objects more conveniently over the network

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3173 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 23:36:02 +00:00
Dennis Schridde 248a8cb510 Minor indent
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3170 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 22:05:15 +00:00
Giel van Schijndel 06dab81c11 * Update Code::Blocks and MSVC project files to complement the cleanup of sequence code in r3162
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3163 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 16:31:51 +00:00
Gerard Krol 58b82f44ad Remove all RPL cruft from the sequence code. The new sequence code can be added to sequence.c easily. Projects will need to be updated.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3162 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 15:57:29 +00:00
Giel van Schijndel fbf03af195 * Remove macros:
* ROUND: replace by a static inline function (math_round) instead
  * FRACTCONST: this macro just cast both of its arguments to float and then divide the first by the second
  * MAKEFRACT_D: this macro would cast to FRACT_D (which was typedef'd as float but should have been typedef'd as double); so cast to double instead (where required)
  * FRACTmul_D: would cast both of its arguments to FRACT_D and multiply them
  * FRACTdiv_D: would cast both of its arguments to FRACT_D and divide the first by the second
  * MAKEINT & MAKEINT_D (where #defined the same); this macro would just cast to SDWORD (aka "int" or "signed int")

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3152 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-24 13:57:19 +00:00
Dennis Schridde 09a8e33f61 Rename PACKAGE_MAINTAINER to PACKAGE_DISTRIBUTOR to clarify.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3144 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-23 21:14:02 +00:00
Giel van Schijndel 798d10c6d8 * Guarantee that PATH_MAX is large enough to use as the size for Windows API calls (since with MinGW it is 159 bytes while it should be 160)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3136 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-23 16:44:36 +00:00
Giel van Schijndel 9fe5736f41 * Remove macro FRACTdiv and all places where it was used (all it did was casting both of its parameters to (float) and dividing the first by the second)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3133 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 23:37:30 +00:00
Giel van Schijndel ae90bd9c0c * Remove macro FRACTmul and all places where it was used (all it did was casting both of its parameters to (float) and multiply them)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3132 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 23:29:25 +00:00
Giel van Schijndel aeecc95088 * Remove macro MAKEFRACT and all places where it was used (all it did was casting to (float))
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3131 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 23:13:05 +00:00
Giel van Schijndel 14f2fe750a * Make sure not to use if (incorrect-condition) { ASSERT(FALSE, ...); }; instead use ASSERT(correct-condition, ...);
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3128 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 21:10:51 +00:00
Per Inge Mathisen 08d665fe1c Remove unused palette defines
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3121 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-22 16:55:39 +00:00
Per Inge Mathisen 53aa930d6e Turn IMD min and max dimensions into vectors.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3111 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-21 17:34:23 +00:00
Per Inge Mathisen 35277a4b82 Temporary fix for bug introduced with commit 3065 that made direct weapons unable to hit. Patch #886 by Buginator.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3108 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-19 20:18:37 +00:00
Giel van Schijndel db3d933791 * Add a new cheat/debug-command "showsamples"
* This command will cause the amount of samples in the sound library's queues & lists to be constantly displayed (until turned off) on screen

Patch #887 by Buginator


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3107 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-19 20:17:54 +00:00
Giel van Schijndel 29139cc6da * Fix crashes due to failing to call the callback when sounds are removed from the queue/list
Part of patch #887 by Buginator


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3105 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-18 23:25:32 +00:00
Giel van Schijndel 5c4384623e * Use WZ_DECL_FORMAT for some functions which take printf-like strings
* This enables GCC to check the formatting strings and the types and number of the variable list of arguments passed


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3087 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-17 19:37:40 +00:00
Ari Johnson 31fc86ee9f Moved a space to match formatting
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3085 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-17 17:22:07 +00:00
Freddie Witherden e9ae19df7b Fix warning about redefinition of MIN/MAX on OS X (as arpa/inet.h also contains MIN MAX macros)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3081 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-16 18:32:38 +00:00
Giel van Schijndel f1f1a19be4 * Fix a bug in iV_DrawTextRotatedFv where I used sprintf instead of vsprintf
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3076 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-16 16:02:54 +00:00
Giel van Schijndel 88bf925cb8 * Add functions iV_DrawTextRotatedFv, iV_DrawTextRotatedF, iV_DrawTextFv and iV_DrawTextF to draw text with a printf-like syntax to the screen
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3075 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-16 15:47:55 +00:00
Ari Johnson 0a9bcf08a3 Xcode project can almost build trunk again. This commit allows the project
to download and build the external libraries that Warzone has added since
the last time that trunk would build under Xcode.  The actual game currently
will not build due to other issues, but this is phase 1.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3068 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-15 23:34:51 +00:00
Giel van Schijndel eba3731a93 * Put some duplicated code for destroying sound samples in function sound_DestroyIteratedSample
* If in sound_Update() we encounter an error simply destroy the current sample we're working on


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3066 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-15 20:49:02 +00:00
Gerard Krol 65c56b73e3 Fix an invalid pointer reference in the widget code by making sure that the pointer to the widget currently under the mouse is cleared when the
widget is freed.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3064 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-15 14:33:56 +00:00
Per Inge Mathisen e0c450b415 Remove excess display related code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3062 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-15 12:18:56 +00:00
Per Inge Mathisen 5417afae46 Read tile colour information directly from mapTiles, instead of going through tileScreenInfo
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3057 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-15 11:08:23 +00:00
Per Inge Mathisen 0484f5e383 We no longer need .wlight to separately store water colour.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3054 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-14 16:21:12 +00:00
Giel van Schijndel 8fcd2410be * Apply the last bit of patch #884 by Buginator (openal_track.c)
* Make sure that sound_GetError and sound_GetDeviceError are useable in WZ_NOSOUND builds as well


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3053 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-14 15:11:59 +00:00
Giel van Schijndel d179c09f17 * Fix some errors in openal_track.c; part of patch #884 by Buginator
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3052 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-14 12:13:23 +00:00
Giel van Schijndel 456208fcc3 * Update MSVC project files (part of patch #884 by Buginator)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3051 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-14 12:12:36 +00:00
Giel van Schijndel 22f762a3c3 * Prevent a linker error when compiling with -DWZ_NOUSOUND (sound_RemoveActiveSample was used but not defined)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3050 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-14 11:43:15 +00:00
Giel van Schijndel 992ee8583a * Fix yet another bug introduced in r3047 (the game would hang in an infinite loop because of failing to increase the iterators)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3049 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-13 23:54:28 +00:00
Giel van Schijndel ff44e8c84c * Fix a bug introduced in r3047 (segfault due to failing to check for a NULL pointer)
* Apply patch #879 by Buginator (refactored by me to use less handcrafted code, and more functions instead)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3048 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-13 23:47:46 +00:00
Giel van Schijndel 99c55dbf74 * Try to encapsulate knowledge about AUDIO_SAMPLE's internal representation in openal_track.c (i.e. don't use it in client code!)
* Look at sound_StopSample specifically
 * Use a function to manipulate the linked list of audio samples (i.e. get rid of duplicated code)
 * Allow printing of OpenAL vendor, version, renderer and extensions data on multiple debug "channels" to reduce code duplication
 * Add openal_error.[ch] for error detection (and producing debug messages for them!)
 * Add TOSTRING and AT_MACRO macros to macros.h
 * Get rid of some super-nested if-branches where one of them would return (so we don't actually need an else-branch because the function is left anyway)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3047 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-13 23:16:03 +00:00
Giel van Schijndel 5f1977c7f6 * Remove #undef WZ_NOMP3 and #define VERSION from config-macosx.h as they're both not needed anymore...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3041 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-12 21:19:29 +00:00
Dennis Schridde 20050d2a3e Add some more output do debug dumps: The maintainer who created the package.
PACKAGE_MAINTAINER and PACKAGE_VERSION should probably also make their way into the logfile...


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3040 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-12 18:34:30 +00:00
Giel van Schijndel c51bd8ae10 * Get rid of a large quantity of unused parameters
* Turn some signed integers ("int" or "SDWORD") into unsigned integers where it made more sence (and signed integers caused warnings about comparing signed with unsigned integers)
 * At some places cast to an unsigned integer (where the type of the expression is a signed integer but the result of it logically _always_ is an absolute value)
 * Remove unused struct-type EVENT_INIT
 * Convert use of malloc->memcpy->free to one single realloc call (and now make sure to actually check realloc's return value, which wasn't done with the malloc call)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3037 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-10 23:15:46 +00:00
Per Inge Mathisen 6118371c0e Add methods to read/write byte arrays to tagfile format.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3036 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-10 21:48:27 +00:00
Freddie Witherden 2506b69e1f Add a CLIP macro for culling a value between a min and max value.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3029 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-10 18:36:07 +00:00