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
* '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
...
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.
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
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.
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)
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.
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
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>
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>
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>
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>
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>
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>
Use multiplication and division instead of bitshifting as its
conceptually easier to understand (mathematically).
Signed-off-by: Giel van Schijndel <giel@wz2100.net>
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>
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
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
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