Commit Graph

2973 Commits (45ecc06514a8e9f1bc99a0966d78f3ae6335b496)

Author SHA1 Message Date
Cyp 4a34b821ad Fix parts of UI that break if increasing MAX_FACTORY. 2011-01-04 22:32:52 +01:00
Per Inge Mathisen c4d4dcd73a The colour chooser is now a proper button. The double-click kick is now gone (use the button). Kick button moved to team chooser.
The kick button is removed for single player and AIs and non-hosts (made no sense). The position chooser now allows you to click
on any other player to switch places. Removed broken ping symbol. Removed broken ranking symbol. Make sure we flush the connection
with the kick message before we cut it. Fix reception of kick message so that we do not crash when we do receive them. ticket:2435
2011-01-04 18:51:15 +01:00
Cyp 734d52984d Set bsocket = NULL when host drops, hopefully reduce the chance of crashing. 2011-01-01 23:24:25 +01:00
Cyp 738a1fc38c Strip "Class::" from "Class::myFunction" when compiling with MSVC, in syncDebug().
Other compilers don't add the "Class::".
2011-01-01 21:28:13 +01:00
buginator c10886b7b1 Change (HANDLE)(HANDLE)hProcess to (HANDLE)hProcess 2011-01-01 14:17:16 -05: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
buginator 1169f20b91 Merge branch 'master' of github.com:Warzone2100/warzone2100
* 'master' of github.com:Warzone2100/warzone2100: (41 commits)
  Remove some unused legacy code from the old terrain renderer and TERRAIN_VERTEX.
  Die, ivis_common, die\!
  Remove some unnecessary oil resource hacks, including flattening to terrain. Please do not put oil resources on sloped ground. It looks stupid even when flattened.
  Fix misspelling of 'guard tower' in PIE file name to match similar rename in wzgm.
  Remove the unused specular parameter to pie_Draw3DShape. It was always WZCOL_BLACK.
  Remove pietoaster
  Define the default fog colour in the palette file instead of hard-coded.
  Remove the "AI experience" code, which has not been used by the last four AI scripters. Existing savegames may be broken by this.
  Inline pie_SetTranslucencyMode() and remove the entirely superfluous TRANSLUCENCY_MODE abstraction.
  Merge the ivis_common and ivis_opengl directories, only five years and two months after I originally split them apart.
  simplipie: Add warning when not all polygons in a mesh do not use the same number of frames for texture animation.
  Merge the two variants of piestate.cpp; it too confusing to keep two files with the same name doing almost the same thing.
  Slight optimization: Now we draw the entire model within the same glBegin .. glEnd pair.
  Remove support for non-triangle polygons in model files.
  simplipie: Fix error when fixing face culling and tessellation at the same time.
  Tessellate features, effects and other models.
  Tessellate components.
  Tessellate all structure models.
  simplipie: Fix missing space in frame animation directive print out.
  simplipie: Add support for triangle tessellation
  ...
2011-01-01 12:29:17 -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
cybersphinx d2499aa9cc Die, ivis_common, die\! 2011-01-01 14:51:53 +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
Freddie Witherden 7b7b2b8e0e Fix a section-titling bug in the inifile code. 2010-12-30 21:17:18 +00:00
Freddie Witherden 5362cf2217 Fix compilation under GCC 4.5.
Previously, _WZ_ASSERT_ARRAY_EXPR_FUNCTION would return NULL
((void *) 0) for a function with a declared return type of char.
2010-12-30 20:45:35 +00:00
Cyp 5c4b81fa63 Make C++ WZ_ASSERT_STATIC_STRING a compile-time check without using typeid, make C++ WZ_ASSERT_ARRAY_EXPR work. 2010-12-30 00:58:55 +01:00
Freddie Witherden fca489ce42 Iniparser rewrite as per ticket #2012.
This code completely replaces the old iniparser with a new,
cleaner API.  All existing uses of the old code have been ported.

The Xcode and MSVC projects will require updating.
2010-12-29 21:17:12 +00:00
Per Inge Mathisen 7d1e719e13 Remove hard-coded limit for number of polygons in models. This limit is now only relevant for delivery point, oil resource and wall models. 2010-12-29 12:46:10 +01:00
Per Inge Mathisen 086a0fd4bc Add new PIE flag 0x00001000 that specifies that the PIE model should not be stretched to fit to terrain. 2010-12-29 10:57:38 +01:00
Per Inge Mathisen 4eed3bef79 Remove the now obsolete distinction between configurable FPS rates for MP and campaign. Up the maximum FPS to 500 from 200.
To change the max fps rate now change only the "framerate" line. Patch reviewed by Cyp.
2010-12-29 00:24:45 +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
buginator e2c7c49a21 Merge branch 'master' of github.com:Warzone2100/warzone2100
* 'master' of github.com:Warzone2100/warzone2100:
  Apply patch — kill some more warnings, and fix a few issues that Buginator found.
2010-12-24 20:02:10 -05:00
buginator e8d5913372 Apply patch — kill some more warnings, and fix a few issues that Buginator found. 2010-12-25 00:38:06 +01:00
buginator c43e15a14b Merge branch 'master' of github.com:Warzone2100/warzone2100
* 'master' of github.com:Warzone2100/warzone2100:
  Kill idiotic "'BOOL' : forcing value to bool 'true' or 'false' (performance warning)." warning.
