Commit Graph

406 Commits (5ce7fee1f192b789c07df59d4bb8fa9b1db1d546)

Author SHA1 Message Date
i-nod d3f1d77aed Correctly propagate TCMask settings through PIE levels, so it will works for animated objects too.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10530 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:33 +02:00
Per Inge Mathisen 338bc9e322 Move all hard-coded colours (except map preview ones) into the palette file. Pass a PIELIGHT to widgSetColour() instead of RGB.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10466 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:30 +02:00
Per Inge Mathisen 806268790f Move default form colours into external palette file.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10457 4a71c877-e1ca-e34f-864e-861f7616d084
2010-04-12 11:59:29 +02:00
Safety0ff ad27f1b309 Fixed terrain drawing code that was making the iVis state invalid.
- Added multiplicative blending mode.
- Reverted r9629.
Reviewed by i-NoD.
Closes #1692.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10381 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-21 09:30:51 +01:00
i-nod 0b39df6e6f - Use additive blending instead of alpha blending for construction/deconstruction lines (regression from 2.3).
- Use Vector3f instead of superfluous CLIP_VERTEX in pie_TransColouredTriangle().

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10358 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-20 12:49:47 +01:00
i-nod c1beb1f42b Remove 256 scale value from texture matrix. Closes #1678.
PIE3 format will expect 0.0-1.0 floating points in texture coordinates values.
PIE2 and IMG(GUI textures) formats still using 8-bit integers in texture coordinates values.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10297 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-16 15:47:55 +01:00
Cyp 21fb1a18ed Fix mac warnings, hopefully (effectively reverting my previous changes to tex.h)... 2010-03-10 23:09:27 +01:00
Cyp 6360e80f25 Try to fix new build warnings and a build error on mac. 2010-03-10 22:55:24 +01:00
Cyp 05575109b5 Try to clean up includes, fix missing extern on declaration of DataHash[]. 2010-03-10 13:31:27 +01:00
i-nod dda0f9f77b Enable or disable fog in TCMask shader depending on in-game state. Part of #851. Reviewed by Per.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10210 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-10 08:23:46 +01:00
i-nod 627a6d1860 iViS engine tweaks. Closes #1667.
- Replace glBlend calls with iVis blending wrapper.
- Remove pie_NO_BILINEAR flag and replace it with pie_FORCE_FOG flag.
- Enable fogging for structure baseplate with pie_FORCE_FOG.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10209 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-09 22:05:42 +01:00
i-nod 4ad78bf9b2 TCMask feature: shaders infrastructure and TCMask shader, FF fallback is supported for TCMask. Part of #851.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10179 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-07 08:34:17 +01:00
i-nod 87f8777a63 TCMask support infrastructure: mask loading and colour retrieval routines. Part of #851.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10178 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-07 08:34:17 +01:00
Christian Ohm 867ff725d2 Add pal_RGBA and pal_Grey functions.
pal_RGBA returns a PIELIGHT from four r, g, b, a values, pal_Grey is an alias
for pal_SetBrightness. Closes #1644.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@10078 4a71c877-e1ca-e34f-864e-861f7616d084
2010-03-04 19:07:37 +01:00
Per Inge Mathisen 232a070ce2 Remove unused dead terrain code. From ticket:1616 by i-NoD.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9886 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-20 01:50:15 +01:00
Christian Ohm a0f08bff1d Don't return a value in void function.
Patch by Seismo (WarningC4098.patch).

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9879 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-20 00:00:21 +01:00
Per Inge Mathisen d254e6a339 Remove duplicate points removal in PIE loader. Closes ticket:1582 Reviewed by Safety0ff
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9793 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-13 23:05:01 +01:00
Per Inge Mathisen 9bb288d1f4 Remove erroneous comment
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9745 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:18 +01:00
Per Inge Mathisen 6f5a49387f Clean up the definitions of the rendering modes.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9620 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:28:01 +01:00
Christian Ohm 5b3b144994 Remove a useless macro parameter.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9580 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:57 +01:00
Christian Ohm f4de16db77 Replace deprecated libpng variables.
Refs #1471.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@9455 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:27:40 +01:00
Guangcong Luo 9b0381b14b Remove the two Warzone logo backdrops - they're really unprofessional and tacky, especially when there's already a Warzone logo at the top of the screen.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8933 4a71c877-e1ca-e34f-864e-861f7616d084
2010-02-09 20:03:57 +01:00
Guangcong Luo bcef102074 Add small font for textdraw routines.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8720 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 20:26:44 +01:00
Buginator b99b245e7f Turns out that we can't use GLee.h for all our openGL header needs, since GLee.h defines Status, and we also use that, so until we fix that either in GLee.h or our codebase, going to revert r8615/r8616
FIXME! (to be done later)

