Commit Graph

599 Commits (4fec447170fec1d17e332a9ffe905a8044a2ff32)

Author SHA1 Message Date
Christian Ohm b9b1a4bac7 Move the "Mesa hack" from GLee.c into screen.c:screenInitialise()
There we can check the GL_RENDERER string for more fine control. Currently it
is enabled when the string starts with "Mesa", so it doesn't affect any other
drivers. It might need more checks if new Mesa versions break this.
Fixes #608.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7694 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-09 23:44:26 +02:00
Buginator cbe998956a Slight cleanup of glOrtho parameters that should be double floats.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7660 4a71c877-e1ca-e34f-864e-861f7616d084
2009-06-05 16:21:06 +02:00
Buginator 2fd30d2818 The hack from r7341 seems to break Mac OS X compiles.
Added #if guards around the hack.

Thanks to Vermithrax for the heads up.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7593 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-30 19:24:49 +02:00
Buginator b60b1ad10b Fix prototype to match function's definition.
(was missing a const)


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7381 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-10 19:18:13 +02:00
Giel van Schijndel 6739e6aa20 When drawing formatted text treat *real* newline characters ('\n') as newlines as well
- Not just the special formatting character '@'

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7346 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:42 +02:00
Buginator 3042114be5 Work around for drivers that report VBO, but don't have full openGL 1.5 implementation.
This is the case for the current radeon open source drivers, and possibly others.

Patch by: suokko (Pauli Nieminen)
see: http://developer.wz2100.net/ticket/216
reference ticket:216



git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7341 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:41 +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 b8d3c62005 Remove last of the useless statics from text drawing code.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7252 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:31 +02:00
Per Inge Mathisen e5006affb7 Remove useless and unused statics from text drawing code.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7251 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 8a0a0af7c0 Remove unnecessary SDL includes.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7237 4a71c877-e1ca-e34f-864e-861f7616d084
2009-05-06 22:29:29 +02:00
Giel van Schijndel e0f65b827c Add support for Full Screen Anti-Aliasing (FSAA):
* Enable, at the user's request, FSAA.
  - The user can specify the amount of samples (should be a power of 2) with the "FSAA" config option.
  - The user can disable FSAA by setting the "FSAA" option to "0" (zero)

This closes #387.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7065 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-18 17:08:19 +02:00
Per Inge Mathisen 742fecefc8 Make Warzone use regular textures to display the videos. Removes requirement for texture
rectangle extension. It uses one texture with a fixed size for videos (the old code allocated 
a new texture once per frame). The texture size is set at 512x512, which is enough
for the current 320x240 videos. In addition the message about the radar not working is 
removed and some extra checks added. Patch by Christian Ohm.


git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@7021 4a71c877-e1ca-e34f-864e-861f7616d084
2009-04-15 20:36:58 +02:00
Gerard Krol 5a2ff6f410 Allow structure baseplates to have transparency. 2009-04-07 12:18:14 +02: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 5f288925db Do not use texture compression for interface textures. This makes the interface look better and fixes bug #74.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6834 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-11 13:03:48 +00:00
Dennis Schridde 58897d42be Report OpenGL 3.0 support during initialisation as well
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6779 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-06 14:40:27 +00:00
Per Inge Mathisen 28c7cb4abb Add new backdrop by B. V. Edwards <cathuria>
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6768 4a71c877-e1ca-e34f-864e-861f7616d084
2009-03-02 22:57:26 +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 60dbe83260 Updates .diff file on what we changed from the 'clean' 5.4 to the version that we use.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6653 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 22:17:05 +00:00
Buginator e2cfc4cc32 This fixes version 5.4 of GLee so that it compiles cleanly on gcc again.
We need to change the Glee.diff file as well.

Closes ticket #262

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6642 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 06:17:47 +00:00
Buginator 2b350ea649 Updates GLee to 5.4
**NOTE**: this will break gcc compiles.  The fix is in the next commit, so we can get a clean diff from the "clean" 5.4 to the modified version that we require.

