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.
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
* '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.
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.
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.
* '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.
* '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.
* '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.
* '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.
* '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.
* '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.
* '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.
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.)
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.
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.
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.
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
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
The exact solution to the camera height d²/dt² height = -ACCEL_CONSTANT * (height - desiredHeight) - VELOCITY_CONSTANT * d/dt height ended up a bit complex.
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)
(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)
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.
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.
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.