2010-12-23 15:53:36 -05:00
Cyp 6a6b23e13b Kill idiotic "'BOOL' : forcing value to bool 'true' or 'false' (performance warning)." warning.
The compiler probably wasted more cpu cycles printing the warning than the conversion ever would.

Refs ticket:2431.
2010-12-23 21:38:18 +01:00
buginator e1eb1a1889 Merge branch 'master' of github.com:Warzone2100/warzone2100
* 'master' of github.com:Warzone2100/warzone2100:
  Fixes ticket:2430 without breaking the cross compile.
2010-12-23 13:38:53 -05:00
Cyp 16a1582aa5 Fixes ticket:2430 without breaking the cross compile.
Error   27      error C2664: 'BOOL (HANDLE,DWORD,PVOID,DWORD,PDWORD)' :
cannot convert parameter 1 from 'DWORD' to 'HANDLE'

Since it cannot convert (HANDLE)hProcess to a HANDLE, the obvious solution is to add a cast: (HANDLE)(HANDLE)hProcess.

Error   26      error C2664: 'BOOL (HANDLE,DWORD,PVOID,DWORD,PDWORD)' :
cannot convert parameter 2 from 'void *' to 'DWORD'
../../../../lib/exceptionhandler/exchndl.cpp: In function ‘BOOL IntelStackWalk(DWORD, void*, void*, _tagSTACKFRAME*, CONTEXT*, BOOL (*)(void*, const void*, void*, DWORD, DWORD*), void* (*)(void*, DWORD), DWORD (*)(void*, DWORD), DWORD (*)(void*, void*,
_tagADDRESS*))’:
../../../../lib/exceptionhandler/exchndl.cpp:599: error: invalid conversion from ‘long unsigned int’ to ‘const void*’

Since it needs a void *, no, I mean a DWORD, no, I mean a void *, the obvious solution is to add a cast: ...id *)(DWORD)(void *)(DWORD)(void *)StackFrame->AddrFrame.Offset
2010-12-23 13:06:13 +01:00
buginator 012029622d Merge branch 'master' of github.com:Warzone2100/warzone2100
* 'master' of github.com:Warzone2100/warzone2100:
  Try to fix the cross compile.
  Fix releaseBranch script to handle netplay.cpp instead of netplay.c.
  Simplify targetting projectiles.
  Fix WZ_DECL_CONST -> WZ_DECL_PURE on src/vector.h.
  Clean up some weird invalid PROJECTILE * -> BASE_OBJECT * casts.
  Make structures rectangular instead of circular for the purposes of projectile collision detection.
  Remove SPACETIME C wrapper around Spacetime.
  Remove redundant memset()s in loadGame.
  Use default constructors instead of memset for W_INIT (widget init) derivatives.
  Fix game saving/loading.
  Reset constructor upgrade between games.
  Remove ORDER_LIST_MAX and the corresponding 10 order limit to droid order queues.
  Use --debug=memory to see sizeof(...) for the various object types.