Change log:

    * OpenGL 3.0 support, and 41 new extensions.
    * 5.4 : fixes for GL_NV_gpu_program4, GL_EXT_shader_program4.
    * 5.4 : Added 5 new extensions :
          o GL_EXT_texture_swizzle
          o GL_NV_explicit_multisample
          o GL_NV_transform_feedback2
          o WGL_NV_gpu_affinity
          o GLX_ARB_create_context
    * 5.4 : Various dead/dummy extensions have been removed, including :
          o GL_NV_geometry_program4 (merged with GL_NV_gpu_program4)
          o GL_NV_vertex_program4 (merged with GL_NV_gpu_program4)
          o GL_NV_fragment_program4 (merged with GL_NV_gpu_program4)
          o WGL_NV_video_out (renamed to WGL_NV_video_output)
    * 5.33 : fixes some GCC warnings
    * 5.33 : fixes some conflicts with glext.h on OS X
    * 5.33 : fixes an issue where 2 extensions could go missing on some platforms
    * 5.32 : fixes a potential access violation in __GLeeGetExtensions - thanks to Jacques Beaurain for spotting this bug.
    * 5.31 : fixes a GLX compile error
    * 5.30 : Better Linux/Mac OS support


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6641 4a71c877-e1ca-e34f-864e-861f7616d084
2009-02-15 06:14:38 +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
Per Inge Mathisen 178cb7efa9 Improve logging messages from GLC interface layer.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6455 4a71c877-e1ca-e34f-864e-861f7616d084
2008-12-12 16:35:05 +00:00
Gerard Krol 0906040c8b Add an option to rotate the radar when the player rotates the camera. The viewing window on the radar
is thus always facing upwards.  This option is now enabled by default to obtain some feedback.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6410 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-30 15:10:49 +00:00
Gerard Krol 03c11abefb Hide the mouse cursor during loading screens and movies.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6252 4a71c877-e1ca-e34f-864e-861f7616d084
2008-11-08 21:37:32 +00:00
Giel van Schijndel 1df1706440 * Fix several "comparison between signed and unsigned" warnings
* Const correctness
 * Use "(unsigned )?int" instead of "[SU](D?WORD|BYTE)" where the size guarantee is not required


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6158 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-14 20:42:20 +00:00
Giel van Schijndel 810fac209b * Wrap all file lists in the automake and win32 makefiles across lines such that there's only one file on each line
* Alphabetically sort the file lists

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6144 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-13 13:04:37 +00:00
Freddie Witherden aa447545b2 Outlaw the use of SDL_SetGamma (patch #83). This closes ticket #83. Approved by Giel.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6129 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-11 10:51:53 +00:00
Buginator 4971f0cdcd Adds a message to the console when screenshot key is hit.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6108 4a71c877-e1ca-e34f-864e-861f7616d084
2008-10-04 03:31:18 +00:00
Freddie Witherden 994e2d3938 Fix radar corruption under nVidia/Intel cards. This closes ticket #72.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@6042 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-18 17:45:16 +00:00
Per Inge Mathisen 704117f85c Fix various doxygen errors and warnings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5992 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-11 18:25:34 +00:00
Per Inge Mathisen 4def288387 Remove requirement on texture rectangle extension for minimap code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5960 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-07 21:41:50 +00:00
Giel van Schijndel 37c6b31651 * When using a va_list multiple times make sure to va_copy it first
* Because va_copy is C99 provide a fallback for it on non-C99 systems (which assumes that va_list is just a pointer to the stack)

This fixes ticket:50, thanks to Buginator for finding the cause (though this solution is different from his suggestion)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5930 4a71c877-e1ca-e34f-864e-861f7616d084
2008-09-05 19:38:22 +00:00
Ari Johnson d5b341334d More changes from #ifdef __APPLE__ to #if defined(WZ_OS_MAC)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5880 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-27 15:24:21 +00:00
Freddie Witherden 55be99a19d Add sync-to-vblank support to Warzone; this closes ticket #38.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5871 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-25 18:01:49 +00:00
Per Inge Mathisen cf7c584399 patch #1095: Make font configurable
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5841 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-20 21:23:58 +00:00
Buginator ebecb854b1 Add a fallback for the map preview when drivers report they have FBO, but we detect a FBO error.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5835 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-17 18:35:22 +00:00
Per Inge Mathisen 4cfdec7d58 Remove some dead code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5822 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-15 20:40:38 +00:00
Giel van Schijndel 535c97354f Add Doxygen comments to functions screenDoDumpToDiskIfRequired and screenDumpToDisk
"Poked" by ticket:23 to add these API-level comments, but the comments themselves are completely different.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5821 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-15 20:27:18 +00:00
Giel van Schijndel 81005f3605 Remove the status check for GL_FRAMEBUFFER_INCOMPLETE_DUPLICATE_ATTACHMENT_EXT as it was removed from the GL_EXT_framebuffer_object extension and Mac OSX doesn't provide it
Deletion suggested by Buginator. This should fix bug #12136

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5777 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-04 20:58:28 +00:00
Giel van Schijndel 7980737e77 * Use ssprintf instead of snprintf to print into a statically sized string
* Reduce the nesting inside Init_FBO
 * Bail out of Init_FBO as soon as we discovered that FBOs are unavailable

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5771 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-03 22:56:38 +00:00
Giel van Schijndel 83159f335d Coding style:
* Fix indentation
 * Don't repeat function prototypes in their pre-leading comments
 * "Upgrade" some function comments to Doxygen comments
 * Remove whitespace from the end of lines
 * Reintroduce empty lines removed in r5733

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5769 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-03 21:06:39 +00:00
Buginator 38c54928d3 Delete the FBO (if we are using it) when done with it, and also fix a whitespace issue. :S
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5765 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-03 19:36:02 +00:00
Giel van Schijndel 4c19888cba * Move the fixed point cruft used for representation of degrees and some matrix math into a seperate header: piefixedpoint.h
* Update the autotools, win32 makefiles, Code::Blocks and MSVC build systems

NOTE: Xcode will need an update for this


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5761 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-03 16:04:41 +00:00
Buginator 8aabfd23b2 If we are going to check for a extension, we should do it correctly.
In this case, check GLEE_EXT_framebuffer_object.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5758 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-03 02:37:02 +00:00
Buginator 6ccaa10f16 Enhances 'map preview' screen with map maker's ordering of the players position.
This allows players to get to the correct starting position on the map they picked, much easier.

Note, this uses a FBO.  If your card doesn't support it, then you will basically notice nothing different.  A fallback routine is done (but not in this patch), it is just waiting for a decent font *bitmap* that we can use.

Please see http://forums.wz2100.net/viewtopic.php?f=19&t=1953 for more discussion on the matter.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5733 4a71c877-e1ca-e34f-864e-861f7616d084
2008-08-02 04:28:58 +00:00
Giel van Schijndel 7125ab811c Access OpenGL headers on Mac OSX through OpenGL/<header> instead of opengl/<header> (lower case)
This fixes a compile error reported by <ruud> on IRC

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5641 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-22 20:23:24 +00:00
Per Inge Mathisen 94aca87927 Fix bug #12016: radar is broker on trunk, reported by Michael Strobel. We now
use the texture rectangle extension to draw the radar window, which should be
supported on even the oldest OpenGL-capable hardware out there.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5562 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-15 20:06:09 +00:00
Per Inge Mathisen ae2c501b8f Use power-of-two texture for radar again. Fixes support for ancient gfx cards.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5530 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-13 18:10:58 +00:00
Dennis Schridde 022315eef0 Hardcode top_srcdir to make building from non-topdir possible, dont depend on the touch command, fix LDFLAGS to not depend on the removed TARGET variable
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5476 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-10 20:10:16 +00:00
Dennis Schridde 302a557478 Rename "raw" Makefiles to "win32" Makefiles
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5402 4a71c877-e1ca-e34f-864e-861f7616d084
2008-07-06 14:29:04 +00:00
Dennis Schridde 45f23a4926 Merge commit 'HEAD@{3}'
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5347 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-28 22:32:44 +00:00
Dennis Schridde 050ec39c11 Use the (also new in this commit) relative variants of the directories almost everywhere.
Exception is when generating the .wz files, where we need the path to the build directory and building a reverse relative path to $(srcdir) will be messy.
Also silence submake.mk a great deal.
Bug #11883 should be fixed now for the most part.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5325 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 23:41:52 +00:00
Dennis Schridde fd2bfb0e0f Prepare for another fix for parts of bug #11883: Issues with the improved raw Makefiles
- Rename Makefile.raw to lowercase


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5321 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 22:48:45 +00:00
Dennis Schridde 73b35ab8d6 Rename top_srcdir/top_builddir to abs_top_srcdir/abs_top_builddir, to make this more obvious.
Their use is currently flawed, since it will not work in directories with spaces in them... (


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5319 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-24 20:19:54 +00:00
Dennis Schridde 9bd8b24921 Boost raw Makefiles
- Use PACKAGE, PACKAGE_VERSION, remove VERSION
- Allow out-of-source-dir builds (mkdir build && cd build && make -f ../Makefile.raw)
- Move config.mk from $(top_srcdir)/makerules/config.mk to $(top_builddir)/config.mk
   When keeping current behaviour (srcdir=builddir), this means: Move it from makerules into the main directory


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5308 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-23 13:54:47 +00:00
Dennis Schridde a3ff407679 Rename VectorXY_Set to VectorXY_New and make it conform to API of the other vector functions
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5223 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-06 22:21:18 +00:00
Freddie Witherden 5fe6816fdd Fix building on OS X (some bozo forgot to update the Xcode project when adding new .c files). Update the font on OS X to Lucida Grande. Correct Framework install path to allow for moving executables.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5221 4a71c877-e1ca-e34f-864e-861f7616d084
2008-06-06 17:42:21 +00:00
Giel van Schijndel 91fc8a3b53 * Change colours for some of the status bars in the mission "completion score screen" to be more "vivid"
* Add a new colour: WZCOL_MENU_SHADOW
  * Use this colour instead of WZCOL_MENU_BACKGROUND to create a "Black shadow"

Closes #11; patch by Buginator


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5201 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-28 22:08:49 +00:00
Per Inge Mathisen a5e528ebec Fix radarTexture crash.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5179 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-25 15:29:10 +00:00
Giel van Schijndel 855ec725d4 Use sstrcpy|sstrcat instead of strlcpy|strlcat for manipulation of statically sized strings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5176 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-25 13:46:49 +00:00
Per Inge Mathisen d6d6a9919e Commit API only from patch #907: Make texture coordinates into static array.
This fixes a bug with maps smaller than max visible tiles area which would
either crash or create seams, re-reported by Buginator.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5134 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-17 21:48:23 +00:00
Dennis Schridde 5b703fb634 Dump OpenGL implementation information to console
Author: Buginator
Signed-off-by: Dennis Schridde <devurandom@gna.org>


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5123 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-15 17:32:39 +00:00
Dennis Schridde 1bc654f8b5 Add float variant to pie_RotateTranslate
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5118 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-14 21:15:59 +00:00
Dennis Schridde 1fcf5bfe97 Render images as alpha, instead of gouraud. This allows alpha-gradients
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@5099 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-13 12:53:02 +00:00
Per Inge Mathisen bdb6bf9ef0 Silence compiler complaints about memory leaks in tile drawing code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4992 4a71c877-e1ca-e34f-864e-861f7616d084
2008-05-09 18:13:03 +00:00
Giel van Schijndel 30e790a7b8 Add a Doxygen comment to function iV_GetTexture
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4838 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-28 16:51:03 +00:00
Giel van Schijndel 61c8bbc4b9 * Don't "Guarantee nul-termination" after snprintf as snprintf does that itself already (per the C99 spec)
* Use strlcpy for copying strings instead of snprintf "%s"
 * Don't cast the return value from vsnprintf to (void)
 * When we use va_start make sure to use va_end as well...
 * Fix indentation


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4785 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-26 14:21:41 +00:00
Per Inge Mathisen 9de00487a8 Merge in mostly cosmetic pieces of patch #969: Rewritten minimap code
to minimize the size of the patch.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4767 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-24 20:32:24 +00:00
Giel van Schijndel 7f847d9b08 Fix yet some more "function declaration isn’t a prototype" warnings (for the wiggle extensions)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4709 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 23:15:01 +00:00
Giel van Schijndel 4a17aeeec7 * Delete unused and empty function StartTacticalScroll()
* Mark the parameters for several functions as WZ_DECL_UNUSED (for those functions that require the parameter as part of their interface)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4701 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 17:17:50 +00:00
Giel van Schijndel 648a2b933b Update GLee.diff for r4693
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4697 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 16:09:09 +00:00
Per Inge Mathisen 5d3700bb1c Fix GLee warnings
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4693 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 15:02:54 +00:00
Giel van Schijndel 1fae16dedc * Revert r4688 for GLee.h (use some GCC pragmas to ignore warnings in the GLee header)
* Actually *fix* the "function declaration isn’t a prototype" warnings


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4689 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 13:32:18 +00:00
Giel van Schijndel 055903cca2 Use some GCC pragmas to ignore warnings in the GLee header and source file (so that we can compile cleanly, even with -Werror)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4688 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 13:01:10 +00:00
Giel van Schijndel 0859814e16 Replace our custom OpenGL extension checking mechanism by GLee:
* import the code from GLee into our repository (a single source and header file), and replace all use of the check_extension function by use of GLee functions
 * Remove function stencil_one_pass and replace all calls to it with `if (GLEE_EXT_stencil_two_side && GLEE_EXT_stencil_wrap)`

Patch from ticket 8 by Buginator (with some minor additions by me)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4687 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-20 12:52:19 +00:00
Per Inge Mathisen f106d10772 Do not leak VRAM when displaying map previews. Patch by Buginator with changes by me.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4679 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-18 18:04:55 +00:00
Per Inge Mathisen b1000ce106 Map preview patch by Buginator in patch #1040
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4541 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-07 19:07:43 +00:00
Per Inge Mathisen 566e050cf3 Remove useless and wrong comment.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4498 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 19:30:05 +00:00
Per Inge Mathisen 274ae7c9a4 Enforce strict function prototypes for autoconf builds, and fix function prototype problems.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4487 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-05 15:34:55 +00:00
Roman C 49903f9593 Get rid of unnecessary warnings when compiling release build using MSVC.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4462 4a71c877-e1ca-e34f-864e-861f7616d084
2008-04-01 15:56:39 +00:00
Giel van Schijndel e89a224b32 Add in support for coloured mouse cursors:
* Add a new configuration option "ColouredCursor", which if enabled will enable coloured cursors ingame
 * Add a new API for setting cursors with: pie_SetMouse (previously frameSetCursor was used)

Patch #956 by Buginator; pie_.*Mouse API done by me (except for the iV_DrawImage invocation)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4434 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-30 15:44:50 +00:00
Per Inge Mathisen be566a7d6d Add -Wcast-align and -Wmissing-declarations to autoconf debug builds, and fix warnings.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4403 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-28 23:28:44 +00:00
Per Inge Mathisen eaa506a47f Do not re-enable texturing if it is already enabled.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4332 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-25 19:23:26 +00:00
Dennis Schridde 10f2ccfd56 TRUE->true, FALSE->false (except in scripts)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4311 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-24 16:51:17 +00:00
Roman C a1008c093d Reduce amount of junk in the MSVC compilation output by about 70%.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4279 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 22:15:28 +00:00
Roman C 399e92a1ed Make sure chat messages won't be overlooked during mp games by making chat messages stand out from system messages.
If enemy/foe radar colors are on (SHIFT+TAB) then all ally messages are yellow, enemy messages are red. If enemy/foe mode is off all chat messages are simply brighter than system messages.

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4272 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-23 20:04:37 +00:00
Dennis Schridde b1b2859ea3 New enum TEXPAGE_TYPE, to better control disabling/enabling of texturing. (Changed pie_SetTexturePage accordingly.)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4202 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-21 14:34:30 +00:00
Per Inge Mathisen fe2ff84ed3 Fix bug #11216: When a tooltip is shown, the sky vanishes.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4164 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-20 14:59:33 +00:00
Dennis Schridde 0c5ecc0efb Fix bug #11277: Strings containing non-ascii characters missing
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4118 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-17 07:23:48 +00:00
Dennis Schridde 2537bfc61c Cleanup #includes a bit
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4107 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-16 12:39:08 +00:00
Per Inge Mathisen 1b9ef4f995 Remove hardcoded map visibility size from the ivis_opengl code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4103 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-16 11:05:08 +00:00
Dennis Schridde 0316bee001 Remove original backdrops (ugly) and wzlogo 3, 4 and rename the others to backdropX
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4046 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-14 19:31:42 +00:00
Dennis Schridde cb2f0a30df Patch MSVC Solution file to depend on SQLite and change eol-style to native for them, since otherwise patches will not apply.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4044 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-14 18:16:04 +00:00
Per Inge Mathisen a71086a039 Prune dead code, and do not bother to dynamically allocate memory to save 12 bytes per polygon.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4037 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-13 20:46:29 +00:00
Per Inge Mathisen d5687a6bce Only set the colour for a model once, not once for every vertex. It does not vary.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4036 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-13 20:10:57 +00:00
Per Inge Mathisen 7693909947 Kill oddball type TERRAIN_VERTEXF (never used for terrain!) and reduce copying some more.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4035 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-13 20:03:50 +00:00
Per Inge Mathisen 3bcd4f7d1d Kill PIEPOLY and reduce a lot of silly copying of variables back and forth for each polygon.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4033 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-13 19:44:57 +00:00
Per Inge Mathisen a8f88483ac Fix bug in OpenGL lighting mode which would mess up GUI. Also do not
recalculate the surface normal for every polygon for every frame! It
is already calculated when we load the PIE model, so let's use it.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4032 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-13 19:09:44 +00:00
Per Inge Mathisen 5f31a354f3 Do not enable and disable GL_LIGHTING for every polygon when lighting mode is enabled.
Reorganize the drawing code a bit to make it more obvious how the calls go.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4031 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-13 18:52:09 +00:00
Per Inge Mathisen 4b7f572ba4 Simplify pie_Polygon() since we never draw polygons of less than 3 vertices.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4030 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-13 18:32:45 +00:00
Per Inge Mathisen f9d2a9152d Remove PIE_ALPHA. Revert most of r4023, since some parts of the drawing code
did not handle alpha blending too well, and blended solids in some cases.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4025 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-12 21:07:26 +00:00
Per Inge Mathisen 169e5bcc42 Drastically reduce the number of (spurious) state changes per frame.
Doubles frames per second drawn here.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4024 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-12 20:14:25 +00:00
Per Inge Mathisen d4e10b07e9 Do not care what blending state we are in when drawing simple and solid
graphics additions like lines and boxes to cut down on state changes.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4023 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-12 19:56:34 +00:00
Per Inge Mathisen 4004ce9872 Clean up in rendering modes. Remove unuseful pie_SetColourCombine().
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4022 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-12 19:41:33 +00:00
Per Inge Mathisen 83ddfb7b99 Small cleanup of the screen flip code
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@4021 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-12 19:29:24 +00:00
Giel van Schijndel 33216b2e9d Move all stuff that actually belongs in CPPFLAGS (but is called CFLAGS) to AM_CPPFLAGS
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3988 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-10 10:50:58 +00:00
Dennis Schridde d8409c9819 - Don't define CFLAGS anymore, export WZ_CFLAGS instead, which can be overridden by make commandlines
- Set -DYY_NO_INPUT only in those places where needed
- Add some previously forgotten CFLAGS where needed
- Remove extranous -lintl from WIN32_LIBS
- Remove apparently unnecessary directory from Mac include (png_util doesn't need it either)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3986 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-10 02:01:46 +00:00
Dennis Schridde 9f44219b1c Move addition of CFLAGS from configure.ac to the places they are actually needed.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3983 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-09 20:08:42 +00:00
Dennis Schridde 3858daf4a1 Reset MSVC version from 9 to 8, since otherwise MSVC8 will refuse to load the project files. (bug #11219)
Does MS provide some kind of templating system? Like autotools generate Makefiles from Makefile.am.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3950 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-08 11:28:40 +00:00
Dennis Schridde d3455b699a Properly set include/library directories for MSVC
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3949 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-08 01:45:45 +00:00
Dennis Schridde 1c52c14833 Whitespaces
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3940 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-07 15:15:27 +00:00
Dennis Schridde a8dc02f672 Generic cleanup, often variable initialisation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3939 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-07 15:09:03 +00:00
Dennis Schridde da462b4511 More float specialisation and generic cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3937 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-07 12:42:42 +00:00
Dennis Schridde a3284e7a7d Port r3921 till r3924:
- Move VISIBLE_XTILES from src/ to lib/ivis_common/, so we don't have to hardcore mapview sizes in piedraw.c...
- Make INTERFACE_DEPTH/MAX_Z int, since that's what they are used as.
- Remove unused defines
- Less fog and more shadows


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3926 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-05 19:30:29 +00:00
Dennis Schridde a854a84ae1 Port r3912: Replace GLC_ with _glc to prevent confusion and use GLC_UTF8_QSO as string type.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3914 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-04 15:03:18 +00:00
Dennis Schridde 377adc40d6 Another backdrop named "My Pet Turtle" by Cathuria from the "A paltry 30k polys" thread http://forums.wz2100.net/?topic=1361.0
License: CC BY-SA 3.0, as allways.
The border and logo look quite good ingame, so 07-bdrop.png should get that, too.
Also: Use a highres version of 07-bdrop.png, also by Cathuria
Also: Change COPYING.README style a bit


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3884 4a71c877-e1ca-e34f-864e-861f7616d084
2008-03-01 13:18:44 +00:00
Dennis Schridde 9b81337df9 Why did QuesoGLC/fontrendering only work on Mac OS X? Because the texture was set conditionaly for it only.
This applies patch #961 correctly and thus closes it.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3867 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-25 21:58:35 +00:00
Per Inge Mathisen 683d9deb2e Replace check_extension with one that does not anger valgrind.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3766 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-12 18:57:20 +00:00
Giel van Schijndel 722303eb84 Turn a lot of already-available function documentation comments into Doxygen documentation
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3739 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-10 15:44:53 +00:00
Giel van Schijndel 72003cf9bf Provide Doxygen documentation for iV_DrawFormattedText() and change its return type to int
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3738 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-10 15:25:20 +00:00
Giel van Schijndel 24ba730bdb * in iV_DrawTextRotated() select the model view matrix and don't depend on that one being selected already
* Also push and pop the model view matrix


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3737 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-10 15:06:23 +00:00
Giel van Schijndel 637edb1f0d * in pie_SetTexturePage() _always_ disable texturing when invoked with a negative parameter
* In iV_DrawTextRotated() use -1 instead of -2 as texturepage (not that it matters anymore what negative number we use, due to the above change)
 * Add some Doxygen documentation to pie_SetTexturePage()


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3736 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-10 15:03:58 +00:00
Ari Johnson adfeb3ab98 Updated Mac OS X port to use QuesoGLC 0.7.0 with a work-around for a
text display bug


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3732 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-09 21:55:02 +00:00
Per Inge Mathisen 54bcf0cde5 Remove completely mistaken comment from the original code. Textures use
0 to 256 range of texture coordinates, and the width of the texture should
therefore not be used to deduce wrap around point for texture animation.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3719 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-08 17:58:37 +00:00
Gerard Krol 5ee301ec76 Make the radar (minimap) transparent again.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3701 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-05 23:02:59 +00:00
Gerard Krol 31a8a54ddb Revert r2901 as this is not the correct way to fix the smearing issues. It probably has something to do with the fogbox or
looking underground. As last resort r1301 "Speed up for people who are fillrate limited" can be reverted.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3699 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-05 21:35:42 +00:00
Per Inge Mathisen 79db811b58 Remove ugly radar constants from pieblitfunc, where they do not belong.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3691 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-04 18:03:02 +00:00
Per Inge Mathisen 20620668ef Move pie_DrawRect into narrower scope, move in some duplicated calling code, and make it static.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3689 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-04 16:58:18 +00:00
Per Inge Mathisen b1ef18e61d Kill unused PIESTYLE struct and parameter.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3688 4a71c877-e1ca-e34f-864e-861f7616d084
2008-02-04 16:55:56 +00:00
Dennis Schridde 411545852f Cleanup
- 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
2008-01-28 01:29:20 +00:00
Dennis Schridde 751d0809c5 Use new VectorX_Compare instead of old VectorX_compare which I'll remove shortly.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3587 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-28 00:27:21 +00:00
Giel van Schijndel b3a3cecaed Rename fractions.h to math-help.h and remove most junk from it
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3584 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-28 00:01:37 +00:00
Per Inge Mathisen e0b92752db Constify some piematrix functions
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3576 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-27 21:05:30 +00:00
Per Inge Mathisen 895ba1c8cd Make less of piematrix.c globally exported.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3575 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-27 20:57:26 +00:00
Per Inge Mathisen fec3b1ca08 Indexed colour usage has been eliminated, so remove its support code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3529 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-21 17:06:31 +00:00
Per Inge Mathisen 921ab82191 Clean up GUI frame drawing and port it to PIELIGHT.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3528 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-21 16:57:00 +00:00
Ari Johnson d075817fce Fixed a typo in the #warning for GLC_TRIANGLE
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3525 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-20 23:48:00 +00:00
Per Inge Mathisen b9bcbad34c Port scores code to use PIELIGHT.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3524 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-20 23:01:13 +00:00
Per Inge Mathisen 08c2a06822 GUI cleanup
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3497 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-16 18:54:16 +00:00
Dennis Schridde 31a863a90b Setup eol-style CRLF for vcproj files
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3473 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-14 20:49:48 +00:00
Dennis Schridde d7bbab46af Set eol-style and mime-type for vcproj files
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3471 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-14 19:55:59 +00:00
Per Inge Mathisen 49cc91b0ef Move all skybox page handling to display3d.c to prepare for skybox scriptability.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3438 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-12 15:10:02 +00:00
Per Inge Mathisen 441f4038e4 Replace a ton of custom texture clipping code with a single call to OpenGL scissor test.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3380 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-06 14:05:13 +00:00
Giel van Schijndel a2fe74852b * Fix some errors in the Doxygen documentation
* Parameter descriptions for non-existing parameters removed
  * Wrong parameter names renamed/fixed
  * Syntax errors in passing the a parameter to a Doxygen command at the wrong location
  * Prevent HTML interpretation of some comments

git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3373 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-05 23:42:54 +00:00
Per Inge Mathisen 168a66b89c Add another backdrop by cathuria.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3303 4a71c877-e1ca-e34f-864e-861f7616d084
2008-01-01 21:40:04 +00:00
Per Inge Mathisen a4972d3d38 Reduce verbosity of LOG_3D
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3273 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-31 14:04:21 +00:00
Per Inge Mathisen 877ac6456c Add lots of doxygenized comments.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3230 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-29 22:34:41 +00:00
Ari Johnson 47816967a7 Updated Xcode project and some endian fixes; also changed endian_*() calls
to expand to ((void) (x)) on little-endian systems, so that the compiler
will catch little-endian developers who forget to update the endian_*()
calls when they change the names of structure fields.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3205 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-27 23:55:34 +00:00
Per Inge Mathisen fae5745233 Remove unused function pie_DrawImageFileID. Rename pie_SetColourKeyedBlack to
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
2007-12-27 01:05:37 +00:00
Per Inge Mathisen 53aa930d6e Turn IMD min and max dimensions into vectors.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3111 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-21 17:34:23 +00:00
Ari Johnson 31fc86ee9f Moved a space to match formatting
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3085 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-17 17:22:07 +00:00
Giel van Schijndel f1f1a19be4 * Fix a bug in iV_DrawTextRotatedFv where I used sprintf instead of vsprintf
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3076 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-16 16:02:54 +00:00
Giel van Schijndel 88bf925cb8 * Add functions iV_DrawTextRotatedFv, iV_DrawTextRotatedF, iV_DrawTextFv and iV_DrawTextF to draw text with a printf-like syntax to the screen
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3075 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-16 15:47:55 +00:00
Ari Johnson 0a9bcf08a3 Xcode project can almost build trunk again. This commit allows the project
to download and build the external libraries that Warzone has added since
the last time that trunk would build under Xcode.  The actual game currently
will not build due to other issues, but this is phase 1.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3068 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-15 23:34:51 +00:00
Per Inge Mathisen e0c450b415 Remove excess display related code.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3062 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-15 12:18:56 +00:00
Per Inge Mathisen 5417afae46 Read tile colour information directly from mapTiles, instead of going through tileScreenInfo
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3057 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-15 11:08:23 +00:00
Giel van Schijndel c51bd8ae10 * Get rid of a large quantity of unused parameters
* 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
2007-12-10 23:15:46 +00:00
Per Inge Mathisen 6c4c61fbb7 PIELIGHT fix for map hightlight. Remove use of colours to communicate a boolean value.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@3022 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-09 21:50:47 +00:00
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
Giel van Schijndel ec392ef7d4 * Improve the quality of the QuesoGLC error messages produced when fonts cannot be loaded/selected
* When we're unable to select a font face give a warning (LOG_WARNING) instead of an error (LOG_ERROR)


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2992 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-07 19:31:19 +00:00
Freddie Witherden 299d7bfcfb Commit patch #871
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2983 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-05 21:56:12 +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 f86858109a Fix texture size warning. It will correctly nag about missing support for 2048x2048 textures.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2973 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-03 20:29:34 +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
Per Inge Mathisen afa23e157a Beauty fixes
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2937 4a71c877-e1ca-e34f-864e-861f7616d084
2007-12-01 16:55:23 +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
Giel van Schijndel 263f92f24f * Always clear the colour buffer in pie_ScreenFlip; this should prevent "screen smearing"; hinted by Buginator
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2901 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-28 21:53:59 +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 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
Giel van Schijndel 6172bdd498 * Refactor space trailing code in textdraw.c such that it is easier to read (also has some comments now which might help...)
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2882 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-25 21:43:16 +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 b5fa689b41 Include SDL_opengl.h instead of GL/gl.h for better portability. This is vital
for Mac compilation.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2864 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-24 16:41:00 +00:00
Dennis Schridde 9cc0a628c1 Do parts of the proposed changes in "[Warzone-dev] build issues in FreeBSD system" by Yaroslav Kolomiyets from 24.10.2006:
- SDL header includes don't use SDL/ anymore (raw Makefiles and MSVC Project adapted).


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2863 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-24 11:49:51 +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 904bfe5f3d Make some stuff static
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2842 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-20 20:41:13 +00:00
Per Inge Mathisen 345d335790 Reduce max radar zoom to 1, because a value of 2 is buggy. Replace
hard-coded radar size values with a slightly better define.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2841 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-19 21:32:35 +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
Per Inge Mathisen fb9d667895 Clean up screen.c - make globals static and remove unused vars.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2822 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-14 22:29:19 +00:00
Per Inge Mathisen f577a8f269 Remove unused screenGetSurface
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2821 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-14 21:05:45 +00:00
Per Inge Mathisen 50e99ae933 Remove unused pietexture.c|h files and references.
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2820 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-14 19:51:04 +00:00
Per Inge Mathisen ff13be0b96 Do not disable lighting if it was never enabled in the first place, to avoid
doing unnecessary OpenGL state changes. Also make sure we turn off normalization.


git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2778 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-10 13:56:14 +00:00
Dennis Schridde 223bc803e8 Use OLD_TEXTURE_SIZE_FIX instead of 256.0f to scale texcoords, to make clear that this is a fix for the old ...
git-svn-id: svn+ssh://svn.gna.org/svn/warzone/trunk@2759 4a71c877-e1ca-e34f-864e-861f7616d084
2007-11-09 17:43:50 +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