closes ticket:153

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8618 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:51 +01:00
Buginator c6747b1606 Don't use SDL_opengl.h, instead, use GLee.h to handle all our openGL needs.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8617 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:51 +01:00
Buginator 3665f20498 Use the correct header file when using openGL, instead of the more complex #if/else/endif block.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8616 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:51 +01:00
Guangcong Luo 6519ce48e9 Use GLuint correctly (fixes build errors and warnings caused by other fixes).
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8608 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:49 +01:00
Buginator 9445f60753 Actually use GLuint instead of pretending to be GLuint.
patch by stiv.
Closes ticket:1148

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8604 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:48 +01:00
Guangcong Luo c6e474a482 Revert r8584/r8585 since they're causing too many problems in Linux for me to deal with right now. Fixes bugs #1121 and #1123.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8590 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:47 +01:00
Guangcong Luo fa4f0798ba Fix a bug where a long was dereferenced from an int pointer.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8584 4a71c877-e1ca-e34f-864e-861f7616d084
2010-01-30 17:12:46 +01:00
Guangcong Luo 878249ef13 Better-looking HP/reload bars. (Warning to Per: Adds 4 colors to piepalette.c/.h)
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8405 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:19:57 +01:00
Christian Ohm 65caade5c5 Unified OpenGL error handling
This adds a glErrors function that returns true in case of errors after
outputting them with file and line number from where it was called.
Closes #1011.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8337 4a71c877-e1ca-e34f-864e-861f7616d084
2009-11-22 16:19:53 +01:00
Per Inge Mathisen 6f0aaea8ad Remove unused code and correct PIE documentation. Number of texture animations and playback rates do not
and cannot vary between polygons, despite what parts of the code wants you to believe. This is good.
Patch reviewed by gerard_.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@8190 4a71c877-e1ca-e34f-864e-861f7616d084
2009-10-04 19:01:56 +02:00
Per Inge Mathisen 11335e28a9 Add assert-or-return workarounds for some crashes reported by zydonk on the forums.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7835 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:30 +02:00
Per Inge Mathisen 4966ae5c6a Fix compile failure on MSVC. Patch by stiv, reported by i-NoD. Closes ticket:662.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7818 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:27 +02:00
Per Inge Mathisen 4d33f6a51d Add new function to output grayscale PNG images. Needed for ticket:652 net map/savegame format.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7817 4a71c877-e1ca-e34f-864e-861f7616d084
2009-09-27 19:06:26 +02:00
Buginator bff6a7c84e Change texLoad to a bool function, to correctly handle tertiles that are of the wrong depth.
This is in response to refs ticket:578 where the wrong tertile depth is used on some tiles, causing GL drivers to crash.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7658 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-05 16:21:06 +02:00
Per Inge Mathisen 73ea6f197e Remove unused functions from text drawing code.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7253 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:31 +02:00
Per Inge Mathisen 29a2b2fe35 Change SDL types to stdint.h defined types. Do not depend on SDL.h included system headers.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7238 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:30 +02:00
Per Inge Mathisen 95ff68f350 Improve error message on failed PIE texture flag load
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6879 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-20 20:40:48 +01:00
Gerard Krol dc834b2a3a Place buildings using blueprints (green) instead of highlighting the ground.
The blueprint is a green transparent version of the building you want to build. It is bright green when the build location is valid and red when it is not. After the building is placed a darker version of the green building will remain until a droid starts construction.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6840 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-11 22:55:41 +00:00
Gerard Krol 10ce0cc72b Scale down textures used for 3D when they exceed the size specified with the textureSize option. Also add two assert statements to check for the correct handling of the parameters for glDrawRangeElements.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6720 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-23 18:56:41 +00:00
Gerard Krol 5601741b95 Brace for impact, this is the new terrain renderer!
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6682 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-21 23:35:21 +00:00
Buginator af112296c6 Updated MSVC project & solution file(s).
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6638 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 05:46:13 +00:00
Dennis Schridde aac41748dc Bump copyright
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6617 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 18:01:48 +00:00
Dennis Schridde 52b07e9cf0 Move piefixedpoint.h and pievector.h out of ivis, since they are quite generic
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6615 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:18 +00:00
Dennis Schridde cbbc58d1e9 Move files which extend a c std library header to a filename of similar name
Extension functions dealing with ...
 * strings are in string_ext.h
 * stdio (namely printf variants) are in stdio_ext.h
 * math are in math_ext.h

These headers are no longer included by frame.h

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6613 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:23:09 +00:00
Dennis Schridde 16c9241fa2 Rename Vector*_New() to Vector*_Init(), since that seems less confusing
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6611 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-10 17:22:59 +00:00
Dennis Schridde 7432a0e433 More Vector conversion functions and also one to debug printf.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6520 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-30 04:04:27 +00:00
Dennis Schridde efb3a5c4ac More vector conversion constructors: 3uw -> 3f
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6504 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-26 01:46:24 +00:00