2010-12-22 22:47:40 -05:00
Cyp 76690bbc4b Try to fix the cross compile. 2010-12-23 03:14:32 +01:00
Cyp c7e9e05d30 Fix WZ_DECL_CONST -> WZ_DECL_PURE on src/vector.h.
Think not allowed to use WZ_DECL_CONST on functions that take references to parameters. The compiler should be able to optimise inline functions properly even without any WZ_DECL_BLAH, anyway.
2010-12-23 01:42:18 +01:00
Cyp c875c639b7 Clean up some weird invalid PROJECTILE * -> BASE_OBJECT * casts.
And make some functions take SIMPLE_OBJECT * instead of void *.
2010-12-23 01:42:18 +01:00
Cyp 76430c583f Use default constructors instead of memset for W_INIT (widget init) derivatives.
Accidentally fixed 5 memsets of W_FORMINIT, which were incorrectly using sizeof(W_BUTINIT). (The sizeof() was smaller than the object, so it didn't overflow, at least.)

And removed an ugly memset of a DROID.
2010-12-22 17:26:39 +01:00
buginator 29e7585d9f Merge branch 'master' of github.com:Warzone2100/warzone2100
* 'master' of github.com:Warzone2100/warzone2100:
  Fix building with gcc 4.5.1.
  Add (unsigned) cast in mixed-enum switch, to prevent compiler errors.
2010-12-21 19:25:14 -05:00
Cyp 7c9b7acae1 Fix building with gcc 4.5.1.
Added unsigned casts to suppress compiler warnings due to enum abuse.
2010-12-22 00:58:59 +01:00
Cyp 9f160d95c0 Add (unsigned) cast in mixed-enum switch, to prevent compiler errors.
(Not sure which compiler version it was.)
2010-12-22 00:44:52 +01:00
buginator 7fbf88885e Merge branch 'master' of github.com:Warzone2100/warzone2100
* 'master' of github.com:Warzone2100/warzone2100:
  Simplify normalsOnTile in src/lighting.cpp.
  Make Vectors fun to use. Instead of Vector2f_Sub(Vector2f_Mul(myVector, myScalar), myOtherVector), write myVector*myScalar + MyOtherVector.
  Fix GLee.cpp → GLee.c in Linux and Windows build scripts.
  Normalise the warnings for the mac builds.
2010-12-21 18:43:21 -05: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 760d19f776 Change Glee back to c; eliminates warnings in the mac build. 2010-12-21 15:18:18 -05:00
buginator 238cbaad90 Merge branch 'master' of github.com:Warzone2100/warzone2100
* 'master' of github.com:Warzone2100/warzone2100:
  Change Glee back to c; eliminates warnings in the mac build.
  Make OBJECT_POSITION inheritance explicit.
  Remove extern "C" {} from most places, due to longer being needed.
  Try to fix cross-compile errors.
  Fix strict-aliasing warnings reported by dak180.
  Don't fail to build when building from tarballs.
2010-12-21 12:58:40 -05:00
dak180 22285a7528 Change Glee back to c; eliminates warnings in the mac build. 2010-12-21 12:30:41 -05:00
Cyp 23d5dcd5dd Remove extern "C" {} from most places, due to longer being needed. 2010-12-21 17:20:48 +01:00
Per Inge Mathisen 94a4e92b7e qt branch: Inline the now superfluous wzGetClipboard() cpp-wrapper. 2010-12-21 16:57:38 +01:00
Cyp bdc7f9d72a Try to fix cross-compile errors. 2010-12-21 16:34:04 +01:00
Cyp 49c0f1cd8b Fix strict-aliasing warnings reported by dak180. 2010-12-21 16:33:45 +01:00
buginator a59e7c946c Merge branch 'master' of github.com:Warzone2100/warzone2100
* 'master' of github.com:Warzone2100/warzone2100:
  Fix usage of QString::remove which something completely different when given one parameter.
  Allow clicking on blueprints with extra trucks.
2010-12-21 01:59:50 -05:00
Cyp 8b4318dd23 Fix usage of QString::remove which something completely different when given one parameter. 2010-12-21 04:04:15 +01:00
Cyp 91ee0f7655 Merge branch 'master' into qt
Conflicts:
	lib/framework/frame.h
	lib/framework/types.h
	lib/widget/editbox.cpp
	macosx/Warzone.xcodeproj/project.pbxproj
	macosx/configs/Warzone-Debug.xcconfig
2010-12-21 03:59:22 +01:00
buginator 5f7ea7ef69 Merge branch 'master' of github.com:Warzone2100/warzone2100
* 'master' of github.com:Warzone2100/warzone2100:
  Remove the NETMESSAGE wrapper around NetMessage.
  Fix walls being built with incorrect orientation when camera is rotated.
  Simplify lib/widget/editbox.cpp, using QString.
2010-12-20 19:16:34 -05:00
Cyp b8ae806f29 Remove the NETMESSAGE wrapper around NetMessage.
It wasn't compiling on Windows anymore, anyway — fixes ticket:2426...
2010-12-21 01:10:57 +01:00
Cyp 4963dfd1bb Simplify lib/widget/editbox.cpp, using QString.
This shortens editbox.cpp by 23.5%, and allows setting the cursor position by clicking in the edit box.
2010-12-21 01:10:57 +01:00
buginator 1b28712974 Merge branch 'master' of github.com:Warzone2100/warzone2100
* 'master' of github.com:Warzone2100/warzone2100:
  68 warnings on the wall, take some down, grind them to dust (with help from per), 40 warnings on the wall.
2010-12-20 17:35:49 -05:00
dak180 dcca83dd2a 68 warnings on the wall, take some down, grind them to dust (with help from per), 40 warnings on the wall. 2010-12-20 17:28:01 -05:00
buginator d6a38ab0e1 Merge branch 'master' of github.com:Warzone2100/warzone2100
* 'master' of github.com:Warzone2100/warzone2100:
  Remove MersenneTwister C wrapper.
  Remove unused and untested PointTree C interface.
  Clean up (BASE_OBJECT **) casts, which the compiler is allowed to do funny optimisations with.
  Remove bool, true, false defines, add NETauto() and move PACKAGED_CHECK somewhere more appropriate.
  Contrary to the information I had fstack-protector seems to need 10.6 min to build.
2010-12-20 16:04:02 -05:00
Cyp 68b50aecda Remove bool, true, false defines, add NETauto() and move PACKAGED_CHECK somewhere more appropriate. 2010-12-20 21:41:51 +01:00
buginator 540e26941b Merge branch 'master' of github.com:Warzone2100/warzone2100
* 'master' of github.com:Warzone2100/warzone2100:
  Remove use of %zd and %zu, since Windows felt like using %Id and %Iu instead.
  Try to fix isatty linkage errors on Windows.
2010-12-19 23:48:01 -05:00
Cyp 146599b05c Remove use of %zd and %zu, since Windows felt like using %Id and %Iu instead.
Fixes ticket:2422.
2010-12-20 05:33:08 +01:00
Cyp d9ce212728 Try to fix isatty linkage errors on Windows.
Hope this works, somehow.
2010-12-20 05:08:58 +01:00
Cyp 2f780609a2 Try to fix isatty linkage errors on Windows.
Hope this works, somehow.
2010-12-19 22:50:45 -05:00
Cyp c95692c05b Update *.vcproj files from ticket:2421.
And removed extern "C" {} from some headers, apparently Windows can't handle extern "C" consistently.
2010-12-20 04:25:01 +01:00
Cyp 0c40449e37 Make Windows' ResetRPTDirectory function compile.
(According to ticket:2421.)
2010-12-20 02:51:28 +01:00
Cyp 180d0bb62a Try to fix one more Windows-specific build error. 2010-12-20 02:12:09 +01:00
Cyp 57d9a7dd6f Add global using std::abs, in order to try to find and fix Windows-specific build errors.
Why can't certain compilers be standards-compliant?

(Why do people take the absolute value of something unsigned, anyway, even though it should be permitted.)
2010-12-20 01:46:19 +01:00
Cyp 36484909d6 Try to fix Windows exception handler and makefiles. 2010-12-20 01:07:12 +01:00
Cyp e0ee1eec3c Use std::complex<double>, which is much more readable than the alternative. 2010-12-19 21:59:19 +01:00
Cyp bd6b96315b Merge branch 'cpp' into qtcpp
Conflicts:
	lib/framework/Makefile.am
	lib/framework/frame.cpp
	lib/framework/framework.vcproj
	lib/framework/input.cpp
	lib/ivis_opengl/piestate.cpp
	lib/ivis_opengl/screen.cpp
	lib/ivis_opengl/textdraw.cpp
	lib/widget/Makefile.am
	lib/widget/editbox.cpp
	lib/widget/scrap.cpp
	lib/widget/widget.vcproj
	macosx/Warzone.xcodeproj/project.pbxproj
	src/Makefile.am
	src/main.cpp
	src/makefile.win32
2010-12-19 16:51:27 +01:00
Cyp 0d2e373456 Merge branch 'master' into cpp
Conflicts:
	lib/widget/bar.cpp
	lib/widget/editbox.cpp
2010-12-19 16:24:38 +01:00
Cyp bd2f6fb7ce Use constructors/destructors for WIDGETs, unduplicating a tonne of probable copy/paste abuse in the process. 2010-12-19 16:16:17 +01:00
Cyp 7a49623b7f Use new/delete for allocating/deallocating WIDGETs. 2010-12-19 00:35:15 +01:00
Cyp 9f43c1f681 Make WIDGET and W_INIT inheritance explicit. 2010-12-18 23:13:27 +01:00
Cyp 0fe13d055a Print distances and speeds in terms of tiles, not in 1/128ths of tiles.
Changelog: Print distances and speeds in terms of tiles.
2010-12-18 20:01:09 +01:00
Cyp c465f161bf Fix keyboard input being swallowed due to missing events such as SDL_KEYUP.
This is due to a seemingly undocumented bug and/or feature in SDL, where SDL_EventState and SDL_SetEventFilter mysteriously discard all pending events.

The following SDL code in SDL_EventState and SDL_SetEventFilter discards all pending events, with a comment saying it does so:
    while ( SDL_PollEvent(&bitbucket) > 0 )
        ;
There appears to be no documentation of this fact anywhere outside the comment in the SDL code.

I am not aware of any logical reason why enabling events with SDL_EventState should cause less events to be received than otherwise.
2010-12-18 03:07:52 +01:00
Cyp d9813b37e5 Fix crash when dumping too much syncDebug. 2010-12-17 21:46:35 +01: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
dak180 0364933736 Make the xcode project work again. 2010-12-16 21:06:33 -05:00
Cyp 80cc971b61 Merge remote branch 'origin/master' into qt
Fixed gameTime → realTime in lib/framework/wzapp.cpp, since the menus were messed up due to interpreting everything as a double-click.

Conflicts:
	lib/framework/debug.c
	lib/framework/input.c (became wzapp.cpp)
	lib/ivis_opengl/screen.c
	lib/ivis_opengl/screen.h
	lib/ivis_opengl/textdraw.c
	macosx/Warzone.xcodeproj/project.pbxproj (used qt version)
	src/display.c
	src/main.cpp
	src/terrain.c
2010-12-17 00:36:10 +01:00
Cyp 3f6ecec025 Replace sqrt(x) with sqrt((double)x) to make broken compilers happy. 2010-12-16 23:28:57 +01:00
Cyp 12e8e5bc80 Rename *.lex.c to *.lex.cpp and *.tab.c to *.tab.cpp. 2010-12-16 23:28:56 +01: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
Cyp 0fe191778b Actually check the mouse position when clicking, instead of just assuming people clicked wherever the mouse moves to later.
In theory, this should make the UI usable, even on machines that don't consistently get 10000 FPS.

Because WZ widgets are weird, just make the widgets pretend that the mouse stopped moving after clicking or releasing in a given frame.

If you click twice in the same frame, the second widget will still greedily steal the mouse click from the first widget.

Changelog: Try to improve UI responsiveness under low framerates.
2010-12-16 22:20:09 +01:00
dak180 1e6bce9594 Merge remote branch 'refs/remotes/nanotech/master' 2010-12-11 11:52:33 -05:00
cybersphinx dd4391990d Get rid of a few unnecessary Makefile.ams. 2010-12-11 16:41:57 +01:00
cybersphinx 7a672cab30 Fix includes for generated files. 2010-12-11 15:58:39 +01:00
NanoTech 3ccc629eab Replace legacy Carbon dialogs with Cocoa NSAlerts.
Also don't link the main binary with Carbon at all anymore.
2010-12-10 23:39:22 -06: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
Cyp f5893a7fe5 Don't include backtraces in syncDebug CRCs.
This should allow using syncDebugBacktrace() without causing a desynch if some clients don't support them or print them differently.
2010-12-08 18:00:08 +01: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 00c92cbdd7 Fix bug introduced in 09ea0be7c30236809536db332be78b2967d3114d Changelog: Fix kicking of non-hosts who didn't have default color values.
Only change colors if you are the host on the setup screen.
Fixes ticket:2329
(cherry picked from commit fd2843e6431e43cc72b635c422fd18bb19d42c47)

Conflicts:

	lib/netplay/netplay.c
2010-12-06 21:13:54 -05:00
buginator 0049223ccb Use the host's SP color as the default color when hosting games. (cherry picked from commit 09ea0be7c30236809536db332be78b2967d3114d)
Conflicts:

	lib/netplay/netplay.c
2010-12-06 21:13:52 -05:00
buginator bbcad634bc Fix error messages / formatting. (cherry picked from commit 461b8c820cffe97077568f2c25fa480ffec131e4) 2010-12-06 21:13:44 -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
buginator 707eed834b On LOG_ERROR, notify people in-game via the console and a sound effect that there was a error.
It will only do this once every ~30 secs since the last LOG_ERROR was generated to prevent spamming.

This is to help windows and mac users know that there was a error condition, and they need to check their logs.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11702 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 9e4688803ac044a3f9b20bbd4f8b4cc0c7cbc01e)

