Commit Graph

864 Commits (af40ffa1cb62da85f4aa33daec7329a1354f2d61)

Author SHA1 Message Date
Per Inge Mathisen af40ffa1cb Convert fog code to PIELIGHT
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2888 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-25 23:06:24 +00:00
Per Inge Mathisen fcf0fc8d21 More colour cleanup.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2886 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-25 22:38:22 +00:00
Per Inge Mathisen 1fd3e84133 Remove unused ALPHA_MODE
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2885 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-25 22:02:35 +00:00
Per Inge Mathisen 0265339de6 Remove unused TEX_CAP and TEX_MODE.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2884 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-25 21:55:40 +00:00
Per Inge Mathisen 7713623a64 Remove unused bilinear mode.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2883 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-25 21:47:57 +00:00
Giel van Schijndel 6172bdd498 * Refactor space trailing code in textdraw.c such that it is easier to read (also has some comments now which might help...)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2882 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-25 21:43:16 +00:00
Per Inge Mathisen 4e25b2d0fe Make more use of PIELIGHT.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2880 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-25 21:15:08 +00:00
Freddie Witherden 05fdb3af34 Updated the network primitives functions
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2870 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-25 12:12:03 +00:00
Per Inge Mathisen 0d7d6dee26 Extend tagfile saves to cover droid movement information. Improve tagfile error reporting somewhat.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2868 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-24 22:23:40 +00:00
Per Inge Mathisen bacb7975b1 Add new tagfile method to read and write 32bit signed arrays. Fix error that
would interpret floating point arrays as 16bit.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2867 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-24 21:05:19 +00:00
Per Inge Mathisen b5fa689b41 Include SDL_opengl.h instead of GL/gl.h for better portability. This is vital
for Mac compilation.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2864 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-24 16:41:00 +00:00
Dennis Schridde 9cc0a628c1 Do parts of the proposed changes in "[Warzone-dev] build issues in FreeBSD system" by Yaroslav Kolomiyets from 24.10.2006:
- SDL header includes don't use SDL/ anymore (raw Makefiles and MSVC Project adapted).


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2863 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-24 11:49:51 +00:00
Per Inge Mathisen 36c3cb1b6c Remove unused PIEVERTLIGHT. Retire iColour type in favour of PIELIGHT. Fix circular headers.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2861 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-23 21:51:48 +00:00
Per Inge Mathisen 8475171be0 Remove iV colour defines
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2860 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-22 21:29:28 +00:00
Per Inge Mathisen dadf2ffc00 Vastly improve edit box cursor. Fix improves on patch in bug #10270 by Buginator.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2857 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-22 20:13:50 +00:00
Per Inge Mathisen 8ad6ff9dc1 Remove double click for keyboard and mouse wheel. Patch by buginator in patch #851.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2854 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-22 18:51:54 +00:00
Per Inge Mathisen eeefdc0af0 Do not crash if filename to sound is not set. Modified version of patch #855 by Buginator.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2853 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-22 18:35:03 +00:00
Per Inge Mathisen a980ac2ffe Clean up gamelib, removing nearly empty maxpidef.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2850 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-21 23:06:31 +00:00
Giel van Schijndel 6083c030bf * revert (unnecessary r2843)
* make sure to #define _GNU_SOURCE when compiling on Unix systems with Code::Blocks


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2845 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-20 21:36:36 +00:00
Giel van Schijndel 027b9218a9 * Fix a potential compile error when using asprintf on non-Windows systems
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2843 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-20 21:18:33 +00:00
Per Inge Mathisen 904bfe5f3d Make some stuff static
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2842 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-20 20:41:13 +00:00
Per Inge Mathisen 345d335790 Reduce max radar zoom to 1, because a value of 2 is buggy. Replace
hard-coded radar size values with a slightly better define.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2841 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-19 21:32:35 +00:00
Per Inge Mathisen d8c8ee9ee1 Remove unused _iVPRIM_DIVTABLE table.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2838 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-19 20:09:01 +00:00
Per Inge Mathisen 647ae8810c Improve comments and documentation of tagfile code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2835 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-19 19:16:21 +00:00
Giel van Schijndel 1f2d5cbddf * Add a new debugging level LOG_SAVEGAME or "savegame"
* Add a large quantity of debug() calls to game.c
 * Correct some spelling errors in comments

