We often only need to include ScriptRequest.h and not the full
ScriptInterface.h
Differential Revision: https://code.wildfiregames.com/D3920
This was SVN commit r25366.
- Replace ScriptInterface::RegisterFunction with
ScriptFunction::Register
- Mostly removing unused cmpPrivate*
- Some usage introduces specific getters (mapgenerator, AIWorker,
XmppClient,...)
- Several passthrough functions are simply removed in favour of calling
the original, reducing duplication
- Make use of ScriptRequest/ScriptInterface capabilities where
relevant.
- Make JSI_* headers only expose necessary functions, lightening them
considerably and reducing duplication
- Reuse namespaces in JSI_* implementations directly, reducing visual
noise there
Follows f3aedf88a6
Differential Revision: https://code.wildfiregames.com/D3626
This was SVN commit r24983.
- Remove the last usage of the MACRO "TRUE" as it's deprecated and
replace it by its value "1" the == operator is overloaded to return a
UBool(int8_t) refs 9b9a96382c
- Remove two unused DLLs
- Update and add EOL to headers.
Refs #3004
This was SVN commit r24314.
As part of the SM45->52 migration, a ScriptInterface becomes a wrapper
around a JSCompartment, not a JSContext, thus we ought to store private
data for the compartment and not the context.
This is a mass rename of CxPrivate to CmptPrivate to match that before
the actual changes.
Part of the SM52 migration, stage: SM45 compatible
Patch by: Itms
Tested By: Freagarach
Refs #4893
Differential Revision: https://code.wildfiregames.com/D3089
This was SVN commit r24177.
createDefault returns a new pointer to be deleted, getGMT returned a
pointer to an icu variable not to be deleted.
Differential Revision: https://code.wildfiregames.com/D2220
Reviewed By: Vladislav
This was SVN commit r22773.
JSInterface_L10n.cpp from d6db5a466d,
JSInterface_Renderer.cpp and JSInterface_GUITypes.cpp from 4b1297b328,
JSInterface_VisualReplay.cpp from b830233498,
JSInterface_Game.cpp from 5f8be8e0c6,
JSInterface_Simulation.cpp from 921c5515a6,
JSInterface_Debug.cpp from d6cb9c845b,
JSInterface_Main.cpp from 486aec18d4, refs #4772,
JSInterface_Mod.cpp where it was incorrectly removed in af03c72f76.
Refs D1470.
Sort includes alphabetically, add recent Coding Convention macro
comments.
This was SVN commit r21789.
Using references matches the C++ coding style better and should improve
performance a bit in theory. It avoids 2 copies of T in case of the
functions registered with RegisterFunction (mainy used in the GUI). It
should also avoid one or two copies in case of
DEFINE_INTERFACE_METHOD_X, which is used in the simulation, but I
haven't bothered to count it there exactly.
It is now predefined which types have to be passed by const reference
and which are passed by value. Note that references can't be used as
out-parameters (to return multiple values to JS). This hasn't worked
before either and probably never will.
This was SVN commit r17696.
Everything is char* now, so we don't need to mess around with different
string types.
Done with:
ag -ls 'LOG(MESSAGE|MESSAGERENDER|WARNING|ERROR)' source | xargs perl
-pi -e'1 while
s/(LOG(MESSAGE|MESSAGERENDER|WARNING|ERROR).*)%[hl]s/$1%s/g'
This was SVN commit r16187.
Done with:
ag -ls 'LOG(MESSAGE|MESSAGERENDER|WARNING|ERROR)' source | xargs sed
-i 's/LOG\(MESSAGE\|MESSAGERENDER\|WARNING\|ERROR\)(L/LOG\1(/g'
This was SVN commit r16183.
You can now enable tinygettext’s output from the user.cfg file
(tinygettext.debug).
This enhancement also solved a warning due to the previous workaround,
which was
to uncomment the output line to avoid the debug messages.
This issue was reported by Yves at Github:
https://github.com/leper/0ad/issues/10
This was SVN commit r15002.
The ‘l10n.js’ global JavaScript file already defines this function as
markForTranslation(),
and defines a context-aware twin function as well. Those two functions
are the only ones
currently used in the mod code (as it should be), and there are no
remaining calls to the
engine for that.
This was SVN commit r14998.
Provides the logic to detect the system language, load translations, and
use
loaded translations both in the C++ and the JavaScript side.
This patch includes code by Yves, sanderd17, leper, historic_bruno and
Gallaecio. It’s worth noting that Yves and historic_bruno were also the
main
contributors behind the changes in 1b3261b8f4 as well.
This was SVN commit r14953.