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
Freddie Witherden
72e5404db4
Improve formatting of cmdSelectSubDroids.
2010-12-26 16:29:53 +00:00
Cyp
e8b8abf4cb
Fix typo in last commit.
...
Places structures more gently, structures should no longer form craters in the ground when being placed down.
2010-12-26 16:17:03 +01:00
Cyp
2ee63abdc6
Remove strange asymmetric check in structure height calculation, remove float and add syncDebug for defense height.
...
Also, fix minor inconsistencies in structure map coverage calculations, which probably didn't change anything, since structures should always be aligned, anyway.
2010-12-26 15:51:26 +01: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
Cyp
9597a8f2f1
Try to make production interface behave less confusing.
...
Changelog: Production interface with looping production now shows how much will be built each loop iteration.
2010-12-24 01:17:38 +01:00
Cyp
e6cd8d8d64
Simplify production run code.
...
And fix production runs not being cleared when a structure is removed.
2010-12-24 01:17:38 +01:00
cybersphinx
3e9c0ef263
Italian translation update by Alpha93.
...
Closes #2408 .
2010-12-23 23:03:08 +01:00
cybersphinx
365dfe80d9
Turkish translation update by Ayhan Görgülü.
...
Closes #2418 .
2010-12-23 23:02:17 +01: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
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
Cyp
76690bbc4b
Try to fix the cross compile.
2010-12-23 03:14:32 +01:00
Cyp
0f3974c3d3
Fix releaseBranch script to handle netplay.cpp instead of netplay.c.
2010-12-23 02:40:49 +01:00
Cyp
3d7939e525
Simplify targetting projectiles.
...
Also, made projectile misses be in random directions instead of picking one of 8 directions.
2010-12-23 01:42:18 +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
85c08b05f9
Make structures rectangular instead of circular for the purposes of projectile collision detection.
...
Lasers hitting cyborg factories look less weird now.
Changelog: Structures are now rectangular for projectile collision detection, not round.
2010-12-23 01:40:30 +01:00
Cyp
93f4c3060b
Remove SPACETIME C wrapper around Spacetime.
2010-12-22 21:56:52 +01:00
Cyp
e1f3cdc7e7
Remove redundant memset()s in loadGame.
...
The same variables were memset()ted in loadStructureStats() and statsInitVars().
2010-12-22 21:08:16 +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
Cyp
a2665e12f7
Fix game saving/loading.
...
Broke in 49c0f1cd8b
. D'oh, was reversing random uninitialised pointers instead of reversing linked lists.
2010-12-22 16:26:07 +01:00
Cyp
7cb68dcfe7
Reset constructor upgrade between games.
...
Fixes desynch due to building at different speeds. Fixes ticket:2362.
Changelog: Fix construction speed upgrades being preserved even between games.
2010-12-22 11:15:45 +01:00
Cyp
4dd5e0dd91
Remove ORDER_LIST_MAX and the corresponding 10 order limit to droid order queues.
...
sizeof(DROID) -= 296; (On 64-bit platforms.)
Fixes a probable issue when dead droids are removed from order lists.
Changelog: Allow queueing of arbitrarily many orders instead of just 10.
2010-12-22 02:58:38 +01:00
Cyp
e7772e0b16
Use --debug=memory to see sizeof(...) for the various object types.
2010-12-22 02:50:21 +01: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
Cyp
3df719fc70
Simplify normalsOnTile in src/lighting.cpp.
...
Can probably be simplified further.
Original function was somewhat bloated.
Reviewed by coppercore.
2010-12-21 23:37:57 +01:00
Cyp
309398dd1d
Make Vectors fun to use. Instead of Vector2f_Sub(Vector2f_Mul(myVector, myScalar), myOtherVector), write myVector*myScalar + MyOtherVector.
...
Reviewed by Safety0ff.
2010-12-21 22:35:37 +01:00
Cyp
0a064c2470
Fix GLee.cpp → GLee.c in Linux and Windows build scripts.
...
And LPTCSTR → LPCTSTR in some Windows file, apparently LPTCSTR wasn't similar enough for it to compile, closes ticket:2428.
2010-12-21 22:13:25 +01:00
dak180
0c898fb097
Normalise the warnings for the mac builds.
2010-12-21 15:03:06 -05:00
dak180
22285a7528
Change Glee back to c; eliminates warnings in the mac build.
2010-12-21 12:30:41 -05:00
Cyp
e108efc8a1
Make OBJECT_POSITION inheritance explicit.
2010-12-21 17:33:05 +01:00
Cyp
23d5dcd5dd
Remove extern "C" {} from most places, due to longer being needed.
2010-12-21 17:20:48 +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
Cyp
4a16961c34
Don't fail to build when building from tarballs.
...
Apparently fixbrokendependencies doesn't get included in the tarballs, despite being committed.
2010-12-21 15:09:48 +01: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
66fef0da8d
Allow clicking on blueprints with extra trucks.
...
Fixes ticket:307.
Changelog: Trucks can now be ordered to help build by clicking on the green holograms.
2010-12-21 03:24:32 +01: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
6b2784882a
Fix walls being built with incorrect orientation when camera is rotated.
...
Fixes ticket:2321.
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
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
Cyp
7574f25f5b
Remove MersenneTwister C wrapper.
2010-12-20 21:41:52 +01:00
Cyp
4b9ed8b975
Remove unused and untested PointTree C interface.
2010-12-20 21:41:52 +01:00
Cyp
c29aa29ec4
Clean up (BASE_OBJECT **) casts, which the compiler is allowed to do funny optimisations with.
2010-12-20 21:41:52 +01: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
dak180
b1d681736d
Contrary to the information I had fstack-protector seems to need 10.6 min to build.
2010-12-20 11:35:05 -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