Commit Graph

406 Commits (5ce7fee1f192b789c07df59d4bb8fa9b1db1d546)

Author SHA1 Message Date
Per Inge Mathisen 94421b5b56 Clean up LOG_3D
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2634 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-27 13:58:01 +00:00
Giel van Schijndel e06c186bd6 * Replace a _lot_ of strcpy(), strcat() and sprintf() calls with the safer strncpy(), strncat() and snprintf() respectively
* Refactor NETlogEntry() to use the array of strings (packetname[]) instead of a large switch-statement with a lot of copy & pasted code


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2617 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-24 21:11:29 +00:00
Dennis Schridde c7b00fadaf More work on the ICC front:
- Less strict warnings in debug-mode (still unusable, because ICC warns about _a lot_)
- Explicit conversions
- Clarify parameter evaluation order


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2550 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-15 18:09:18 +00:00
Giel van Schijndel 9d9370e13c * Make anti-aliassing of text optional (for slower systems); it's turned on by default though (option "textantialiassing")
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2529 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-04 21:29:16 +00:00
Giel van Schijndel d075832459 * Add font rendering and UTF-8 support through usage of QuesoGLC (an OpenGLC implementation);
* This _will_ require you to install http://quesoglc.sourceforge.net/ on your system to be able to compile (windows binaries are provided on the sourceforge download page as well; just dump them in wz's devpackage directory for now)
 * Currently the font render code is hard-coded to select two fonts: DejaVu Sans Mono regular style (aka "Book") or bold style; if you're package manager doesn't provide these fonts (Debian and derivatives have "ttf-dejavu"), you can get them from http://dejavu.sourceforge.net/

This closes #1 (https://trac.mortis.eu/warzone/ticket/1 I dumped/maintained my patch there)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2521 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-01 19:45:49 +00:00
Giel van Schijndel 97192c00cb * Fix wrong indentation style used in r2480
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2481 4a71c877-e1ca-e34f-864e-861f7616d084
2007-09-25 20:57:06 +00:00
Giel van Schijndel a8bfacf6ed * Rename iV_DrawText to iV_DrawTextRotated and create a static inline function iV_DrawText which calls iV_DrawTextRotated with rotation=0.f
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2480 4a71c877-e1ca-e34f-864e-861f7616d084
2007-09-25 20:40:56 +00:00
Dennis Schridde fbd3a9c394 Use Unix PATH_MAX as default and thus move all "fixes" to Windows.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2425 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-21 12:59:05 +00:00
Roman C 65866c3012 Increase number of allowed texture pages from 64 to 128 for now.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2375 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-13 10:48:32 +00:00
Giel van Schijndel 609d953a63 * Remove forward declarations for undefined functions iV_CreateFont, pie_StartTextExtents and pie_FillTextExtents
* Remove unused functions pie_SetFormattedTextFlags and pie_GetFormattedTextFlags
 * Move constants PIE_TEXT_WHITE_COLOUR, PIE_TEXT_LIGHTBLUE_COLOUR and PIE_TEXT_DARKBLUE_COLOUR from header file to implementation file
 * Remove global var FFlags which only ever had one value (FTEXT_SKIP_TRAILING_SPACES)
 * Remove global var ExtentsMode which only ever had one value (EXTENTS_USEMAXWIDTH) and remove all if-statements which never matched (remove the conditional part from the parts that always matched)
 * Remove #ifdef _TESTBED code since _TESTBED is never defined (not in commented out code either)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2346 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-06 11:22:31 +00:00
Giel van Schijndel 33354163a9 * rename pie_DrawText and pie_DrawFromattedText to iV_DrawText and iV_DrawFormattedText respectively for consistency's sake (iV_DrawText already existed as a #define "alias")
* replace all usages of iV_DrawText270(...) with iV_DrawTextRotated(..., 270.f) and get rid of MACRO iV_DrawText270


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2333 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-03 13:14:34 +00:00
Giel van Schijndel 4966b22bf5 * remove functions pie_DrawImage270, pie_DrawText270 and pie_TextRender270; which where a whole chain of functions that where just duplicates of the same functions without 270 in their name
* add function iV_DrawTextRotated which uses glTranslatef and glRotatef to change (i.e. rotate) the result of iV_DrawText which it also calls; the translation matrix is later reset using glLoadIdentity() (no pushing&popping of the matrix)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2330 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-03 11:57:16 +00:00
Giel van Schijndel 9814c2eec7 * remove unused flag FTEXTF_SKIP_LEADING_SPACES and all code related to it
* remove "BOOL AddLeadingSpaces" and all code relying on it to be true, since it never would be true
 * turn a while-loop into a for-loop (reduces duplicated code slightly, and increases its readability)
 * merge two nested if's: if (a) { if (b); } => if (a && b)
