Commit Graph

244 Commits (c64b565f141b550474eb5d1e33c0070457b91943)

Author SHA1 Message Date
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
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 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
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
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
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
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
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
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 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
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 e624663f40 Now that we draw water in a separate pass, we can reduce the number of state changes a lot.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2704 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-04 13:26:04 +00:00
Per Inge Mathisen 01e24bf6ed Clean up pieblitfunc. Dump dead code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2702 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-03 22:48:46 +00:00
Giel van Schijndel f69387aa93 * Ignore 4204 warning on MSVC (non-constant aggregrate initializer; aka non-constant struct initializer)
Patch by Buginator


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2682 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-02 23:33:34 +00:00
Giel van Schijndel 2f3e74a107 * Add include guards to source:trunk/lib/ivis_common/pievector.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2679 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-02 19:43:56 +00:00
Giel van Schijndel e19e8814b6 * Add a GPL (v2 or later) header to source:trunk/lib/ivis_common/pievector.h
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2678 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-02 19:41:04 +00:00
Per Inge Mathisen 6e19e51118 Replace int x,y,z in TERRAIN_VERTEX with a Vector2i, and fix two cases of
type punned pointer casts.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2670 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-29 22:00:55 +00:00
Dennis Schridde 06a469ed5b Simplify Vector2f_Normalise and update docs
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2669 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-29 21:43:55 +00:00
Per Inge Mathisen b99feff92f Merge PIEVERTEX and SVMESH into TERRAIN_VERTEX and use struct assignment instead of memcpy on it.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2668 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-29 21:41:38 +00:00
Per Inge Mathisen d668738714 Vector normalization should not be carried out if vector length is zero, as this
would divide a vector by zero, which is bad. This closes bug #9739.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2654 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-28 16:20:55 +00:00
Per Inge Mathisen 49df8ea371 Use GLC_TEXTURE for font rendering. Patch by Bertrand Coconnier in bug #10188.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2646 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-27 19:20:25 +00:00
Per Inge Mathisen 1d2caebccd Cleanup fugly code, and add nasty hack around weird bug. See bug #9843 for more info on bug.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2644 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-27 18:16:15 +00:00
Giel van Schijndel bd37e62cb2 * Replace a lot of strncat(dst, src, sizeof(dst) - strlen(dst) - 1) calls with the less bloated strlcat(dst, src, sizeof(dst)) form
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2637 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-27 15:47:17 +00:00
Giel van Schijndel 6b4cba1700 * Rename pLevelName to aLevelName (hungarian notation is a pain. Especially when it's wrong!)
* Get rid of several magic numbers
 * Some const correctness
 * Replace a huge amount of strcpy(), strcat(), strncpy() and strncat() calls with a strlcpy() and strlcat() calls respectively


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2635 4a71c877-e1ca-e34f-864e-861f7616d084
2007-10-27 14:35:35 +00:00
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