Conflicts:

	src/display3d.c
2010-12-06 21:13:32 -05:00
Cyp bf38eb51ea Add branch switching hack to remaining Makefile.am files. 2010-12-06 00:19:30 +01: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
Per Inge Mathisen 28624d0c46 qt branch: If OpenGL initialization fails, explain to the user why the program does not start. See ticket:2336 2010-12-04 15:11:56 +01:00
Cyp 5fc3f6b5d7 Fix some GUI dependence on gameTime, and make camera hovering and scrolling be more numerically stable.
The exact solution to the camera height  d²/dt² height = -ACCEL_CONSTANT * (height - desiredHeight) - VELOCITY_CONSTANT * d/dt height  ended up a bit complex.
2010-12-01 13:43:06 +01:00
cybersphinx d6e2ad0c56 Put ifdefs around Linux-specific header/function.
Closes #2366.
(cherry picked from commit 2d4d2d807d98fd9cd3b49891faf0b34976330915)
2010-11-30 01:56:05 +01:00
Cyp 2ad6ff0855 Fix desynch when player leaves, due to clearing buildings at different gameTimes. 2010-11-29 12:48:51 +01:00
Cyp a8f6faaed0 Fix spurious desynch at gameTime 102, due to not clearing desynch logs between games.
Also, no need to duplicate function name strings, which are link-time constants.
2010-11-29 01:45:19 +01:00
cybersphinx b7cb308f30 Allow process to be traced for the crash handler.
Some distributions disallow this (newer Ubuntu for example), so the gdb call
didn't output anything useful. Based on a patch by Safety0ff.
(cherry picked from commit 023ea5b2cea6f57b6690ac7d25fd472aefc911eb)
2010-11-24 16:49:50 +01:00
Buginator 83f1a892e1 Only clear player name when needed.
(When player drops / leaves, you will still see their name instead of the default color name).

