Cyp
4fb9e61548
Remove unused TEXT_DISPLAY, improve format string consistency and remove weird casts.
2011-01-18 00:20:04 +01:00
Cyp
a3e5ea7276
Reduce dependence on MAX_PLAYERS == 8.
2011-01-13 15:58:46 +01:00
buginator
4ececd8e49
Fix a plethora of issues for MSVC builds
...
Rename MERGECOPY to MERGECOPYSYNC to prevent clobbering of a windows function named that.
2011-01-01 13:46:12 -05:00
Per Inge Mathisen
53242e1571
Remove some unused legacy code from the old terrain renderer and TERRAIN_VERTEX.
2011-01-01 16:29:49 +01:00
Per Inge Mathisen
7bd5723715
Remove the unused specular parameter to pie_Draw3DShape. It was always WZCOL_BLACK.
2011-01-01 12:58:14 +01:00
Per Inge Mathisen
724cd69882
Define the default fog colour in the palette file instead of hard-coded.
2010-12-31 23:42:21 +01:00
Per Inge Mathisen
e27ac240be
Inline pie_SetTranslucencyMode() and remove the entirely superfluous TRANSLUCENCY_MODE abstraction.
2010-12-31 23:02:20 +01:00
Per Inge Mathisen
67e9635f9f
Merge the ivis_common and ivis_opengl directories, only five years and two months after I originally split them apart.
2010-12-31 22:37:14 +01:00
Per Inge Mathisen
1c0af54edf
Merge the two variants of piestate.cpp; it too confusing to keep two files with the same name doing almost the same thing.
2010-12-31 22:18:45 +01:00
Per Inge Mathisen
2e6332ca8c
Slight optimization: Now we draw the entire model within the same glBegin .. glEnd pair.
2010-12-31 18:59:41 +01:00
Per Inge Mathisen
88fe0bcb2e
Remove support for non-triangle polygons in model files.
2010-12-31 18:22:22 +01:00
Per Inge Mathisen
aafe14fbc2
Add separate shader for models rendered for buttons to remove lighting effects from those.
...
Add support for per-pixel lighting. Patch reviewed by SafetyOff.
2010-12-28 23:35:57 +01:00
Per Inge Mathisen
af59954767
Do not spend value resources shading the backsides of polygons or setting irrelevant GL states.
2010-12-27 16:53:13 +01:00
Per Inge Mathisen
f5ea79ed3c
Enable OpenGL lighting controlled through the vertex shader. Added two new script functions setSunPosition an setSunIntensity.
...
Added a new PIE file directive MATERIALS that sets material properties for a mesh level. Original patch reviewed by SafetyOff.
2010-12-26 22:12:53 +01:00
Cyp
309398dd1d
Make Vectors fun to use. Instead of Vector2f_Sub(Vector2f_Mul(myVector, myScalar), myOtherVector), write myVector*myScalar + MyOtherVector.
...
Reviewed by Safety0ff.
2010-12-21 22:35:37 +01:00
Cyp
0a064c2470
Fix GLee.cpp → GLee.c in Linux and Windows build scripts.
...
And LPTCSTR → LPCTSTR in some Windows file, apparently LPTCSTR wasn't similar enough for it to compile, closes ticket:2428.
2010-12-21 22:13:25 +01:00
dak180
22285a7528
Change Glee back to c; eliminates warnings in the mac build.
2010-12-21 12:30:41 -05:00
dak180
c4ec4ffd2b
144 warnings on the wall, take some down, grind them to dust, 98 warnings on the wall.
2010-12-16 22:05:06 -05:00
Cyp
0646b37603
Rename *.c to *.cpp.
2010-12-16 23:28:56 +01:00
Cyp
a2cd7b0592
Make everything compile successfully with g++, without -fpermissive.
2010-12-16 23:24:40 +01:00
Cyp
2bcb709cf4
Move broken dependency hack out of most Makefile.am's, except the for the root.
2010-12-16 23:14:38 +01:00
buginator
b1495d43b6
Trap the ASCII_NEWLINE to only work in non MP games, to prevent abuse.
2010-12-09 00:52:44 -05:00
buginator
c687c16ee9
Tell people they will see glitches, instead of thinking that they have selective
...
color blindness for units / structures and don't have a openGL 2.0 card.
2010-12-07 20:17:50 -05:00
buginator
ac6b928ad7
Fix map preview screen redrawing, broken in f2ae61805c
...
Add entries to palette.txt for the new colors used in map preview.
Draw location of oil features.
Changelog: Enhance map preview to show oil locations.
2010-12-06 21:14:06 -05:00
buginator
50aafb279e
Don't try to render a string that is NULL. Unknown why this happens, need someone that has access to non-English systems to debug this matter more.
...
refs ticket:2209
refs tickts:2245
(cherry picked from commit b6952c184456b999fb4dfd51ced072ca1b206740)
Conflicts:
lib/ivis_opengl/textdraw.c
2010-12-06 21:13:42 -05:00
Per Inge Mathisen
4f85821bab
Cache texture coordinate calculation on game start instead of doing them each frame. Do defensive structure stretching in the vertex shader. See ticket:2310
2010-12-05 16:17:26 +01:00
Per Inge Mathisen
7de25a9d5b
Lay the groundwork for a more modern component drawing system. Removes support for OpenGL 1.x. See ticket:2310
2010-12-04 15:57:26 +01:00
safety0ff
ae6b76dda5
Fix for ivis state desync, fixes menu colour bug noticed by vexed.
2010-11-22 01:02:11 -05:00
safety0ff
7e872312b8
Fix opengl state clobbering, optimize terrain rendering a little.
2010-11-22 00:05:42 -05:00
Cyp
bdca765f06
Change connector locations and pie_TRANSLATE from floats to ints.
...
Probably fixes desynchs involving different projectile sources.
Hope no floats are left to affect the game state...
2010-11-20 20:44:40 +01:00
Cyp
48c4958062
Convert iIMDShape.min/max from Vector3f to Vector3i, since they are used in the game state.
...
Don't know if that could cause any desynchs, but better not to risk it.
2010-11-16 12:01:43 +01:00
Per Inge Mathisen
9b3cf3a382
Allow you to load textures on demand, both ordinary textures and tcmask textures.There is really no reason now to list tcmask textures in the wrf files at all. You can still put a texture in the wrf to override the usual texture loaded with a model (necessary for campaign and terrain dependent base plates). Closes ticket:2304
2010-11-12 21:31:56 +01:00
Per Inge Mathisen
bf4ffed04c
Allow texture animation and tcmask to be used together.
2010-11-10 20:10:40 +01:00
Cyp
25671b1083
Revert "Replace immediate-mode rendering with VA-based rendering" for now, since it makes rendering trucks very slow.
...
This reverts commit f363a02af7
.
Please revert this revert when this is fixed.
2010-10-26 08:36:22 +02:00
Cyp
5c431a36d1
Convert muzzle location from floats to integers.
2010-10-23 18:02:56 +02:00
Giel van Schijndel
b5fb5bacf8
remove write-only variables buffer and size from iSurface
...
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 22:09:31 +02:00
Giel van Schijndel
0d2dbdbaef
Replace rendSurface related bitshifts with divisions
...
These cases of bitshifting are premature optimisations ''only'',
especially since they obscure what's really going on (finding the center
of a range).
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 21:35:22 +02:00
Giel van Schijndel
6e509622c2
move global rendSurface to piemode.c
...
rendSurface isn't used by rendmode.c, so define it in piemode.c where it
is both used and its contents are defined.
Additionally remove unnecessary #includes from rendmode.h and include
the correct headers at places where rendmode.h was included.
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 21:35:04 +02:00
Giel van Schijndel
5ab267ab71
Remove pointer global psRendSurface
...
Global pointer psRendSurface only ever contains &rendSurface (another
global), provided that it isn't undefined (isn't statically NULL
initialised). So replace the use of this pointer with using
rendSurface.
Additionally remove function iV_RenderAssign, which only wraps the
psRendSurface assignment along with a debug() call, and inline it at its
only call-site.
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 21:30:00 +02:00
Giel van Schijndel
5a51986e65
Get rid of double pie_/iV_ names for the same functions
...
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 21:30:00 +02:00
Giel van Schijndel
e278f01bcd
remove write-only variable iSurface.flags
...
Remove the write only member variable `flags` from struct iSurface.
Additionally remove the macros REND_SURFACE_(UNDEFINED|SCREEN|USR) which
were only used to assign to the `flags` variable.
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-13 21:29:59 +02:00
Giel van Schijndel
5923c45593
piematrix: improve mathematical description of pie_RotateTranslate3f
...
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-10 14:53:58 +02:00
Cyp
03cc107b84
Add build script fixer for when renaming files from .c → .cpp, and add branch-switching hack to lib/ivis_opengl.
2010-10-08 13:16:07 +02:00
Cyp
125e7ba9ab
Convert pie_MatRot[XYZ] to use uint16_t instead of float.
2010-10-08 11:28:31 +02:00
Cyp
5fa9edc4ad
Replace iv_Matrix with pie_Mat, eliminating the need for ivispatch.h.
2010-10-08 11:19:57 +02:00
Giel van Schijndel
fd740148c3
piematrix: remove unused function pie_RotateTranslate3iv
...
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-07 16:10:34 +02:00
Giel van Schijndel
704b32b9ba
piematrix: fix rotation math
...
In 697a97ff18
, my interpretation of the
performed matrix math was wrong as a result of (wrongly) reading [xyz]^2
as [xyz]*2. This commit fixes that error.
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-06 17:03:32 +02:00
Giel van Schijndel
ab9711d877
piematrix: get rid of FP12 bitshifting
...
Use multiplication and division instead of bitshifting as its
conceptually easier to understand (mathematically).
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-05 23:52:54 +02:00
Giel van Schijndel
660f202a9c
Fix wrong ordering of matrix cells
...
Wrong ordering reported by cybershpinx
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-05 23:32:42 +02:00
Giel van Schijndel
697a97ff18
piematrix: document the used math
...
Add descriptions of the used matrix math and the internal representation
of matrices.
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-05 22:41:51 +02:00