* Patch #959 by Michel Dänzer (in Debian bug 458733), modified by Paul Wise <pabs>
* Don't cast a variable of type char to char...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3617 4a71c877-e1ca-e34f-864e-861f7616d084
- theSun becomes static (+setter/getter)
- normalsOnTile() doesn't use global vars anymore
- pie_SurfaceNormal3fv() now works more like the pievector.h functions
- pie_SurfaceNormal3fv() was cleaned up and became inline function in piematrix.h
- Use more pievector.h functions
- Remove unnecessary multiplications/divisions from calcTimeIllum()
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3592 4a71c877-e1ca-e34f-864e-861f7616d084
Use that to cleanup some code.
Because of the lack of a local "math.h", it went into trig.h.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3483 4a71c877-e1ca-e34f-864e-861f7616d084
warfare effect code for all objects - the one which does not modify individual vertices.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3429 4a71c877-e1ca-e34f-864e-861f7616d084
* Make sure we use the same signdness in IMAGEDEF as we did before r3302
* Use a correct format specifier ("%u") for printing an unsigned integer
* Turn a bunch of UDWORDs which don't necessarily need to be UDWORD into unsigned ints as one of those __does__ need to be an unsigned int (i does, for the printf format specifier)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3398 4a71c877-e1ca-e34f-864e-861f7616d084
pie_SetAlphaTest, and do not enable it while drawing the ordinary terrain.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3189 4a71c877-e1ca-e34f-864e-861f7616d084
* Add a function NETVector3uw to use for passing Vector3uw objects more conveniently over the network
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3173 4a71c877-e1ca-e34f-864e-861f7616d084
* This enables GCC to check the formatting strings and the types and number of the variable list of arguments passed
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3087 4a71c877-e1ca-e34f-864e-861f7616d084
* Turn some signed integers ("int" or "SDWORD") into unsigned integers where it made more sence (and signed integers caused warnings about comparing signed with unsigned integers)
* At some places cast to an unsigned integer (where the type of the expression is a signed integer but the result of it logically _always_ is an absolute value)
* Remove unused struct-type EVENT_INIT
* Convert use of malloc->memcpy->free to one single realloc call (and now make sure to actually check realloc's return value, which wasn't done with the malloc call)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3037 4a71c877-e1ca-e34f-864e-861f7616d084
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
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
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
- 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
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
* 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
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
* 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
* 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
- 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
* 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
* 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
* 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
* 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
* 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
* 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