Part of patch #853 by Buginator


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2826 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-15 18:32:07 +00:00
Per Inge Mathisen fb9d667895 Clean up screen.c - make globals static and remove unused vars.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2822 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-14 22:29:19 +00:00
Per Inge Mathisen f577a8f269 Remove unused screenGetSurface
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2821 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-14 21:05:45 +00:00
Per Inge Mathisen 50e99ae933 Remove unused pietexture.c|h files and references.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2820 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-14 19:51:04 +00:00
Giel van Schijndel 73307a762e * Lets use valid syntax shall we... (introduced in r2817)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2818 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-13 19:23:04 +00:00
Giel van Schijndel 714d117c71 * Add a concatenating variant of snprintf and vsnprintf, slcatprintf and vslcatprintf respectively
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2817 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-13 19:14:27 +00:00
Per Inge Mathisen 66cee9b2d5 Add more sanity checking and error description to tagfile format at the
cost of even less sanity for whichever poor soul who reads this code.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2816 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-13 18:47:48 +00:00
Giel van Schijndel b285cdea7d * Use vsnprintf instead of snprintf!
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2809 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-12 19:03:30 +00:00
Giel van Schijndel 1bd1483944 * Use snprintf (in vasprintf) to determine the size of the string we're about to construct
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2807 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-11 22:09:20 +00:00
Giel van Schijndel be25c4901b * Modify sasprintf to take this signature instead: "void sasprintf(char**, const char* fmt, ...)" (take in mind though that it is a macro!)
* Add some comments to sasprintf
 * Utilize sasprintf and asprintf in src/version.c to drastically cut back in code size and duplication


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2806 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-11 22:01:05 +00:00
Freddie Witherden 1b9b69048c Add a stack allocating version of sprintf
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2805 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-11 21:29:56 +00:00
Giel van Schijndel 6486b5270b * Add implementations of vasprintf and asprintf for Windows (GNU extensions to the C library that malloc the memory they need)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2804 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-11 21:12:13 +00:00
Giel van Schijndel 7711572f0a * Add a new module (printf_ext.c) to contain some printf extensions (C99 printf variants for MSVC)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2803 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-11 20:58:10 +00:00
Giel van Schijndel a08e6f07f8 * Provide alloca() on GCC, MinGW and MSVC (and all other WZ_OS_UNIX compilers that provide <alloca.h>
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2801 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-11 20:04:50 +00:00
Giel van Schijndel aef7af381e * Make function NETsetupTCPIP const correct
* Don't #include <unistd.h> in source:trunk/src/clparse.c as we don't need it
 * Rename a debug message to use the correct function name as prefix (bitimage.c)
 * Utilize snprintf instead of sprintf, at two locations


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2796 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-11 17:08:41 +00:00
Per Inge Mathisen ff13be0b96 Do not disable lighting if it was never enabled in the first place, to avoid
doing unnecessary OpenGL state changes. Also make sure we turn off normalization.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2778 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 13:56:14 +00:00
Dennis Schridde 1dd2b54431 wzglobal.h never belonged to Eidos. Instead large parts of the code are copied from Qt and thus belong to Trolltech.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2776 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 13:25:02 +00:00
Dennis Schridde 5ccaa17971 Correct WZ_CC_TINYC check. (Note the namechange!)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2775 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 12:10:54 +00:00
Dennis Schridde 3a56a479b3 - Extend compiler detection with TinyCC
- Add window system detection
- Remove MSDOS from supported OSes


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2771 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 00:31:43 +00:00
Dennis Schridde 223bc803e8 Use OLD_TEXTURE_SIZE_FIX instead of 256.0f to scale texcoords, to make clear that this is a fix for the old ...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2759 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-09 17:43:50 +00:00
Dennis Schridde cc7840e866 change_int64_t_to_intptr_t.patch from patch #837 by <cybersphinx> Christian Ohm.
(Make WZ compile with the Tiny-C-Compiler by using the correct type for storing pointers as ints)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2757 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-08 23:11:59 +00:00
Giel van Schijndel 96d5054729 * Make sure to #include <stdio.h> when compiling on MSVC so that those inline replacements for snprintf and vsnprintf will actually compile....
* Lets terminate statements with a semi-colon!!


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2745 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-06 18:36:37 +00:00
Giel van Schijndel 7b2530306c * On MSVC make sure to #define inline __before__ using it!!
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2744 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-06 18:30:19 +00:00
Giel van Schijndel 92e013e406 * Add static inline functions vsnprintf and snprintf when compiling with MSVC
* These functions comply to the C99 specification and return the amount of characters they would have written if no truncation occurred
Slightly modified form of patch file #3146 attached to bug #10269 by Buginator; applied the changes of this patch to wzglobal.h instead of version.c


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2742 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-06 14:07:50 +00:00
Giel van Schijndel 93c387f1fb * Change "failed to open file" error message, when attempting to load a playlist, from LOG_ERROR to LOG_NEVER as it isn't a real error condition
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2717 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-04 18:45:57 +00:00
Giel van Schijndel 6268b6fff2 * Don't allocate memory in PlayList_Init() while we don't need it yet
* Make sure to set '''global''' pointers to NULL when free()ing them
 * Also set the "size" variables belonging to these pointers to zero
* Use a swap(a, b) style function for variable swapping (in PlayList_Shuffle()) rather than obfuscating code
* Make sure that PlayList_CurrentSong() and PlayList_NextSong() return "const char*" rather than "char*" to make sure no one touches memory he/she shouldn't
* Some general changes to conform with coding style (most notably: braces on a line of their own)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2712 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-04 16:14:24 +00:00