Commit Graph

1215 Commits (3b1c952de11c94d88da491b41b6b28977b2d5f76)

Author SHA1 Message Date
Giel van Schijndel 208a399d73 Turn an ASSERTion into a debug(LOG_NET, as is not safe to simply assume that a player ID is correct (and as such we cannot just ASSERT on it)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3667 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 16:58:48 +00:00
Giel van Schijndel 4a77f3d8b0 Use NETsendGAMESTRUCT and NETrecvGAMESTRUCT to send & receive GAMESTRUCTs endian safe
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3665 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 16:39:49 +00:00
Giel van Schijndel 730ef63107 Add functions NETsendGAMESTRUCT and NETrecvGAMESTRUCT to deal with sending & receiving of GAMESTRUCTs in an endian safe way
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3664 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 16:39:46 +00:00
Giel van Schijndel 459254f306 Update netlog.c's packetname list for r3661
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3662 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 14:42:02 +00:00
Giel van Schijndel 0c7ade394d * Remove message type MSG_PLAYER_DATA as it sends/receives void* data chuncks which is __not__ endian safe (not to mention struct padding)
* Don't maintain player stats in lib/netplay/netplay.c; instead maintain them in src/multistat.c
 * Add a new net message type (NET_PLAYER_STATS) to exchange player stats


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3661 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 14:39:31 +00:00
Giel van Schijndel 4354be1e75 Put the "System Net Messages" in an enum rather than #defining them with custom numbers
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3660 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 14:39:12 +00:00
Giel van Schijndel e7abee3ced Don't use the OggVorbis callback hack when compiling on the Mac
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3659 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-03 13:47:48 +00:00
Dennis Schridde b7e36a5b77 Require devpkg to be in ./devpkg/ for msvc.
This saves the trouble of having to edit the paths for lib/include dirs and enables us to have the FlexBison.rules there, too.
Thus FlexBison.rules is removed and to be found in the msvc devpkg from now on.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3657 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-02 18:17:58 +00:00
Giel van Schijndel 32863ae12a Remove unused net message types and function declarations which have no implementation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3651 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-02 15:13:34 +00:00
Giel van Schijndel 92bc594493 Remove networking message NET_VERSION (used by (send|recv)VersionCheck); as the functions that used them didn't actually do anything
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3650 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-02 15:04:08 +00:00
Giel van Schijndel 56c5b3bdab Move MSG_JOIN over to the new netcode API
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3649 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-02 14:45:24 +00:00
Giel van Schijndel cff2a7b279 Move MSG_PLAYER_LEFT over to the new netcode API
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3648 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-02 14:45:20 +00:00
Giel van Schijndel 9ca2e82364 Move sending & receiving of MSG_PLAYER_JOINED and MSG_ACCEPTED to the new netcode API
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3647 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-02 14:45:17 +00:00
Giel van Schijndel 26844585f8 Move sending & receiving of MSG_GAME_FLAGS over to the new netcode API
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3646 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-02 14:45:13 +00:00
Giel van Schijndel b76b958bb7 Move sending & receiving of MSG_PLAYER_DATA over to the new netcode API
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3645 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-02 14:45:08 +00:00
Giel van Schijndel d9c154c970 Rework resize_global_player_data to work with realloc instead of of a combination of malloc and free
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3644 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-02 14:45:04 +00:00
Giel van Schijndel 9926852390 Port NETBroadcastPlayerInfo over to the new netcode API
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3643 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-02 13:04:32 +00:00
Giel van Schijndel aafbc90945 Don't use C99 variable struct members
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3632 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-01 22:12:25 +00:00
Giel van Schijndel 7c204a47ac Change file-specific comment in Doxygen comment
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3631 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-01 21:56:02 +00:00
Giel van Schijndel 6e74be4df9 Use C linkage for frameresource.h and debug.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3629 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-01 21:26:37 +00:00
Giel van Schijndel 07359499ab Don't define our own custom implementation when compiling with g++ either
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3628 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-01 21:01:23 +00:00
Giel van Schijndel 6ddb4af1d5 Clean up header files of sound library:
* Change file-specific comments into Doxygen comments
 * Remove a whole load of unused and unnecessary macros
 * When compiling as C++ make sure to use C linkage


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3627 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-01 20:43:11 +00:00
Giel van Schijndel a323c83e7c * Don't use EOF for end-of-string detection; use '\0' instead
* Patch #959 by Michel Dänzer (in Debian bug 458733), modified by Paul Wise <pabs>
 * Don't cast a variable of type char to char...


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3617 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-01 12:59:42 +00:00
Giel van Schijndel f558eb0d61 Revert unintentional part of r3612
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3613 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-30 23:39:31 +00:00
Giel van Schijndel 4f93b03142 Make function-pointer array pLoadFunction a local (but still static) array instead of global
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3612 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-30 23:38:05 +00:00
Giel van Schijndel ef3d1f5c92 Fix compiling on MSVC; patch #955 by Buginator, slightly modified by me
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3607 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-30 21:44:12 +00:00
Giel van Schijndel 2b59e6840d Add a Doxygen parameter description to sound_PlayStreamWithBuf for fileHandle, volume, onFinished and user_data
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3596 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-29 13:05:38 +00:00
Dennis Schridde 411545852f Cleanup
- theSun becomes static (+setter/getter)
- normalsOnTile() doesn't use global vars anymore
- pie_SurfaceNormal3fv() now works more like the pievector.h functions
- pie_SurfaceNormal3fv() was cleaned up and became inline function in piematrix.h
- Use more pievector.h functions
- Remove unnecessary multiplications/divisions from calcTimeIllum()


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3592 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-28 01:29:20 +00:00
Dennis Schridde 06a3b11a62 Revert r3588. I already did that in r3586.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3591 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-28 00:51:21 +00:00
Dennis Schridde 7f3c67175c Comment FP12
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3590 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-28 00:43:26 +00:00
Giel van Schijndel 7cf72b6fea #include <math.h> and "lib/framework/math-help.h" where required
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3588 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-28 00:29:19 +00:00
Dennis Schridde 751d0809c5 Use new VectorX_Compare instead of old VectorX_compare which I'll remove shortly.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3587 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-28 00:27:21 +00:00
Dennis Schridde 9f9c417240 Include lots of forgotten math.h and roundf() is included in C99.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3586 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-28 00:22:02 +00:00
Dennis Schridde 76fddad000 Generic cleanup. Mostly remove struct keyword where unnecessary.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3585 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-28 00:02:28 +00:00
Giel van Schijndel b3a3cecaed Rename fractions.h to math-help.h and remove most junk from it
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3584 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-28 00:01:37 +00:00
Giel van Schijndel e5885934b7 Utilise sound_PlayStreamWithBuf in cdAudio_OpenTrack to specify a larger buffer count
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3583 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-27 23:34:25 +00:00
Giel van Schijndel 024c8c1c10 Add function sound_PlayStreamWithBuf to allow specifying custom buffer counts and sizes to use for a stream
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3582 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-27 23:32:55 +00:00
Giel van Schijndel 6d99a49ef4 Use the sound_.*Stream functions to implement the cdAudio aka playlist code instead of custom crafted code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3580 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-27 22:31:16 +00:00
Dennis Schridde c399050b62 Enhance Vector class with some more normalisation, comparison, etc.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3579 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-27 22:21:15 +00:00
Giel van Schijndel f880720628 Implement sound_StopStream, sound_PauseStream and sound_ResumeStream for stopping, pausing and resuming of playing streams initially created with sound_PlayStream
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3578 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-27 21:33:10 +00:00
Giel van Schijndel 6de5602631 * Make sound_PlayStream and audio_PlayStream return a AUDIO_STREAM* pointer instead of a bool
This pointer can later on be used to stop, pause & resume playing of the given stream


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3577 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-27 21:28:35 +00:00
Per Inge Mathisen e0b92752db Constify some piematrix functions
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3576 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-27 21:05:30 +00:00
Per Inge Mathisen 895ba1c8cd Make less of piematrix.c globally exported.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3575 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-27 20:57:26 +00:00
Per Inge Mathisen 75c77a4af4 Make drawing code less convoluted and store less state in tileScreenInfo.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3573 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-27 18:47:08 +00:00
Giel van Schijndel 301c7f64f5 Assume G++ has a proper vsnprintf and snprintf implementation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3566 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-27 16:34:39 +00:00
Per Inge Mathisen 15a22f8724 Remove unused netplay macros
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3558 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-27 13:45:03 +00:00
Per Inge Mathisen 3a6bfab317 Fix more problems with tabs in the GUI, patch #949 by Buginator.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3543 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-22 20:11:10 +00:00
Dennis Schridde 2d29dc2191 Replace runtime code_part_names size checking by counting with a STATIC_ASSERT on its size.
Additionaly:
- Introduce ARRAY_SIZE macro
- Use code_part instead of int where applicable


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3539 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-22 16:03:58 +00:00
Dennis Schridde cbccd3336c Revert r3537, as it may not be safe on all compilers...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3538 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-22 15:47:20 +00:00
Dennis Schridde d2370600d8 Replace code_part_names() with code_part2string(), which gets us rid of having to check that the array size matches the enum on runtime.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3537 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-22 15:41:21 +00:00
Dennis Schridde 2ff72516fd idx -> index
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3534 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-21 23:08:17 +00:00
Dennis Schridde 86be7e0389 PRINT_B macro -> bool2string function
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3533 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-21 23:03:04 +00:00
Dennis Schridde 664507be0d Minor beautification of error messages.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3532 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-21 22:44:24 +00:00
Dennis Schridde 463aaf53d1 Make TF_ERROR into a readable function.
- tagGetErrorString is not provided anymore, all output goes directly to LOG_ERROR.
- The trace contains some more information.
- ASSERT()s in the unit test were removed. The output is already done by TF_ERROR where needed.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3531 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-21 22:33:41 +00:00
Dennis Schridde f3296ee96b struct define -> struct _define and define_t
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3530 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-21 22:19:15 +00:00
Per Inge Mathisen fec3b1ca08 Indexed colour usage has been eliminated, so remove its support code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3529 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-21 17:06:31 +00:00
Per Inge Mathisen 921ab82191 Clean up GUI frame drawing and port it to PIELIGHT.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3528 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-21 16:57:00 +00:00
Dennis Schridde 17b7ffa3f9 Remove dbghelp.h. And update version (wine-0.9.53) is now included in the mingw32 devpkg.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3527 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-21 00:23:14 +00:00
Ari Johnson d075817fce Fixed a typo in the #warning for GLC_TRIANGLE
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3525 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-20 23:48:00 +00:00
Per Inge Mathisen b9bcbad34c Port scores code to use PIELIGHT.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3524 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-20 23:01:13 +00:00
Per Inge Mathisen df19674baf Save gateways and zones in tagfile format.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3513 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-20 16:52:51 +00:00
Freddie Witherden 4b072b28f7 Commit patch #942 by Buginator.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3506 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-19 18:23:14 +00:00
Per Inge Mathisen 579e2e428e String code cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3498 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-16 19:07:15 +00:00
Per Inge Mathisen 08c2a06822 GUI cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3497 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-16 18:54:16 +00:00
Dennis Schridde b422209c9a Rename range() to wrap() and warn about unused results.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3484 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-15 18:15:13 +00:00
Dennis Schridde ff34e1fb68 Introduce new functions range() and rangef() to clip a value into a certain range.
Use that to cleanup some code.
Because of the lack of a local "math.h", it went into trig.h.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3483 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-15 18:02:54 +00:00
Dennis Schridde 31a863a90b Setup eol-style CRLF for vcproj files
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3473 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-14 20:49:48 +00:00
Dennis Schridde 1c44cf8568 path #938 by Bugginator: MSVC projectfile updates. You need the static libraries from http://download.gna.org/warzone/development/devpkg/2.1/msvc80/ now.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3472 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-14 19:57:50 +00:00
Dennis Schridde d7bbab46af Set eol-style and mime-type for vcproj files
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3471 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-14 19:55:59 +00:00
Giel van Schijndel d938ed3946 * Check wether we're compiling as C99
* if not #error about requiring a C99-compliant snprintf & vsnprintf implementation

NOTE: This doesn't affect MSVC as I've already provided a C99-compliant implementation for it


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3449 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-13 13:53:00 +00:00
Giel van Schijndel 6c886470ad * Rename the MSVC snprintf and vsnprintf replacements to wz_snprintf and wz_vsnprintf respectively to prevent conflicting definitions
* #define snprintf and vsnprintf to wz_snprintf and wz_vsnprintf respectively
Thanks to Buginator for pointing out the issue in patch #937; the solution is different than his though


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3447 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-13 11:14:15 +00:00
Per Inge Mathisen e5e64113ea Simplify clparse.c by removing unused and/or unusable commands.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3444 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-12 18:12:22 +00:00
Per Inge Mathisen 49cc91b0ef Move all skybox page handling to display3d.c to prepare for skybox scriptability.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3438 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-12 15:10:02 +00:00
Per Inge Mathisen 5b1ec5cfc1 Add new debug mechanic: objTrace(). It works like debug(), but also takes an object parameter.
Debugging info given with it will only be displayed for the enabled game object. Default key
to enable debugging info for a game object is CTRL+L. Converted LOG_MOVEMENT to use it.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3432 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-11 22:45:04 +00:00
Per Inge Mathisen f246839359 patch #928 ported map send/rev to new netAPI by Buginator with style fixes by me
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3431 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-11 21:39:41 +00:00
Per Inge Mathisen 2cd496d9c7 Remove unused defines, prettify animation code a bit, and use same electronic
warfare effect code for all objects - the one which does not modify individual vertices.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3429 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-10 22:18:20 +00:00
Giel van Schijndel 73d329fde8 * Fix a magic number (28) supposedly representing enum value NET_LEAVING (which is 18)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3423 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-09 23:07:36 +00:00
Per Inge Mathisen f7fbf845c0 Small cleanup to animation code, and fix copy&paste typo in 3ds2pie.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3412 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-08 21:58:05 +00:00
Per Inge Mathisen 5657b38ef0 Hopefully fix bug that would lock fps setting to defaults.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3403 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-07 20:48:29 +00:00
Giel van Schijndel 53abc0a73b * Correctly fix "clever" use of malloc __without__ introducing a memory leak in the process (r3305 introduced one)
* Make sure we use the same signdness in IMAGEDEF as we did before r3302
 * Use a correct format specifier ("%u") for printing an unsigned integer
 * Turn a bunch of UDWORDs which don't necessarily need to be UDWORD into unsigned ints as one of those __does__ need to be an unsigned int (i does, for the printf format specifier)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3398 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-06 21:21:31 +00:00
Per Inge Mathisen 441f4038e4 Replace a ton of custom texture clipping code with a single call to OpenGL scissor test.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3380 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-06 14:05:13 +00:00
Per Inge Mathisen bfb542e69e Remove unused animation defines
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3377 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-06 12:12:26 +00:00
Giel van Schijndel a2fe74852b * Fix some errors in the Doxygen documentation
* Parameter descriptions for non-existing parameters removed
  * Wrong parameter names renamed/fixed
  * Syntax errors in passing the a parameter to a Doxygen command at the wrong location
  * Prevent HTML interpretation of some comments

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3373 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-05 23:42:54 +00:00
Dennis Schridde b03ab065f9 Fix breakage from r3367: Soundfilenames were forgotten to be changed inside the sourcecode.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3370 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-05 22:09:56 +00:00
Per Inge Mathisen ae19f5bd54 Move PHYSFS_APPEND and PHYSFS_PREPEND macros to lib/framework/
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3354 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-05 14:50:16 +00:00
Per Inge Mathisen eddebc7f81 Move some initialization code from src/ into lib/framework
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3353 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-05 13:50:34 +00:00
Ari Johnson 55ecef381b Fixed error message
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3350 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-05 00:22:23 +00:00
Ari Johnson e424aed624 Added /* */ around a comment to permit Warzone to compile again
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3349 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-05 00:06:40 +00:00
Giel van Schijndel d249ac2188 * By default perform truncation detection in strlcat and strlcpy (i.e. return the length that would be the resulting length if no truncation occurred)
* Add a Doxygen comment for strlcpy & strlcat

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3348 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-04 23:16:29 +00:00
Giel van Schijndel 65961cbb45 * Use a variable to store the tagfile unittest definition files' names in (rather than copy-pasting those in the tagOpenRead & tagOpenWrite calls)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3347 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-04 20:01:54 +00:00
Giel van Schijndel 34d26a6719 * Don't do "if (ptr != NULL) { ... } if (ptr == NULL) { ... }" instead use an if-else construction: "if (ptr != NULL) { ... } else { ... }"
* Use slcatprintf instead of snprintf into a local buffer (on the stack) followed by concatenating to our target string

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3345 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-04 19:11:16 +00:00
Giel van Schijndel 87a55581f0 * Move the tag definition files over to data/tagdefinitions and move the savegame definitions into data/tagdefinitions/savegame
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3343 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-04 16:10:51 +00:00
Giel van Schijndel e722d7ec39 Add some more comments
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3340 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-04 15:12:01 +00:00
Giel van Schijndel f3499cc232 Replace asserts on invalid tags with CHECK_TAG_INVALID
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3339 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-04 14:59:19 +00:00
Freddie Witherden 9a312a7991 Commit the second part of patch #913 which removes (the defunct) AUDIOMSG system.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3335 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-04 13:38:19 +00:00
Giel van Schijndel 1d83be8064 * s/tagWriteSeparator/tagWriteNext/g for consistency's sake (to match the tagReadNext function, which is the reading equivalent)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3334 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-04 13:37:42 +00:00
Freddie Witherden daad83d316 Make NETend(); return TRUE when we are finished decoding.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3331 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-04 10:32:59 +00:00
Giel van Schijndel 48f32faccf * Add function resGetNamefromData which complements resGetNamefromData and allows you to retrieve the resource ID (usually filename) for a resource (IMD, IMG, TEXPAGE, WAV, etc.)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3324 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-03 00:35:57 +00:00
Giel van Schijndel b60b1b121c * Use const-correct functions for the tagWrite.* stuff
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3322 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-03 00:30:17 +00:00
Giel van Schijndel 785eb69c8b * Add a forward declaration for tagReads32v into tagfile.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3321 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-03 00:29:10 +00:00
Per Inge Mathisen 2ca1351c13 Add another field to the IMG csv files that describe what it does.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3314 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-02 19:15:45 +00:00
Per Inge Mathisen dc7a84da62 Log droid death and packet source. Beware: This will make net games incompatible
between before and after this commit.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3311 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-02 17:08:29 +00:00
Per Inge Mathisen bb660a0a02 Fix "clever" use of malloc that made MSVC (correctly) complain about assumed size of void.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3305 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-01 22:13:27 +00:00
Per Inge Mathisen 168a66b89c Add another backdrop by cathuria.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3303 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-01 21:40:04 +00:00
Per Inge Mathisen 52cca82fb2 Change the binary IMG files into CSV text files.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3302 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-01 21:33:47 +00:00
Dennis Schridde 3f6b52bef1 src/game.c: Minor beautification.
configure.ac: YY_NO_INPUT prevents Flex from defining input(), which we do not need, since we use our own YY_INPUT instead. Maybe we should use Flex's function instead?
lib/script/script_parser.y: scriptStoreVarTypes() was defined but never used.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3300 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-01 15:18:25 +00:00
Giel van Schijndel 30d837ec90 * Allow compilation on MSVC again
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3285 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-31 21:55:02 +00:00
Per Inge Mathisen eecbccbfb4 Encapsulate time adjustment of value increments in the code and try to
document the time code better.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3282 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-31 18:37:20 +00:00
Per Inge Mathisen 37260b7c2e tagfile: Allow the specification of an undefined length string in a definition file by
making the defined length zero.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3281 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-31 17:38:04 +00:00
Giel van Schijndel 3d245df0f9 * Provide an implementation of sound_PlayStream
* Modify audio_PlayStream's prototype to match sound_PlayStream's implementation & prototype
 * In cdspan_PlayInGameAudio use sasprintf instead of a statically sized array and snprintf
 * Add some Doxygen comments

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3276 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-31 15:16:59 +00:00
Giel van Schijndel 06649908ff * abort() when out of memory
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3275 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-31 15:02:29 +00:00
Per Inge Mathisen a4972d3d38 Reduce verbosity of LOG_3D
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3273 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-31 14:04:21 +00:00
Giel van Schijndel de264ad804 * Remove yet some other useless sounds: ID_SOUND_HELP, ID_SOUND_BARB_SCREAM2, ID_SOUND_BARB_SCREAM3
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3270 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-31 12:02:18 +00:00
Giel van Schijndel f2118ec871 * Remove cheat "no faults"
* Remove sound scream4.ogg (ID_SOUND_NOFAULTS) which it triggered (that's the onlything that cheat did: playing that audiofile)
  * All that audiofile contained was a spoken message: "There are no faults, in the renderer, at the moment."


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3266 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-31 00:28:31 +00:00
Dennis Schridde 9d82dae196 Reduce doubleclick interval from 500 to 250.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3261 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-30 23:42:44 +00:00
Per Inge Mathisen b4ef4d4349 Add new function attribute WZ_DECL_WARN_UNUSED_RETURN and use it on IdToDroid,
whose return must be checked, and fix one bug already detected by it.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3260 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-30 21:44:14 +00:00
Per Inge Mathisen 72281bab96 Document and clean up game timer code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3246 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-30 18:06:40 +00:00
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
Giel van Schijndel 51c32760b4 * Fix a bug where would free the wrong pointer (thanks to Buginator for spotting it)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3026 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 23:35:56 +00:00
Giel van Schijndel cc12f08b1a * Apply patch #879 by Buginator with some heavy modifications by me
* Upon removing BASE_OBJECTs loop through the lists of outstanding AUDIO_SAMPLEs to delete all of those that refer to this BASE_OBJECT


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3023 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 22:36:06 +00:00
Per Inge Mathisen 6c4c61fbb7 PIELIGHT fix for map hightlight. Remove use of colours to communicate a boolean value.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3022 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 21:50:47 +00:00
Per Inge Mathisen da7b96315c Final PIELIGHT changes to the widget code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3021 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 21:40:26 +00:00
Dennis Schridde c64b565f14 Patch #872 by Buginator. Untested by me since in Bugs we trust. ;)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3020 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 19:10:34 +00:00
Per Inge Mathisen 53f11c391f Add a new vector field to the PIELIGHT union, and send colours to OpenGL
as arrays rather than as individual bytes.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3019 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 17:41:00 +00:00
Per Inge Mathisen 4ee90ba9e3 Adapt radar view to PIELIGHT scheme. The radar colours have been changed a lot, and
we probably need to massage these colours a bit before release. Radar tile colours 
in all but objects only mode are a complicated blend of tile height and colour. Closes
patch #858.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3018 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 17:23:34 +00:00
Per Inge Mathisen 4ddd4c28af Large PIELIGHT cleanup. Please report bad colours.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3017 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 16:09:23 +00:00
Per Inge Mathisen 63211571b0 New utility function pal_Colour() creates PIELIGHT from RGB values.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3011 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 13:11:09 +00:00
Per Inge Mathisen 76840b01d2 Large PIELIGHT cleanup. Also cleans up tile drawing logic somewhat.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3006 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 00:33:03 +00:00
Dennis Schridde fde3e48eb1 Remove rules which could not ever be matched. The behaviour shouldn't change. If some Lex guru finds a mistake, please tell me. :)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3001 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-08 00:32:51 +00:00
Giel van Schijndel ec392ef7d4 * Improve the quality of the QuesoGLC error messages produced when fonts cannot be loaded/selected
* When we're unable to select a font face give a warning (LOG_WARNING) instead of an error (LOG_ERROR)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2992 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-07 19:31:19 +00:00
Freddie Witherden 299d7bfcfb Commit patch #871
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2983 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-05 21:56:12 +00:00
Per Inge Mathisen 8d48c5fdd1 Partial conversion from 0.0->1.0 texture coordinate range. For now only terrain
textures are converted. Once they are done, the texture matrix hack is restored.
Thanks to devurandom and cybersphinx for help and previous efforts in this area.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2980 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-05 18:54:17 +00:00
Per Inge Mathisen 4519230af1 Split out CLIP_VERTEX from TERRAIN_VERTEX, since the former usages are not really
related to terrain, and do not need all terrain fields and future changes.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2979 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-04 20:25:25 +00:00
Per Inge Mathisen cd91da0caa Add right and left scroll bars to build menu tabs. By Buginator in patch #870 with
some cosmetic fixes by me.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2974 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-03 20:47:05 +00:00
Per Inge Mathisen f86858109a Fix texture size warning. It will correctly nag about missing support for 2048x2048 textures.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2973 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-03 20:29:34 +00:00
Per Inge Mathisen 6da463546f More PIELIGHT fixes
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2961 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-02 16:38:21 +00:00
Giel van Schijndel 9a0eecb753 * Revert accidental commit of exceptionhandler in r2952
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2953 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-02 00:03:52 +00:00
Giel van Schijndel 55526401be * Copy over the cross compile scripts from the 2.0 branch to trunk (with necessary modifications)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2952 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-02 00:02:45 +00:00
Giel van Schijndel ae79833367 * In vasprintf when we have to produce a zero-length string:
* Assign the resulting pointer to the char** strp pointer
  * Return zero (instead of the pointer)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2948 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-01 23:44:29 +00:00
Per Inge Mathisen 4bbf490aca Change the rendering of the normal terrain to use vertex arrays. We still
recalculate everything each turn. See patch #865.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2939 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-01 17:07:03 +00:00
Per Inge Mathisen afa23e157a Beauty fixes
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2937 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-01 16:55:23 +00:00
Dennis Schridde d75b63cdb3 Cleanup water-moving:
- Remove now unnecessary offset parameter from pie_DrawTerrainTriangle
- Move GL code from display3d.c to piematrix.c


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2935 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-01 16:43:28 +00:00
Per Inge Mathisen 3dfc90107e Simplify handling and drawing of areas outside the map.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2934 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-01 16:35:49 +00:00
Freddie Witherden b73b28f191 Revert dodgy removal of trig functions. More testing required
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2904 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-29 23:10:54 +00:00
Freddie Witherden dbcb55414d Remove the pre-computed trig tables system
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2903 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-29 22:50:25 +00:00
Giel van Schijndel 263f92f24f * Always clear the colour buffer in pie_ScreenFlip; this should prevent "screen smearing"; hinted by Buginator
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2901 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-28 21:53:59 +00:00
Per Inge Mathisen 134e31b558 More PIELIGHT fixes. Retire iV_BoxFill. Fix "mission achieved" dialog colours.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2895 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-26 22:59:21 +00:00
Per Inge Mathisen 4dd2dfc63d More PIELIGHT conversions. Fix colour issue in load/save dialog.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2894 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-26 22:10:31 +00:00
Per Inge Mathisen 13d1607349 Introduce new palette system WZCOL_* for setting the essential game palette.
Change over pie_BoxFill() to PIELIGHT. Fix colour bug when building structures.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2893 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-26 21:48:36 +00:00
Giel van Schijndel 6c8702a915 * Replace a lot of array indexing code of this form *(array + index) with this form array[index]
* This should be a syntactical change only!
  * I.e. even the generated assembly should be the same, but behaviour should __definitly__ be the same!


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2892 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-26 21:04:42 +00:00
Giel van Schijndel da2f84009b * In addition to the changes of r2853, make passing a NULL pointer safe as well
* In the error messages being output, distinguish between a NULL pointer and an empty string

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2890 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-26 15:57:56 +00:00