MapGenerator, TextureConverter, and some other files used pthread.
Differential Revision: https://code.wildfiregames.com/D1917
This was SVN commit r22649.
A call to SelectAnimation("idle") was left over.
Reported by: elexis
Fixes#5552
Differential Revision: https://code.wildfiregames.com/D2169
This was SVN commit r22648.
In eab4f9fdde the `gender`-tag was replaced with `phenotype`. the
checkrefs script however was not updated and complained.
b637fdbae9 introduced a map that checkrefs did not validate.
Based on a patch by: Freagarach
Differential Revision: https://code.wildfiregames.com/D2141
This was SVN commit r22647.
Improves separation of concerns and makes the code less error prone,
since the IGUIObject classes can't break CGUI private members without
CGUIs help anymore.
This is achieved by making CGUI GetFocusedObject, UpdateObjects public,
by introducing public CGUI GetBaseObject, GetMousePos, GetMouseButtons,
HasStyle, GetStyle getters,
and by removing the pointless IGUIObject GetMousePos proxy.
Delete GetGUI() checks that are either always or never true following
2c47fbd66a.
Use const references instead of copies for some mouse positions.
Differential Revision: https://code.wildfiregames.com/D2166
This was SVN commit r22641.
That is CChartData, CGUIList, CGUISeries, COListColumn, GUITooltip,
SGUIMessage, SSpriteCall, STextCall, SFeedback, IGUISetting,
CGUISetting, GUI, IGUIObject, IGUIScrollBar.
Drop copying GetSetting and SetSetting template functions for CGUIList,
CGUISeries, CClientArea, CGUIString.
Stop copying COListColumn.
Drop copying GUI<CClientArea>::GetSetting call in
IGUIObject::UpdateCachedSize() and four copying
GUI<CGUIString>::GetSetting calls in SetupText() functions.
Delete unused GUIRenderer IGLState class from 849f50a500 obsolete since
1f5b8f1c9a.
Differential Revision: https://code.wildfiregames.com/D2164
This was SVN commit r22638.
Introduce MOVABLE idiom indicating that a class can use move semantics.
Make values of CGUI struct maps holding XML data const to ensure at the
root that the data is not modified.
Use NONCOPYABLE and MOVABLE for SGUIIcon and SGUIStyle to enforce the
non-copy policy on the compiler level (until someone changes the GUI
design to make modifications needed).
As indicated by that:
Replace copy operations by in place move operations for these CGUI
struct maps in the CGUI Xeromyces XML loading functions.
Replace copy operations by const references for CSize and SGUIIcon in
CGUIString::GenerateTextCall and CGUI::GenerateText.
This avoids copying of non primitive members, such as the strings and
containers of strings.
Further related cleanup to be kept separated for auditability.
Differential Revision: https://code.wildfiregames.com/D2163
Few comments on IRC by: wraitii, Itms
Tested on: gcc 9, Jenkins, partially VS2015
Refs #1984,
NONCOPYABLE CGUISpriteInstances: 0a7d0ecdde, 8f4f8e240f, c19f3608a5
NONCOPYABLE Image, Sprite: fb8032043b
NONCOPYABLE GUI page: 94c57085e9
NONCOPYABLE GUIManager: 7c2e9027c2
NONCOPYABLE macro: 16ccae10cd
This was SVN commit r22637.
Summary: Patch by smiley fixing 8585040f27
Test Plan:
Check that is the correct fix.
Measure how badly it affected performance.
Reviewers: O14 Maps, elexis, Stan
Reviewed By: O14 Maps, elexis
Subscribers: smiley
Trac Tickets: #4992
Differential Revision: https://code.wildfiregames.com/D2010
This was SVN commit r22635.
This breaked a SM assertion, which was only caught in debug mode. It
could have led to subtle bugs during the compilation of JS scripts.
Still set the flag to its default value, because SM devs wanted to
change the default in the future.
This was SVN commit r22629.
Add vowel lengths, add and correct some names, expand some hero names.
Patch By: Nescio
Differential Revision: https://code.wildfiregames.com/D1999
This was SVN commit r22620.
This removes the trigger for an unidentified VS2015 bug revealed by the
IGUIObject::AddSetting / CGUISetting constructor in 85a622b13a
(unset GUIObject color settings didn't hold the color assigned in the
inherited default constructor, so hovered button text appeared black
instead of white on Windows).
The code in the two commits seems correct, but VS2015 doesn't seem to
implement it correctly (and claims to support C++17) while clang and gcc
behave as intended.
Fix whitespace.
Reported By: gameboy, Angen
Refs
https://wildfiregames.com/forum/index.php?/topic/26694-strange-font-color/
This was SVN commit r22617.
As reported by Freagarach in D2141, when using datatype="tokens" in
children templates, the list of tokens gets expanded instead of
replaced.
This means women randomly switched to male voices.
Patch by: Freagarach
This was SVN commit r22611.
This moves the renderer options into their own class to:@
- allow one to only include the rendering options, not the whole
renderer header, when one wants access to rendering options.
- centralise rendering changes and their side-effects.
- clean up code.
Tested by: historic_bruno, Freagarach
Commented by: historic_bruno
Differential Revision: https://code.wildfiregames.com/D1929
This was SVN commit r22610.
Use the "pretend correct path" behaviour for short goals too. This is a
fix for #5545, since the position check now works correctly without
needing to add a tricky check for path-vs-path distance.
Simplify HandleObstructedMove to use ComputePathToGoal more. This means
we occasionally compute a long path when stuck, which fixes two cases of
stuck units reported in #5547.
Move some common calls into functions for convenience.
Make sure the short-path-waypoint-range-relaxing introduced in
32e8ed51aa doesn't happen for the last waypoint, which caused units to
occasionally never get in range of the last waypoint.
Clear short path waypoints when computing a long path.
This won't fix all instances of unit dancing, but it should improve most
of them.
Fixes#5545, Fixes#5547
Differential Revision: https://code.wildfiregames.com/D2135
This was SVN commit r22609.
Use std::thread and thread_local instead of pthread specific calls.
Differential Revision: https://code.wildfiregames.com/D1916
This was SVN commit r22608.
Since ead8436b3d, the sides of tree leaves are extremely bright. The
reason is that they overwrite the value of the depth buffer, and thus
they show the skybox in the water calculation.
The simplest fix for this is to show the skybox only at lower
transparency values. A better fix would require handling alpha blending
completely differently.
Refs #5125.
Differential Revision: https://code.wildfiregames.com/D2143
This was SVN commit r22607.
The function was located in the wrong file, because it is not logically
related to IGUIObject settings.
The separate file allows the various users to include it without
including the GUIRenderer.
This was SVN commit r22605.
This means the type information is available for all methods operating
with the setting type, which is easier for the authors, allows for
compile-time checks and optimizations.
Remove the enum that was used to indirectly obtain the setting type at
runtime.
Revises SGUISetting and enum from e326ebae46 (5122b0f906),
std::function from 82f1d2718b.
Differential Revision: https://code.wildfiregames.com/D2145
Tested on: gcc, clang, VS2015, Jenkins
This was SVN commit r22604.
Revise 53b335f5ae in CInput::UpdateBufferPositionSetting to use the
SkipMessage argument from 4113aa0a36 to prevent the infinite loop
instead of hijacking the pointer.
This was SVN commit r22603.
Retract IGUIObject override keyword from that commit, because clang
recommends to use it for either every or no overriding class member
(which then should be done consistently for all classes inheriting
IGUIObject, refs D2144).
This was SVN commit r22602.
Better texture for brit_battersea shield
Fix celtic shield bosses using 3rd texture variant instead of 1st
Added brass and golden variant for shields props 02 and 03
replaced gold texture with 03 texture variant for have less texture
files.
This was SVN commit r22600.
JSI_IGUIObject should not contain functions that work only for some GUI
Object types, refs #5442.
Deduplicate the shuffled copy of CText::SetupText.
Avoid the 80 times slower dynamic_cast mandated by the virtual class
inheritance by adding an ugly overridable pointer to the base class
pointing at this derived classes, as bargained with Vladislav and
proposed by wraitii in D1781 id=8426.
This may be improved by refactoring the IGUIObject and JSInterface
classes to use templates and / or eliminating its virtual inheritance.
Implement and use FromJSVal / ToJSVal CSize specialization.
Remove the JS::CallArgsFromVp call.
Differential Revision: https://code.wildfiregames.com/D2136
Comments By: wraitii, Vladislav
This was SVN commit r22596.
Remove the comment from 53bcba3368 that allures the reader to believe
there is a memory leak which is not and has not been the case, refs
D1700.
Remove the useless JSAutoRequest from GetJSObject if the object was
constructed already (performance improvement), following cx assignment
in 4b1297b328, following JSAutoRequest addition in e9e05f4efc (that also
had removed other useles JSAutoRequest calls but not this one).
Don't change JS::PersistentRooted to JS::Heap until SpiderMonkey is
updated, refs D1700.
Provide access to GUI, ScriptHandlers and JSObject for inheriting
classes.
This was SVN commit r22593.
Reported by Jenkins, but not gcc, clang, VS2015.
Take the opportunity following 2c47fbd66a to make the CGUI pointer held
by IGUIObject constant (the address, not the value).
Differential Revision: https://code.wildfiregames.com/D2139
This was SVN commit r22589.