NOTE: there should be no behavioural changes

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2314 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-01 20:17:23 +00:00
Giel van Schijndel 473e038691 * remove "left justify append" ability from text drawing code (since it isn't justified; erm used)
* put curly braces on a line of their own
 * general clean up (e.g. moving some variables in a more local scope, giving some more sensible names, etc.)
NOTE: there should be _no_ behavioural changes

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2309 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-01 16:57:41 +00:00
Giel van Schijndel 4e3293784a * remove (unused) pie_DrawText callback functionality (the callback had the responsibility of actually drawing the text)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2308 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-01 16:10:50 +00:00
Per Inge Mathisen 0226604dbc Fix wrong texture pages selected for various models. Closes bug #9629.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2307 4a71c877-e1ca-e34f-864e-861f7616d084
2007-08-01 15:06:23 +00:00
Giel van Schijndel fd74d682e5 * remove forward declaration of undefined and unused function iV_GetTextExtents
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2299 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-31 19:39:49 +00:00
Per Inge Mathisen ce56538fba Revert commit r2258 which made texture coordinates into floating point. It
caused bug #9631, wrong team colours displayed.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2292 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-30 20:20:06 +00:00
Giel van Schijndel 9b31055f08 * make pie_DrawFormattedText const correct ("char*" -> "const char*")
* Don't use a hundred and two different methods of determining the end of nul terminated string
 * Use pointers into the string rather than integers as "iterators"

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2291 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-30 17:03:02 +00:00
Giel van Schijndel 3cbe1ed25a * Clean out iV_GetCharWidth to make it more readable (it also returns an unsigned int rather than a signed one now)
* Define iV_GetTextWidth in terms of iV_GetCharWidth now (rather than copy&paste implementations)
 * iV_GetTextWidth now also returns an unsigned int

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2287 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-30 16:42:37 +00:00
Per Inge Mathisen 9c6c62ff7f Make PNG loader a little less picky about the PNG format being exactly correct.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2273 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-29 17:42:22 +00:00
Dennis Schridde 723f9bfaa1 Use float texture coordinates in the range 0.0-1.0.
Any fixes, if necessary, should be applied on loading.
In the image code (IMAGEDEF) this did not work, so OLD_TEXTURE_SIZE_FIX is applied during rendering.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2258 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-29 13:32:21 +00:00
Dennis Schridde 27f505a3f5 Some renamings and cleanups to simplify the upcoming float uv patch.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2247 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-28 13:50:16 +00:00
Per Inge Mathisen 57f9c5f17f Sorry, forgot some non-users of texture type in the last commit...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2227 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-27 17:38:50 +00:00
Per Inge Mathisen 31fd7b3a8f Remove unused texture 'type'
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2226 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-27 17:35:08 +00:00
Per Inge Mathisen c9fbb60e50 Remove unused code and resource parameter
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2225 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-27 17:30:44 +00:00
Per Inge Mathisen 8937d19e43 Free texture data from normal memory immediately after uploading to VRAM.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2223 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-27 16:57:41 +00:00
Dennis Schridde 6b8e636fc3 Revisit data loading (image/texture related) and remove unecessary fVertex pietype.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2195 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-25 22:37:48 +00:00
Dennis Schridde 75d5e135c5 Remove some useless comments for iIMDShape, also remove some unnecessary fields and variables.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2193 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-25 20:58:57 +00:00
Dennis Schridde 9dafbd404f More vector math, by EvilGuru. Minor changes by me (brackets around the ()^2 and swap RHS,LHS in the comment, so Kate's highlighting doesn't go nuts (yes, I know this is stupid...))
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2126 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-17 15:02:57 +00:00
Dennis Schridde 807f41a852 - Further improve moveGetDirection.
- Extend the Vector library.
- Cleanup (more Vectors).


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2104 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-14 20:13:24 +00:00
Dennis Schridde 7c51ddbadc - pie_MAX_POINTS became pie_MAX_VERTICES and was increased to 768 from 512. (Grim's request.)
- pie_MAX_POLYS became pie_MAX_POLYGONS.
- pie_MAX_POLY_VERTS became pie_MAX_VERTICES_PER_POLYGON and was decreased to 6 from 10. This _should_ work everywhere, I didn't see glitches. Grim recommended to even reduce it to 4, but the terrain renderer didn't like that. (When you pitched down the camera too much, the left screen side of the terrain disappeared.)
- iV_IMD_MAX_POINTS, iV_IMD_MAX_POLYS now are defined to the pie_ variants.
- scrPoints was moved into the scope of the only using function, pie_Draw3DShape2.
- aByteScale was never used, so it got removed.
- Some counters were changed from signed to unsigned.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2054 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-11 21:09:40 +00:00
Giel van Schijndel ed62f3da96 * Use 'unsigned int' instead of a fixed-with type to store the width, height and depth of an image
* Change an assert(FALSE) into a more descriptively styled: !"text string"

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2030 4a71c877-e1ca-e34f-864e-861f7616d084
2007-07-06 13:47:39 +00:00
Giel van Schijndel d55bd507c6 * Remove unused parameter char* DisplayBuffer from function pie_UploadDisplayBuffer (maybe we might as well remove this function altogether ?)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1986 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-27 12:30:29 +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 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 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 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
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 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 fde0d68082 - (__STDC_VERSION__ >= 199901L) -> defined(_ISOC99_SOURCE)
- Tune lighting and enable by default (This doesn't seem to affect the terrain)
- Declaration updates (Trolltech says that attributes need to go after the "static inline", the GCC manual is a bit unspecific about this)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1744 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 14:09:10 +00:00
Giel van Schijndel 721a32314f * Use PHYSFS_close on every point of exit in iV_LoadImageFile
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1740 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-29 10:05:16 +00:00
Per Inge Mathisen d7a003cac1 Fix signedness warning
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1728 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-28 12:03:36 +00:00
Giel van Schijndel fb8094aae2 * Use uint8_t instead of char since we depend on the precise size of this structure
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1727 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-27 23:48:20 +00:00
Giel van Schijndel f9783ff29f * Remove unused member Version from IMAGEHEADER
* Use PHYSFS_close after we've read from the image file

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1724 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-27 19:28:54 +00:00
Giel van Schijndel 575a78836a remove unused member PalID from IMAGEDEF
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1723 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-27 18:51:52 +00:00
Giel van Schijndel b5154ae4a3 * Remove redundant and unused string from IMG-header (PalFile)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1722 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-27 18:24:37 +00:00
Giel van Schijndel 9e520c844b Cleanup:
* Simply return the value we need (instead of using a pointer)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1721 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-27 16:41:21 +00:00
Giel van Schijndel cdea281ca6 * now load resources of type "IMG" directly from their file rather than an intermediate memory buffer
* make definitions of IMAGEHEADER and IMAGEDEF safe for loading on systems with different sizes for datatypes
 * Allocate IMAGEDEF in a function of its own: iV_AllocImageFile (uses only one malloc call so we don't need to go and toy with lots free() calls on failure)
 * Use PHYSFS_read* functions for endian correctness (rather than the endian_*word stuff)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1719 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-27 15:50:56 +00:00
Dennis Schridde 8efecd07b2 const and indent
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1709 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-26 19:14:23 +00:00
Dennis Schridde 3c2afc391e Move the calculation of the relative light position for shadows out of the ShadowDrawLoop, into Draw3DShape, so we don't need to calculate it twice for the front- and the backface.
Patch inspired by Watermelon.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1707 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-26 18:25:15 +00:00
Dennis Schridde 2313b8d53e The Vector3 functions where not really const, since they operated on pointers.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1706 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-26 17:00:55 +00:00
Dennis Schridde f29d7647f6 It's probably safer with these types... (Because of the previous commits)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1704 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-25 18:03:48 +00:00
Dennis Schridde 9d4a007121 More inlining and const
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1703 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-25 17:58:23 +00:00
Dennis Schridde 52486bee8b const const const
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1702 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-25 17:21:13 +00:00
Giel van Schijndel 12078733b8 * Fix usage of `new` which is both a) a keyword in C++, and b) an undescriptive variable name
* Make sure function overloading by a C++ compiler doesn't cause linker errors by declaring affected functions extern "C"

Patch by Christian Ohm (in message <20070523201048.GF3778@localdomain>);
 * applied changes to lib/ivis_common/imdload.c
 * brought linker errors to light caused by function overloading

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1695 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-23 20:57:11 +00:00
Dennis Schridde 057f140b6c Make MSVC happy
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1682 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-21 20:12:39 +00:00
Dennis Schridde 1014259054 This should enable floating point precision in IMD (.pie) files.
It should even render them as floats. I wasn't able to see a difference after modifying some PIE files, though.
This patch is heavily inspired by Watermelon's work. (Namely piefloat.patch)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1681 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-21 19:56:07 +00:00
Dennis Schridde 49f8259226 More cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1679 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-21 18:57:11 +00:00
Dennis Schridde 504126bda9 Forgotten cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1678 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-21 18:33:07 +00:00
Dennis Schridde b8f038d37a Cleanup IMD loader.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1677 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-21 18:25:46 +00:00
Dennis Schridde 01fea434fb Turn some sqrt() into sqrtf() where double precision is not needed.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1667 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-20 14:47:32 +00:00
Per Inge Mathisen b620f3f25f Remove all mention of non-existent type iVector
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1664 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-20 14:18:14 +00:00
Dennis Schridde 009b61447c - Remove unused code
- Remove duplicated code/macros
- VECTOR3D->Vector3i
- Create float variants of normal functions to simplify Watermelon's float-PIE patch


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1661 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-20 11:05:28 +00:00
Per Inge Mathisen b7e9c15c93 Some residual cleanup, including fixing an erronous static
assignment in the sound code.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1595 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-06 20:20:45 +00:00
Dennis Schridde 351060f21f - 1st attempt to create an API for image loading (support for PNG features like non 8bit channels still needs to be thought of). Appropriate code location is also missing (added new functions to tex.c, since they were not PNG related)
- Renamed pie_PNGLoadFile, because I got confused about pie_ vs. iV_ when working on my terrain stuff, and did not fix it when backporting to trunk
- iTexture (now aka iV_Image, s.a.) is given a depth field to enable support for different number of channels. This is required to support RGB only textures (without adding a useless alpha channel) and eg. for greyscale images like heightmaps
- Simplyfied iV_loadImage_PNG (formerly known as pie_PNGLoadFile, s.a.) and also removed lots of seemingly unnecessary conversions
- Converted page-8 from paletted to RGB for simplification. This multiplied the size by about 3x (still < 100kB)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1580 4a71c877-e1ca-e34f-864e-861f7616d084
2007-05-01 20:34:54 +00:00
Giel van Schijndel d6758391d8 * Fix nameclash of <png.h> with lib/ivis_common/png.h
* renamed lib/ivis_common/png.[ch] to lib/ivis_common/png_util.[ch]

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1562 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-30 14:09:33 +00:00
Ari Johnson c62421a6ad Updated Xcode project to reflect pcx.c -> png.c change
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1561 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-30 02:10:22 +00:00
Giel van Schijndel 82eee99004 * Move PNG dumping code from screen.c to png.c
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1560 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-29 23:00:38 +00:00
Giel van Schijndel aff4430378 * Move PNG specific code to png.[ch] (PNG saving code still needs moving though)
NOTE: this _WILL_ require updating the MSVC project file

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1559 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-29 22:19:21 +00:00
Dennis Schridde e5e418c480 - Sample prototype for a PNG saving function
- Vector2f type which will be needed for texture coordinates
- Output adjustment for pie_AddTexPage


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1550 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-29 00:58:39 +00:00
Dennis Schridde e9cfca5bb2 - WORLD_COORD() and MAP_COORD() macros to make world->tile and tile->world conversions (>>TILE_SHIFT,<<TILE_SHIFT,*TILE_UNITS,/TILE_UNITS) better readable
- Remove unecessary copying and code duplication from drawTerrainTiles
- Remove more BSP and unused code
- pie_Pagename -> pie_MakeTexPageName
- pie_AddBMPToTexPages -> pie_AddTexPage
- Whitespace and formating
- Fix hardcoded SKY_TEXPAGE id, which depends on the loading order in the wrf file. Changed to string (filename).
- iTexPage.textPage3dfx -> iTexPage.id
- Prevent unecessary texpage switching in pie_DrawTexTriangle


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1548 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-28 20:21:16 +00:00
Dennis Schridde 24c2c3296d - Remove unused function drawTexturedTile
- Increase drawed terrain size to 64 tiles
- (re)move some variables


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1547 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-28 13:53:41 +00:00
Per Inge Mathisen 4b36d353f2 Remove the unused iV_IMD_PSXTEX and iV_IMD_XTEX flags. The TYPE directive in
IMD files is now totally ignored.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1546 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-28 11:12:14 +00:00
Per Inge Mathisen b994a384c6 Simplify IMD loader code by removing support for IMD version 1 and the
unused NOTEXTURE directive. I believe the NOTEXTURE effect can be achieved
simply by not specifying a texture instead in more recent IMD versions.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1545 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-28 10:49:45 +00:00
Per Inge Mathisen 1b5cbb1c1e Remove flags from IMDShape since they were unused. Clean up IMD loader some
more. Remove unused GetLastHashName() and SetLastHashName().


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1544 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-28 10:36:21 +00:00
Per Inge Mathisen 69e282f30b Cleanup related to old BSP code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1537 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-24 20:15:41 +00:00
Giel van Schijndel 4548e56fe2 * Fix some signed vs unsigned comparisons
* Turn some implicit conversions of void* to something* into an explicit cast
 * remove some redundant commented out code
 * refactor some error checking code ( was: if (!error) normal exec path; else deal with error; now is: if (error) deal with error; normal exec path )

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1534 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-23 22:08:53 +00:00
Per Inge Mathisen 534472ce72 Remove used but ineffectual BSP IMD code. BSP data from PIE files not yet removed.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1533 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-23 20:40:41 +00:00
Per Inge Mathisen dad0851e7e Remove unused PIETOOL code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1532 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-23 20:29:43 +00:00
Per Inge Mathisen ea932d1033 Remove more unused flags
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1531 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-23 18:45:24 +00:00
Per Inge Mathisen 3f97cc51b7 Remove many unused IMD flags and an unused debug function.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1530 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-23 18:11:01 +00:00
Per Inge Mathisen 9e1d57e718 Permit compilation without binary space partitioning. To test this, comment out
the #define BSPIMD line in lib/ivis_common/ivisdef.h header.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1529 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-23 17:59:13 +00:00
Dennis Schridde 3eeaacbb0b Fix PNG code for MSVC (which doesn't support C99 variable sized arrays). Patch by v2k5.
Update AUTHORS


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1525 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-23 14:14:40 +00:00
Dennis Schridde 6d55622b75 Several changes to texture loading:
- Be safer with stringlengths
- Create "page-123" texpages in pie_Pagename(). This code is needed since WZ might have loaded a different variant of a texpage (-urban,-arizona,...) and thus can only find it by the common "page-123" part
- Output filename on errors in in PNG loading
- Be a little bit less forgiving for wrong case
- Convert all TEXTURE references in PIE files to lowercase and replace 'fx`s' with 'fx', also replace 'urban area' and 'bases urban' with just 'urban' to keep consistency


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1505 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-19 18:04:41 +00:00
Giel van Schijndel aa9a519794 * Remove support for decoding (and encoding in case of screenshot dump code) of JPEG pictures
* Remove some dead (commented out) & dirty code from multiint.c which used JPEG code (image_load_from_jpg)
 * Remove dead (commented out) code from screen.c which used JPEG code (function static GLuint image_create_texture)
 * Remove unused backdrop types from pieblitfunc.[ch]
 * Convert last JPEG files into PNG, add a "comment" property on those: "All of these are converted from JPEG files, so this is JPEG quality."

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1490 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-17 18:24:31 +00:00
Giel van Schijndel fd3324a9fe * pcx.c: use size_t for memory buffer length (size_t is the appropiate type for this, unsigned int is not)
* change macro BUFFER_SIZE to static const JPEG_bufferSize (compiler will optimize this away)
 * char* -> unsigned char*

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1486 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-17 12:58:22 +00:00
Giel van Schijndel c3683f64dd * make PNGheader be explicitly unsigned (required for compilers that define 'char' as being signed)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1485 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-17 12:23:54 +00:00
Giel van Schijndel f49c5cbdd5 * change pie_PNGLoadMem to pie_PNGLoadFile which (as the name suggests) now loads textures directly from PNG files (rather than memory buffers)
* change pie_ReloadTexPage to use files instead of memory buffers as well
 * change data.c's resource handler mappings to now load some more fileformats directly from file (all that directly or indirectly used to depend upon pie_PNGLoadMem)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1483 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-16 22:29:44 +00:00
Giel van Schijndel 7356aa1b9a * make pie_PNGLoadMem play nice and take the buffer size as an argument rather than assuming it to be 10000000 (10 million)
* do the same with pie_ReloadTexPage which calls pie_PNGLoadMem
 * char* -> const char* in tex.c
 * fix a syntax error from r1481

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1482 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-16 20:07:56 +00:00
Giel van Schijndel 300f691b0b * Fix error from last commit where the wrong pointer was used
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1478 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-16 17:49:15 +00:00
Giel van Schijndel 09b08c1582 * remove senseless use of malloc (we now statically allocate on the stack)
* remove goto, placed the "goto"-code in an inline function instead
 * make pie_PNGLoadMem const correct (i.e. take a buffer we don't write to as const char*)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1477 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-16 17:34:11 +00:00
Dennis Schridde ce16856887 FREE->free, MALLOC->malloc (sed+review)
This patch will create crashes where the code expects FREE to set the pointer to NULL! (Those problems should be fixed anyway.)
The only occassion where I saw this is when quiting a game, so it is not too much of an issue.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1459 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-15 10:43:05 +00:00
Dennis Schridde e8da218797 Of course we need to leave room for ".png\0"...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1439 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-11 14:58:50 +00:00
Dennis Schridde 3cdae4332f - Fix a possible invalid write caused by writing up to 80 chars into a 64 char array.
The texture file in PIE files can now be up to MAX_PATH chars long.
- Find the reason for WZ discarding everything after the number in "page-123" styled texture references.
	This led to the problem with Grim's mod referencing the skybox texture instead of his own wall texture.
- Beautify some code


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1438 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-11 14:55:54 +00:00
Stefan Huehner 9eda7db8a1 Code-Cleanup: remove a lot of type,function,variable
declarations/definitions which are not used anywhere.



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1421 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 17:01:53 +00:00
Giel van Schijndel 365c37812d * Remove PIEPIXEL and change all of its instances to Vector3f (definition is exactly the same where types are concerned, only member vars were named different)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1412 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-10 10:47:20 +00:00
Dennis Schridde 8952155c7a - Add -Wextra to debug=yes, as it doesn't generate so many new warnings
- Add -Wno-nonnull to debug=strict to make it compile (Remove it from AM_CFLAGS)
- Remove -Wno-unused-label as this warning is not generated anymore
- Fix a "... from incompatible pointer type" warning which led to a lot of strings (and associated functions) in the widget area becoming const
- Maybe found the reason for images in UTF-8 strings


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1405 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-09 14:41:22 +00:00
Gerard Krol 7d6382905d Fix some problems introduced in r1286: 1. flickering water edges 2. transparent water was not correctly drawn
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1363 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-05 14:32:13 +00:00
Giel van Schijndel 26f2672bfd * remove macro PTRVALID
* replace all instances of PTRVALID(ptr,size) by (ptr != NULL)
 * remove asserts of style ASSERT( x == NULL || x != NULL ) because they would evaluate to true always anyhow and as such wouldn't ever trigger
 * remove macros iV_HeapAlloc and iV_HeapFree and replaced them with MALLOC and FREE respectively (that's what they expanded to anyway)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1348 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-03 13:20:41 +00:00
Dennis Schridde 3b09a756df - Remove unneeded gettext files and instead create them via autopoint
- Remove unneeded checks from autogen.sh (all of them are also checked in configure.ac)
- Move AM_CPPFLAGS=-$(top_srcdir), which was included in nearly every Makefile, to configure.ac
- Remove -g from CFLAGS for usual builds. This should be set by the buildscripts instead
- Remove CFLAGS_OVERRIDE, which was rendered obsolete by the above change


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1332 4a71c877-e1ca-e34f-864e-861f7616d084
2007-04-02 17:21:05 +00:00
Gerard Krol 290fb5ebe2 A speed up for people who are fillrate limited: 1. The stencil buffer is no longer cleared each frame when shadows are disabled. 2. The color buffer
is no longer cleared each frame, but care is taken do draw on the entire screen so that no smearing takes place. This patch gives me about +30 fps. 
(from 45 to 75)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1302 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-30 17:38:35 +00:00
Giel van Schijndel 902400c774 Warning fixes:
* NULL assignment to a non-pointer -> changed to assignment of 0
 * remove unused variables
 * remove empty function drawEffects (and a commented out line that called it)
 * Fix implicit declaration (of war_GetFog and war_SetFog) by including warzoneconfig.h

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1287 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-27 17:53:48 +00:00
Gerard Krol a4c540f24a New shadow code, easier on the fillrate of your graphics card, but uses
more cpu time. Buildings have static shadows, the shadows of 
components/droids get recomputed every frame. Rain/bullets/other effects 
do no longer drop a shadow.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1281 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-24 22:53:18 +00:00
Gerard Krol 9e3acc087c The distance fog (aka Mist) start and end is now dependent on the zoom level. This should greatly reduce the number of popping tiles that can be
seen.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1275 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-20 20:46:26 +00:00
Stefan Huehner 57674e3545 Minor cleanup.
Remove some unsused vars,function,prototypes



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1253 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-16 20:08:23 +00:00
Per Inge Mathisen e3e1267e7d Fix bug #8730, where we would crash because the game did not find
a texture to replace during game play. The problem is that the 
texture counter is reset several times during a campaign, so we
cannot trust it. This should be fixed more thoroughly later, for 
now we just check all textures irrespective of the texture counter.
Also improves logging, and fixes a problem that should have made
texture replacements simply not work previously. Thanks to
Gernot Kohlhaas <mr_maniac> for reporting the bug.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1246 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-16 17:33:20 +00:00
Dennis Schridde 2a74242eb3 - Replaced various vectors with Vector3i and Vector3f (idea by Watermelon)
- Vector3i from lib/ivis also used in lib/audio, maybe want to move it to some more generic place?
- Replace iPoint with Vector2i
- Remove additional integer type declarations from pietypes.h
- Rename all iSprite to iTexture
- Various warning fixes: Unsigned/signed comparisons, uninitialized variables, declared but not defined symbols
- Replace DEBUG_BLOCK with DEBUG_MALLOC (it was virtually the same)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1245 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-16 16:20:16 +00:00
Dennis Schridde b7ccc234b3 - Remove unused type from pietypes.h
- Replace iBool with BOOL where it was used
- Fix a warning in src/effects.c about validatePie being declared but not defined


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1241 4a71c877-e1ca-e34f-864e-861f7616d084
2007-03-15 22:49:54 +00:00
Per Inge Mathisen ea50a9249c Replace hard-coded map preview size of 512 with
BACKDROP_HACK_WIDTH and BACKDROP_HACK_HEIGHT for now.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1182 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-25 12:57:04 +00:00
Per Inge Mathisen b8deb3acdc Remove the unset, unused default backdrop.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1181 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-25 12:45:35 +00:00
Per Inge Mathisen 8927a832ac Remove more dead code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1180 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-25 12:34:18 +00:00
Per Inge Mathisen 2a14556b60 Add skybox. Patch by Gerard Krol. The maximum allowed camera tilt towards
the sky has been increased to allow easier view of the new skyline.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1179 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-24 22:53:33 +00:00
Per Inge Mathisen e7a58327cc Remove the "additive" option and related code, which did nothing.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1174 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-24 20:26:54 +00:00
Per Inge Mathisen d5b70b2384 Add new debug log category 'fog', and remove more unused code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1170 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-24 16:07:44 +00:00
Per Inge Mathisen 7e2ba186d8 Clean up pie_DrawPoly, renaming it pie_DrawTexTriangle.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1161 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-22 12:07:44 +00:00
Per Inge Mathisen bbc588699d Turn __attribute__((unused)) into WZ_DECL_UNUSED, which is unset
for compilers other than gcc. Thanks to devurandom for bringing 
this problem to my attention. Also update documentation for
WZ_DECL_DEPRECATED, which had bitrotted. 


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1149 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-19 17:46:06 +00:00
Per Inge Mathisen 9a0d08f699 Clean up IMD loading, informed by -Wextra, removing lots of redundant and
unused code. Also add -Wno-unused-label to Makefile.raw builds, too, to
skip the warning generated by flex that we cannot fix.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1148 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-19 17:37:11 +00:00
Per Inge Mathisen 78396463a7 Fixes informed by -Wextra for graphics code. Removes much redundant code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1147 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-19 17:18:50 +00:00
Per Inge Mathisen 79b3875fc4 This commit fixes all warnings (on my system). -Werror added for
debug builds. Hopefully this will not cause too much pain, but
rather increase code quality for the future.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1144 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-19 14:10:44 +00:00
Per Inge Mathisen 3a1d1a6069 Clean up pieclip.c, based on patch by Gerard Krol.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1136 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-17 23:03:48 +00:00
Per Inge Mathisen 85dbcef6af Cleanup of textdraw.c, removing pie_DrawTextToSurface(), which was
redundant, as Gerard Krol reported.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1135 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-17 22:39:33 +00:00
Per Inge Mathisen d68164d3af Smaller texture cleanup. Fix bug in debug log call parameters.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1133 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-17 21:33:10 +00:00
Per Inge Mathisen 9f16833e30 Small cleanup of texture loading and handling, removing unused
portions of the code.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1132 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-16 23:19:33 +00:00
Per Inge Mathisen f5b266c722 Remove excess conversion to lowercase of imd filenames and function
to do so.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1130 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-16 22:49:56 +00:00
Per Inge Mathisen 1f88208c8c Fix Makefile.raw too
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1129 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-16 22:33:46 +00:00
Per Inge Mathisen b46d680987 Remove lib/ivis_common/bug.c|.h, containing unused logging
functions of dubious usefulness. The log calls are still
present, with protos in ivi.h, in case someone wants to
build something better with them.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1128 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-16 22:31:52 +00:00
Dennis Schridde 8a70df4064 Use some more advanced Automake techniques like noinst_HEADERS. Changes partly autogenerated by KDevelop, so this should be compatible with Automake 1.6.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1118 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-16 14:36:03 +00:00
Giel van Schijndel 35de2b63f1 * get rid of lib/ivis_common/geo.h (only had one line, which effectively made it a symlink to another include file)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1110 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-14 20:13:31 +00:00
Roman C f4c4c48dd2 Patch by Gerard Krol:
replaces AND/OR macros with &&/||

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1089 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-10 16:39:39 +00:00
Dennis Schridde 977b2ee558 - Hack in PNG backdrop loader
- Add 2 new backdrops from Terminator (http://wz2100.net/forum/index.php?topic=109.0)
- Remove unused pal parameter from pie_PNGLoadMem()


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1075 4a71c877-e1ca-e34f-864e-861f7616d084
2007-02-07 15:27:17 +00:00
Giel van Schijndel 7250eff5b6 * Remove yet another set of unused (or empty) functions
* Remove an unused, local, function-variable
 * Remove some file-global, static variables

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1051 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-29 23:17:46 +00:00
Giel van Schijndel 4def8b89ba Fix some compiler warnings:
* remove some unused functions

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1049 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-29 22:17:40 +00:00
Ari Johnson 26158abb0c Endianized colors for vastly better big-endian version
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1047 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-29 05:42:26 +00:00
Per Inge Mathisen 3d6771a521 Unify the several different definitions of pi in the codebase. Now we use the
C macro M_PI (if available, or we will define it on our own in fractions.h).


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1033 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-24 19:42:20 +00:00
Dennis Schridde 49ceba7503 Add GPL notices to all sourcecode files.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@1014 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-15 20:09:25 +00:00
Giel van Schijndel 68d435097e enabled some more code to compile with a C++ compiler without -fpermissive (i.e. there should be *less* compile-time errors now)
* moved several #defines to the enums where they belong
 * changed some datatypes on declaration
 * prepended casts to malloc calls (using typeof() style)
 * changed some (void*) casts to (void**) where required
 * removed several #defines and there instances and then replaced them with their corresponding values from an enum

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@969 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-07 23:50:30 +00:00
Giel van Schijndel 851b570bc5 * functions memRecReport & memMemoryReport:
- removed these functions and all calls to it if REALLY_DEBUG_MALLOC isn't defined, because they don't do anything currently when REALLY_DEBUG_MALLOC isn't defined
  - moved the declaration of memRecReport from memint.h to mem.h where it is, together with memMemoryReport, optionally declared depending on REALLY_DEBUG_MALLOC
 * fixed yet another set of signed/unsigned errors (src/seqdisp.c & textdraw.c/h)
 * removed a cast from char* to char* (that's what I call unnecessary; transforming something into something it already is)
 * memory system:
  - added some comments to clarify what certain pieces of code actually do
  - removed some redundant code (e.g. why would you ever want to overwrite memory to zero just before passing it to free()?)
  - made debug-version of free() return immediately when being passed a NULL pointer (i.e. after raising an assert)
  - moved some variable declarations down to the first point of usage
  - *IMPORTANT*: commented the definition of MEMORY_SET out (line 38 mem.c), this might break code that expects freshly malloc'ed memory to be pre-initialized, if you experience any problems due to commenting this out please say so on the mailinglists!

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@957 4a71c877-e1ca-e34f-864e-861f7616d084
2007-01-04 18:41:24 +00:00
Per Inge Mathisen 3f88e8e4f2 Remove some more dead graphics code, and fix some warnings.
Happy new year everyone!


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@946 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-31 18:19:19 +00:00
Dennis Schridde 4e28453441 src/* and lib/ivis_common/piemode.h by me: Cleanup unused functions.
Rest: Patch by Giel van Schijndel: codecleaning patch: lets delete stuff


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@939 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-29 19:56:06 +00:00
Dennis Schridde 4b3fa4a865 src/projectile.c : Change an if() chain to switch
lib/ivis_common/pietypes.h : Add a depth field to bitmap so different bitdepths can be supported
Some minor cleanups (remainders from a failed abitrary-tiles attempt).



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@902 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-17 18:18:06 +00:00
Dennis Schridde 8c0393f7ca Some minor cleanups, removed unused/unneeded functions, stoped debug spamming
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@896 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-08 19:14:32 +00:00
Dennis Schridde 4f837c0c70 Patches by Christian Ohm:
034 - Reorganized src-warcam.c
036 - Cleanup includes and function declarations


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@884 4a71c877-e1ca-e34f-864e-861f7616d084
2006-12-02 12:50:28 +00:00
Dennis Schridde f25a9aa3ac Not yet changed parts from patches of Christian Ohm:
003 - Remove all references to hWnd
004 - Remove DirectDraw flag
005 - Remove DDrawDriverName and D3DDriverName
006 - Remove all references to hInstance
007 - Remove some unused Windows types
008 - Remove VidMem parameter
009 - Remove bitdepth variables


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@862 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-26 11:39:54 +00:00
Dennis Schridde 141a421d04 Patches by Christian Ohm:
002 - PSX removal part 2
019 - Remove PSX conditionals
020 - Remove IsPSX variable
021 - Remove unused parameter PSXSeqNumber from seq_AddSeqToList and seq_AddTextForVideo


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@861 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-26 11:20:44 +00:00
Stefan Huehner da14eaf2ad Add some more const to char* function parameters,
which aren't modified inside the called function.



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@853 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-23 13:28:38 +00:00
Dennis Schridde 7d3ad56fd5 Compilation fixes, macro removal, PHYSFS_fileLength by Gerard Krol.
Some more initialization in interp.c by me.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@824 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-06 21:58:13 +00:00
Dennis Schridde fb74a1f8dc Patch by Thomas Rast: Include string.h against warnings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@821 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-06 14:40:07 +00:00
Dennis Schridde 67056c8d24 - Droped a lot of (nearly) unused types from lib/framework/types.h
- Remove lots of unused functions (Windows/DDraw related)
- Now store the used bitdepth in the config and thus make it configurable without having to modify the sourcecode


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@808 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-04 01:11:26 +00:00
Dennis Schridde d3cd44148d Patch by Gerard Krol: Replace STRING with char (STRING was confusingly defined to char)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@804 4a71c877-e1ca-e34f-864e-861f7616d084
2006-11-03 21:35:50 +00:00
Dennis Schridde 5a4a9288b0 Patch by Christian Ohm: Gamma controls
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@786 4a71c877-e1ca-e34f-864e-861f7616d084
2006-10-09 19:22:24 +00:00
Dennis Schridde 4ea12897a5 - Replaced all filenames (I could find) with their lowercase and platform independed notation. There might be some uppercase filenames left in the sourcecode.
- Because savegame filenames are converted to lowercase old savegames won't work anymore. You can simply fix that by renaming them to lowercase.
- All unix_path, unix_fopen and PHYSFSEXT_locateCorectCase functions and calls to them have been removed. (So you _will_ notice when a file is not found, at least on Unix systems.)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@776 4a71c877-e1ca-e34f-864e-861f7616d084
2006-10-07 14:13:47 +00:00
Dennis Schridde 9d1d34d2a9 Convert PIE types to SDL types.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@754 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-23 21:25:56 +00:00
Stefan Huehner b3e3d17b82 Include frameresource.h directly in its users. Fixup after
the big cleanup in 748:749.




git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@750 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-23 18:38:12 +00:00
Dennis Schridde 3261a09baf BIG cleanup of headers.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@749 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-23 17:24:55 +00:00
Dennis Schridde a135ae55be Forgotten in last commit
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@748 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-23 15:38:24 +00:00
Dennis Schridde 912cf2c8e2 Partially revert r739.
SDL < 1.2.10 doesn't define the string function wrappers.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@747 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-23 14:56:18 +00:00
Dennis Schridde d39f787caf - Enforce floats in several places
- Define WORD and BYTE types to SDL types
- Let SDL handle some more of the win32fixes


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@739 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-20 19:46:33 +00:00
Stefan Huehner 1395a7c69c Make some more functions static which aren't used outside their
declaring source files and which have no prototype.



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@731 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-19 18:45:48 +00:00
Dennis Schridde d889ce9da7 Patch by Christian Ohm: "g++ fixes"
Mainly explicit casts, some type changes, a few fixes.

We need to have a look if this line creates any problems:
lib/script/interp.c @@ -329,7 +329,7 @@
- if(!RetStackRemember(CurEvent, (ip + 2)))       //Remember where to jump back later
+ if(!RetStackRemember(CurEvent, *(ip + 2)))      //Remember where to jump back later


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@719 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-17 20:39:25 +00:00
Dennis Schridde b9087ef4ca Patch by Stefan Huehner: "code cleanup: void 4"
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@706 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-13 21:11:11 +00:00
Dennis Schridde 728b9a9913 - Commit patches "code cleanup: void" and "code cleanup: const" by Stefan Huehner
- Replace every occurence of VOID with void (and LPVOID with void*)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@703 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-13 09:09:05 +00:00
Per Inge Mathisen 5396324fb6 Remove lots of unused graphics code. (Did the Pumpkin guys EVER delete code?)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@686 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-03 21:33:29 +00:00
Dennis Schridde be5f08343a Remove Palette code formerly used for the software renderer. (Patch by Christian Ohm)
This seems to also fix the rader flickering without shadows. (Or was this fixed in a previous commit?)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@681 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-03 13:35:50 +00:00
Dennis Schridde e9c9e47bda Code cleanup: Remove another do-nothing wrapper function.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@676 4a71c877-e1ca-e34f-864e-861f7616d084
2006-09-02 22:45:06 +00:00
Per Inge Mathisen d483c052b2 Add basic map editing functions. When in cheat mode, you can use 'w' and 'a' to
raise and lower tile height, and use 'k' to flip tiles. You must trash your
keymap again before you can use this.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@667 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-30 21:12:44 +00:00
Per Inge Mathisen 0aea40e84b Remove some dead code, and silence some warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@663 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-30 15:06:49 +00:00
Dennis Schridde e52dba36cc Corrected false error messages, old printfs
netplay.c got a bunch of new LOG_NET debug()s whose effects on performance have not been tested


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@619 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-23 15:27:20 +00:00
Dennis Schridde 0e288f45e7 - Replace all ASSERT(( )) with ASSERT( )
- Simplify definition of ASSERT(). Now is the same for GCC and MSVC.
  This may not work on versions older than MSVC 2005. If you experience this, please report it!

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@613 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-23 12:58:48 +00:00
Dennis Schridde f4d639b8e4 Cleanup redefinitions of inline and strcasecmp on MSVC
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@611 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-22 23:32:18 +00:00
Dennis Schridde 62ae49b0ce Replaced all occurences of DBMB, DBPRINTF and DBERROR with their former define.
( DBPRINTF(("Message")); becomes debug( LOG_NEVER, "Message" ); )



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@608 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-22 14:28:49 +00:00
Per Inge Mathisen 6d8b190950 Make SBYTE explicitly a signed char, not just a char. This would have broken
some things on platforms where 'just char' means unsigned char. Fix lots of
new signedness warnings resulting from that fix (which would have cropped
up on unsigned char platforms anyway). Also implement a small subset of
stdint.h for windows platform in frame.h, hope this does not create any
conflicts. This allows us to use types like uint64_t where relevant.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@569 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-15 18:20:36 +00:00
Per Inge Mathisen 2149739999 Almost all strings and buffers are now of type char. This fixes
more than half the warnings on gcc4, and makes sure we do not
get signedness problems between platforms where char is defined
with different signedness. Also set line-ending properites for
some bison/flex files that did not have it set.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@563 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-12 16:52:37 +00:00
Per Inge Mathisen 65175a10ca Add support for MacOSX and big endian platforms. Patch by
iamtheari@gmail.com with changes by me.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@558 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-12 10:45:49 +00:00
Per Inge Mathisen ecb223924a Remove DirectX types
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@553 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-10 16:05:52 +00:00
Per Inge Mathisen a3df2ad6c8 Another force fix. Remove more references to DirectX.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@552 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-10 13:53:26 +00:00
Per Inge Mathisen 081ec89b32 Remove legacy graphics code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@550 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-08 20:03:05 +00:00
Per Inge Mathisen 17bc3e60b6 Some cleanup of graphics code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@549 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-08 18:48:06 +00:00
Per Inge Mathisen 9cb27d8729 Remove option to limit textures to 2mb of memory, which was unused.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@529 4a71c877-e1ca-e34f-864e-861f7616d084
2006-08-05 13:31:28 +00:00
Dennis Schridde 61fc63cf13 Remove unused file fbf.[ch] (Included file management functions.)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@508 4a71c877-e1ca-e34f-864e-861f7616d084
2006-07-30 15:56:11 +00:00
Per Inge Mathisen f52bebc31f Remove some dead playstation code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@504 4a71c877-e1ca-e34f-864e-861f7616d084
2006-07-24 17:52:24 +00:00
Per Inge Mathisen 3630fba539 Remove last remains of pie_hardware()
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@500 4a71c877-e1ca-e34f-864e-861f7616d084
2006-07-23 11:24:54 +00:00
Per Inge Mathisen 549c97d926 Remove even more pie_hardware() related stuff
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@499 4a71c877-e1ca-e34f-864e-861f7616d084
2006-07-23 11:09:10 +00:00
Per Inge Mathisen 711ca1ff01 Remove a great deal of software renderer related code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@497 4a71c877-e1ca-e34f-864e-861f7616d084
2006-07-23 10:35:30 +00:00
Dennis Schridde 3116f462fc New Makefile.raw system, works with MinGW/Windows environment and Linux also.
Uses a config.mk.tmpl file to set system dependend stuff, no bash required.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@490 4a71c877-e1ca-e34f-864e-861f7616d084
2006-07-21 21:48:55 +00:00
Dennis Schridde 07dcf43518 Fix deprecated function declaration
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@489 4a71c877-e1ca-e34f-864e-861f7616d084
2006-07-21 21:46:23 +00:00
Dennis Schridde 1b1a695684 - Fixed a HEAP error (Invalid Address specified to RtlFreeHeap) on Windows (MSVC compile) (src/data.c)
- Pointed out other locations where that error could occur (src/data.c, lib/ivis_common/pcx.c)
- Deprecated pie_ReloadTexPage, as it doesn't appear to be used (lib/ivis_opengl/tex.c)
- Made iSprite width and heigth unsigned (lib/ivis_common/pietypes.h)
- Added debugging for MSVC which doesn't understand the DB* redefines (lib/ivis_common/bitimage.c)
- Fixed deprecation for MSVC (lib/framework/macros.h

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@452 4a71c877-e1ca-e34f-864e-861f7616d084
2006-07-03 19:43:12 +00:00
Dennis Schridde ee8d18ef48 - Big memleak fixed
- DB* replaced by debug calls
- Added MSVCRT debugging flags for finding memleaks
- Added points to the TODO

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@450 4a71c877-e1ca-e34f-864e-861f7616d084
2006-07-01 19:11:05 +00:00
Dennis Schridde 194026f379 Rewritten mod loading
This patch includes:
- Strongly modified way of adding mods, maps and addons
- Make nearly everything use PhysFS (just netlog and debug stay)
- Convert several DBERRORs etc. to debug()

The new modloader works like this:
For every mod supplied on the commandline ("-mod") (maximum of MAX_MODS=100) keep it in mind (char * global_mods[]).
After initializing PhysFS do scanDataDirs(), which tries to register all possible paths, global_mods[] and maps with PhysFS. Dont check wether we succeed, only at the very end check if we got a "gamedesc.lev".

When we buildMapList(), mark "gamedesc.lev" as MOD_CAMPAIGN, "addon.lev" and every user supplied map as MOD_MULTIPLAY.

When we loadMods() modify the searchPath according to the supplied mods.
Note: T1 maps like Sk-Rush come from gamedesc.lev, are marked MOD_CAMPAIGN and thus wont load any multiplay_mods[], even if the user starts a multplayer game. Instead those maps are threated as campaignmode and will only load campaign_mods[].

This patch requires the "mp" patches to be either in ProgramDir/mp, in ProgramDir/data/mp or in ProgramDir/mp.wz
This is because one cannot add warzone.wz/mp to the search path if warzone.wz is an archive.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@436 4a71c877-e1ca-e34f-864e-861f7616d084
2006-06-16 19:10:23 +00:00
Dennis Schridde 9b0a31e9b2 Made Warzone compile using MSVC!
- Fixed several files for being C89 compatible, so MSVC compiles them. (No variable declarations after function calls allowed.)
- Added function definitions (lib/framework/win32fixes.h) for functions with different names under Win32/Linux. (Aiming at moving all platform specific defines into such headers. Everywhere included frame.h should make this easy.)
- Please take a look at lib/gamelib/audp_parser.y. I had to convert the lowercase token "text" to uppercase "TEXT", so it doesn't collide with msxml.h (mysteriously included by some windows headers).

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@433 4a71c877-e1ca-e34f-864e-861f7616d084
2006-06-03 23:46:03 +00:00
Dennis Schridde 5175535d9d Full pathname includes
Same as in r431, but now for lib/
- converted the sources in lib/ to use full path includes instead of just the filename.
- marked places where lib/ivis_*implementation* (eg opengl) is needed, because of incomplete lib/ivis_common.

Should improve the understanding of interfaces and code organization.

(Also fixed a double slash (//) include in src/multimenu.c)



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@432 4a71c877-e1ca-e34f-864e-861f7616d084
2006-06-02 19:34:58 +00:00
Dennis Schridde 27fadd14cf - converted the sources in src/ to use full path includes instead of just the filename.
- marked places where lib/ivis_*implementation* (eg opengl) is needed, because of incomplete lib/ivis_common.

Should improve the understanding of interfaces and code organization.



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@431 4a71c877-e1ca-e34f-864e-861f7616d084
2006-05-27 16:37:17 +00:00
Per Inge Mathisen 6b4479fe08 Increase the maximum limit of polygons and vertexes for pie files from
256 to 512 as requested by Grim. I hope this is sufficient. Not tested.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@429 4a71c877-e1ca-e34f-864e-861f7616d084
2006-05-20 17:49:19 +00:00
Dennis Schridde 40090410ac - Cleaned up stubs
- Removed unused/outdated ivis02/Ivis02.dsp/.vcproj and  src/mpdpxtra.[ch]
- Replaced src/mplayer.c with a stub, containing only mplayerSubmit()
- Added DEPRECATED warnings
- Added documentation for WZ_DEPRECATED
One commit follows, to finish the move from ivis02/v4101_stub.c to ivis02/v4101.c



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@415 4a71c877-e1ca-e34f-864e-861f7616d084
2006-04-08 19:14:30 +00:00
Rodolphe Suescun 5d75bf6298 Fixed raw makefiles.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@407 4a71c877-e1ca-e34f-864e-861f7616d084
2006-03-19 05:00:32 +00:00
Dennis Schridde fe689a39ec - Cleaned up iVis a bit by "commonalizing" it.
- Added a WZ_DEPRECATED macro (lib/framework/macros.h) to mark deprecated functions.
  (See http://websvn.kde.org/trunk/KDE/kdelibs/kdemacros.h.in?view=markup -> KDE_DEPRECATED for usage.)

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@406 4a71c877-e1ca-e34f-864e-861f7616d084
2006-03-18 01:59:59 +00:00
Rodolphe Suescun aa3c7b4ff7 Added shadows as an option.
Alt-S (can be modified) to toggle.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@401 4a71c877-e1ca-e34f-864e-861f7616d084
2006-02-28 14:04:59 +00:00
Dennis Schridde 1e7edf9fa2 Fixes some minor memleaks and marks the source of the big one in pie_PNGLoadMem.
Also big amount of whitespace changes, sorry for the inconvenience...



git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@400 4a71c877-e1ca-e34f-864e-861f7616d084
2006-02-18 18:54:37 +00:00
Rodolphe Suescun 62b6055732 Small change in water rendering code (will require changes
in tilesets).
Fixed 2 memory leaks.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@389 4a71c877-e1ca-e34f-864e-861f7616d084
2006-01-19 10:09:20 +00:00
Rodolphe Suescun 7cbcd91f70 Added support for addons directory.
Small fixes in openGL renderer.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@377 4a71c877-e1ca-e34f-864e-861f7616d084
2005-12-27 06:12:51 +00:00
Rodolphe Suescun 6fedcb3d4d Fixed crash in sound lib.
Fixed shadow-related problem.
Fixed polygon flags (face culling and colour key related).
Added new tileset from Grim.
New warzone logo.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@365 4a71c877-e1ca-e34f-864e-861f7616d084
2005-11-29 16:20:35 +00:00
No Author 5ba7ddac6b Create final repository structure.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@362 4a71c877-e1ca-e34f-864e-861f7616d084
2007-06-28 17:47:08 +00:00