Also fix a log line.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11495 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 847edec81737e6c6a42e4c91aede5c99b9a755ce)
2010-11-22 16:06:29 +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
safety0ff 8c9e7d5bd0 Fix an invalid pointer dereferencing issue in the script events system.
Closes #2300.
2010-11-21 15:48:31 -05:00
safety0ff 16681df600 Revert "Fix another memory clobbering issue. (dereferenced pointer)"
This reverts commit 1a6fb8a7547f23ce2bd7af153ac839cba999e2b0.
2010-11-21 15:48:31 -05:00
Cyp 60d7cb6127 Merge remote branch 'origin/master' into qt
Conflicts:
	.hgignore (manual merge)
	lib/framework/wzapp_c.h (used qt)
	macosx/Warzone.xcodeproj/project.pbxproj (used qt)
	po/*.po (used master)
2010-11-21 21:46:08 +01:00
Cyp ea1e76a09d Handle floating point connector coordinates as well as integer (ignores the floating point part).
Correctly handles "42 127 -3", "42.999 127. -3.1415926535897932384626" and "42... 127.0.0.1 -3.0..0...0" as (42, 127, -3).
Doesn't handle the floating point and integer mixture "42 127.0 -3".
2010-11-21 11:38:36 +01: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 a0ea827340 Fix VTOLs teleporting to a planet 2.5 million tiles up, due to missing cast before division in last commit. 2010-11-19 12:42:19 +01:00
Cyp 53da8ac0d0 Fix desynch due to deltaGameTime not being deterministic during message processing.
Fixed by setting deltaGameTime = 0 in src/loop.c, after each game-state update.
Also, cleaned up lib/gamelib/gtime slightly.

To reproduce locally, start 2 clients, set one to 20x speed, the other to normal speed, and create droids on uneven terrain using the debug menu.
2010-11-18 10:56:41 +01:00
Cyp 3359fac395 Fix broken moveCalcBlockingSlide comparisons, and make DEG(42) evaluate to 7645 without use of floating point.
After making DEG avoid using float (unless given a float argument), had to fix moveCalcBlockingSlide to avoid out-of-range-comparison error-warnings.

The moveCalcBlockingSlide's int16_t instead of uint16_t was introduced in 6c811c1ecb.

Also, remove lots of unused stuff.
2010-11-16 18:33:20 +01:00
Cyp a0c1c9de0d Change droid experience from float to uint32_t.
Less floats generally reduces the risk of desynchs, don't know if the droid experience caused desynchs, but it might have been possible. Added experience to syncDebugDroid.

Also, fixed QualityFactor and droidResistance integer truncation and made single-player skirmish damage not affected by difficulty level either.
2010-11-16 14:18:01 +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
Cyp 7df59bafdb Fix desynch when constructing and demolishing the same structure at the same time. 2010-11-15 14:31:28 +01:00
Cyp 40602d428e Verify in syncDebug that generated paths are identical. 2010-11-15 13:11:19 +01:00
buginator df83ed0caa Bump netcode's NETCODE_VERSION_MINOR to sync with new testing build. 2010-11-14 22:38:20 -05:00
buginator 341d4d3bf8 Use 'Warzone 2100 master' as the default directory, and the default crash handler (on windows) directory.
fixes ticket:2317
2010-11-14 22:30:45 -05:00
buginator f8517a7716 Fix another memory clobbering issue. (dereferenced pointer)
Patch Author: Safety0ff
fixes ticket:2300

Original detective work done by Ai_Tak (ticket:1656)

Signed-off-by: buginator <buginator@gna.org>
(cherry picked from commit 1a6fb8a7547f23ce2bd7af153ac839cba999e2b0)
2010-11-13 13:40:58 -05: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 be5285f916 Fix duplicate structure IDs by removing GAME_BUILD message type.
The only remaining purpose of GAME_BUILD was to hackishly change structure IDs around, which is not useful since structure IDs are already synchronised.

Changelog: Fix inability to select or target some structures due to duplicate structure IDs.
2010-11-07 14:16:56 +01:00
buginator 5a35eb9f89 CHANGELOG: Correctly handle unicode strings for edit boxes.
fixes ticket:2209
(cherry picked from commit 3012fde61ef92151e0ec5125551a7b3481f05fb8)

Conflicts:

	lib/widget/editbox.c
2010-11-06 15:59:57 -04:00
Per Inge Mathisen 1617b4c3d7 Add new keyword WZ_DECL_ALWAYS_INLINE to label functions that we always want to inline, even when compiling in debug mode.
Also manually inline map tile lookups in the danger map code for maximum performance (avoiding some checks).
2010-11-02 21:12:58 +01:00
Per Inge Mathisen 153c5c5613 Try to fix signed/unsigned comparison bugs in newly converted c++ code. 2010-11-02 21:06:23 +01:00
cybersphinx 99486cb694 Add Turkish translation by Ayhan Görgülü.
Closes #2261.
2010-11-02 15:34:00 +01:00
Buginator 0702fa9eb5 Show map / game name / hosted by in the tooltip for the lobby
closes ticket:2121

This does *NOT* break GAMESTRUCT compatibility.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11546 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 1119dada6868433f6840dd1fe174a7aa3858b081)
2010-11-02 15:30:36 +01:00
Cyp 33c25602f7 Bump netcode version. 2010-10-30 22:59:27 +02:00
Cyp d41a6078d4 Bump netcode version for testing build. 2010-10-30 22:57:54 +02:00
cybersphinx 4f411fd096 Add stdlib.h to fix compilation. 2010-11-02 01:18:45 +01:00
Cyp 95b4cff1b8 Merge remote branches 'origin/qt-trunk' and 'origin/master' into qt
Conflicts:
	macosx/Warzone.xcodeproj/project.pbxproj
2010-10-31 22:27:42 +01:00
safety0ff bffee9d99b Add workaround for corrupted Qt text. 2010-10-30 16:49:27 -04:00
Cyp 6e1771e319 Merge remote branch 'origin/master' into qt
Conflicts:
	lib/ivis_common/piemode.h
	lib/ivis_common/rendmode.h
	lib/ivis_common/textdraw.h
	macosx/Warzone.xcodeproj/project.pbxproj
	macosx/configs/Project-All.xcconfig
2010-10-30 20:04:42 +02:00
Per Inge Mathisen aa1531707a Remove unused text drawing code to reduce legacy porting woes. 2010-10-30 19:18:50 +02:00
Per Inge Mathisen aaedaabf60 Speed up text rendering for console messages by rendering to pixmaps instead of re-rendering the strings themselves for every display frame.
This increases actual display frames per second here by 100% when showing a full console.
2010-10-30 17:06:36 +02:00
Per Inge Mathisen 828c0f72ae Revert 9e29aa5210 which reverted the removal of QuesoGLC, to start
working on fixing the font rendering with Qt.
2010-10-30 13:20:16 +02:00
Cyp ad4a38a1be Bump netcode version.
Also, remove unused NETCODE_HASH.
2010-10-26 10:11:04 +02: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
Per Inge Mathisen b7c9a369d6 Add new backdrop from forum member jorzi. 2010-10-24 19:55:57 +02:00
Cyp 5c431a36d1 Convert muzzle location from floats to integers. 2010-10-23 18:02:56 +02:00
Cyp e8ebb11d4a Remove NETnull() function, which was potentially confusing.
NETnull() was equivalent to uint32_t zero = 0; NETuint32_t(&zero);, which no longer adds/removes 4 bytes of padding as advertised.
2010-10-23 18:02:56 +02:00
Cyp fcdba754c4 Introduce ModeQueue and ModeImmediate as an alternative to playing with bMultiMessages.
Makes campaign queue some messages, and fixes cancelling production queues in campaign.
2010-10-22 18:13:04 +02:00
buginator d0217d5d4e Commit patch from ticket:2110 "Mousewheel menu patch"
Author: noccy
Thanks for the patch!

Format and additional changes by me.

Close ticket:2110
(cherry picked from commit e979b6ad620f27e746f119fefd1f613bbb61b8a4)

Conflicts:

	src/keybind.c
	src/keybind.h
2010-10-21 00:55:55 -04:00
Buginator 58c0ceec95 Fix edit boxes so they correctly calculate the string's pixel borders.
Motivation of this patch was because of some whiny guy on IRC. ;)

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11668 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 81f07188a3693007621496ac9fa0c0e2e8b24b87)
2010-10-18 22:23:59 -04:00
Buginator 0be5f2b6e9 Add code to look for "novideo.ogg" refs ticket:2052
but don't upload the novideo.ogg yet, since we don't have a clear winner.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11566 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 7f6ea5d1a332b7bc535a4a83768b0b90d543df1c)
2010-10-18 22:23:55 -04:00
Buginator f4c3d7ec8e Change ASCII_NEWLINE from '@' to '`'
This enables people to use "@" in chat.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11545 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit 10217901eb10fc652c3c8eeb2eba2f519b1f5b0f)
2010-10-18 21:47:48 -04:00
Buginator ccd5555275 Remove a (MSVC only) debug() line that spammed way too much.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/2.3@11321 4a71c877-e1ca-e34f-864e-861f7616d084
(cherry picked from commit a2a11fccd74485f76dbb098c0bb73de6cc0bd708)
2010-10-18 21:37:48 -04:00
buginator e09e8ac4fe If resource was not loaded, then don't continue on, error out.
(cherry picked from commit aa8bf289b8f4fad5d6122a43432521dbf2e2cc92)
2010-10-17 19:32:53 -04:00
buginator a11d60774e Fix MSVC builds 2010-10-17 18:46:06 -04:00
Cyp 49e9780f41 Fix spurious out-of-synch messages when pausing in single-player mode.
This was caused by forgetting to set the delta tick time to 0 when paused. Don't know whether fixing this fixes anything else.
2010-10-16 17:55:01 +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 681988a5d4 Remove unused constant PIE_NO_CULL
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
Giel van Schijndel d6c7690f02 trig: don't #include "math_ext.h" as trig.h doens't use it
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-09 17:33:45 +02:00
Giel van Schijndel a8fdd2c068 trig: declare all trigonometric functions as pure
Mark the prototypes of all (fixed point) trigonometric functions as
pure.  This declares that these functions don't have any side-effects.

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-09 17:30:53 +02:00
Giel van Schijndel 83aacc042b Get rid of unused constant TRIG_DEGREES
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-09 16:54:09 +02:00
Cyp 0794c5a674 Merge remote branch 'origin/master' into qt-trunk
Conflicts:
	.hgignore
	configure.ac
	lib/framework/SDL_framerate.h
	lib/framework/cursors.h
	lib/framework/endian_hack.h
	lib/framework/frame.c
	lib/framework/input.c
	lib/framework/input.h
	lib/framework/opengl.h
	lib/framework/wzapp_c.h
	lib/gamelib/gtime.c
	lib/gamelib/gtime.h
	lib/ivis_common/Makefile.am
	lib/ivis_common/ivispatch.h
	lib/ivis_common/png_util.h
	lib/ivis_opengl/screen.c
	lib/ivis_opengl/screen.h
	lib/netplay/netlog.c
	lib/netplay/netlog.h
	lib/netplay/netplay.c
	lib/netplay/netplay.vcproj
	lib/netplay/netsocket.cpp
	lib/netplay/nettypes.c
	lib/sequence/sequence.c
	lib/sound/oggvorbis.c
	lib/widget/scrap.c
	macosx/Resources/wzlocal/lt.lproj/InfoPlist.strings
	macosx/Warzone.xcodeproj/project.pbxproj
	macosx/configs/Bison-Debug.xcconfig
	macosx/configs/Bison-Release.xcconfig
	macosx/configs/FetchPrebuilt.sh
	macosx/configs/FetchSource.sh
	macosx/configs/Project-All.xcconfig
	macosx/configs/SDLmain-All.xcconfig
	macosx/configs/SDLmain-Debug.xcconfig
	macosx/configs/SDLmain-Release.xcconfig
	macosx/configs/Warzone-All.xcconfig
	macosx/configs/Warzone-Debug.xcconfig
	po/cs.po
	po/da.po
	po/de.po
	po/en_GB.po
	po/es.po
	po/et_EE.po
	po/fi.po
	po/fr.po
	po/fy.po
	po/ga.po
	po/hr.po
	po/it.po
	po/ko.po
	po/la.po
	po/lt.po
	po/nb.po
	po/nl.po
	po/pl.po
	po/pt.po
	po/pt_BR.po
	po/ro.po
	po/ru.po
	po/sk.po
	po/sl.po
	po/uk_UA.po
	po/zh_CN.po
	po/zh_TW.po
	src/astar.c
	src/data.c
	src/fpath.c
	src/frontend.c
	src/hci.c
	src/main.cpp
	src/move.c
	src/move.h
	src/multibot.c
	src/multiint.c
	src/multijoin.c
	src/multiplay.c
	src/multisync.c
	src/terrain.c
2010-10-09 14:44:15 +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
Giel van Schijndel c95f0f8be3 Replace [xy]pshift with the single constant it ever contains
The variables [xy]pshift only ever contain the constant value `10`, so
instead of bothering to keep the variables around use the
STRETCHED_Z_SHIFT constant.  This constant serves the same purpose as
[xy]pshift (only for the Z coordinate) and is defined to `10` as well.

Signed-off-by: Giel van Schijndel <giel@wz2100.net>
2010-10-05 20:14:55 +02:00
Giel van Schijndel 9870192aa1 Merge r11685 from trunk into the Qt branch: Add lib/framework/opengl.h to noinst_HEADERS
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11687 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:35:11 +02:00
Giel van Schijndel d01a61bdc1 Remove empty function `trigShutDown`
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11709 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:42 +02:00
Giel van Schijndel 3390509fe7 piematrix: use floats instead of fixed point DEG degree values for rotations
Allow passing of degrees as floats to the pie_MatRot[XYZ] functions.

This commit further helps in getting rid of fixed point math.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11708 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:42 +02:00
Giel van Schijndel a6cb949c97 piematrix: prepare for removal of fixed point math
* Change some of the PIE matrix functions to accept floating point
   values in the API.
 * Rename the badly named constant `_MATRIX_ID` to `Identitymatrix`

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11707 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:42 +02:00
Giel van Schijndel dc8623a6ec DrawText: Don't be overly pedantic in restoring the previous matrix-mode
Don't retrieve the current matrix mode prior to changing it, and restore
this mode after drawing text.  Instead rely on the assumption that the
current matrix mode is GL_MODELVIEW, which currently is a valid
assumption.

Reason for this change is that OpenGL retrieving the current matrix mode
isn't possible in OpenGL implementations without fixed pipeline, which
lack a matrix mode, e.g. OpenGL ES 2.0 and OpenGL 3.0.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11699 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:42 +02:00
Giel van Schijndel 0aa5d2cef8 Don't #include GLee.h where it isn't required
At places where we only need the ''regular'' OpenGL API, not any
extensions, don't #include GLee.h, #include lib/framework/opengl.h
instead.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11691 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:41 +02:00
Giel van Schijndel 27fb938877 opengl.h: get rid of the X11 macro `Status`
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11690 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:41 +02:00
Per Inge Mathisen 780f186dec Fix compile warning that complained about variable being potentially clobbered by longjmp.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11689 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:41 +02:00
Giel van Schijndel f363a02af7 Replace immediate-mode rendering with VA-based rendering
Almost completely (one corner case requires reading GL specs) replace
immediate-mode rendering with VA-based rendering by means of
glDrawArrays.

This, when completed, makes porting to OpenGL ES 2.0 and OpenGL 3.0
without backwards compatibility easier.

This closes #2172

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11686 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:41 +02:00
Giel van Schijndel d0e24c96cf Add lib/framework/opengl.h to noinst_HEADERS
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11685 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-20 18:34:41 +02:00
Giel van Schijndel a83560844c Merge r11677:11678 from trunk into the Qt branch: add a platform-abstraction header: `opengl.h`
Add a header to allow platform-indepent inclusion of the OpenGL API,
removing our dependency on SDL_opengl.h and consolidating
platform-specific code in that single header.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/branches/qt-trunk@11679 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-17 14:01:10 +02:00
Giel van Schijndel 09f6b46276 prevent redefinition of __glext_h__
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11678 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-17 14:00:58 +02:00
Giel van Schijndel 82ed96fd3b Add a platform-abstraction header: `opengl.h`
Add a header to allow platform-indepent inclusion of the OpenGL API,
removing our dependency on SDL_opengl.h and consolidating
platform-specific code in that single header.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11677 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-17 12:15:18 +02:00
Giel van Schijndel 8e000fa325 Replace #ifdef(APPLE) #include <$path/gl.h> sections with <SDL_opengl.h> which handles this already
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11671 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-16 11:05:20 +02:00
Giel van Schijndel b14221a289 Don't #include <GL/glu.h> where it's contents aren't used
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11669 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-15 10:12:20 +02:00
Christian Ohm 7ab97781ae Print the needed port when lobby communication fails.
git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11639 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-13 10:49:13 +02:00
Christian Ohm fadd32b1e6 Fix debug output on the console.
Check if there's a \n at the end, if not, append one. Before, it checked for a
\n anywhere in the string, and if there was, wouldn't append one.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11638 4a71c877-e1ca-e34f-864e-861f7616d084
2010-09-13 10:49:12 +02:00
Cyp 559ded3ec0 Fix switching players in single-player mode in debug menu. 2010-09-01 21:34:21 +02:00
Safety0ff d2cec06720 Fix CFURLRef leaks on Mac.
Closes #2009.

git-svn-id: https://warzone2100.svn.sourceforge.net/svnroot/warzone2100/trunk@11511 4a71c877-e1ca-e34f-864e-861f7616d084
2010-08-23 16:35:30 +02:00
Cyp e7c277c3d7 Fix VTOLs flying into hyperspace due to unsigned vertical velocity calculations.
Also, fix all signed-unsigned warnings in src/move.c.
2010-08-15 21:02:32 +02:00
Cyp 6f60e686ae Remove NETuint32_tSmall, make all uint32_t's small, except for one uint32_tLarge.
(The large is a CRC, and CRCs are usually large numbers.)
2010-08-15 21:02:32 +02:00