This removes an excessive separation between "static managers" and "dynamic managers",
and let use the single ICCDynamicObject interface when working with both kinds.
Simplifies RuntimeScriptValue and StaticArray classes.
Picked out most common implementation into CCBasicObject, which is inherited by
AGSCCDynamicObject and AGSCCStaticObject.
From upstream 781632881dd64af2b57b789617da15107bca9451
* Fixed _lastAliveTs was not reset right after calling sys_evt_process_pending();
this caused events polling called continuously after timeout happened once.
* Set timeout to 60 fps (16.777 ms) instead of random 10ms.
* Do the timeout test only each 1000th loop iteration.
* Few other tiny adjustments in code.
Partially from upstream 60aaef003021fec2f75d4dc6db1b24f0b5d2be65
The timeout method introduced by 6f665dfe is not working very well and
gives "false positives", so I'll disable it for the time being.
From upstream e0edb28b6606c360a1ea3fdcc487c2b05929ed02
Previously the plugin system was obviously built around function
pointers, since a loaded plugin DLL would expose them statically.
This meant that the plugin classes I implemented also had to use
static methods, and all the variables had to be static as well.
This has been getting more and more annoying. So this commit is
an in-progress refactoring of AGS to allow for plugins to be
properly instance-based, and pointers to script methods will be
both a pointer to the plugin as well as the method name.
The latest change to try and properly handle NumberPtr results
from plugin methods broke the passed parameters on methods with
a void return. To solve this once and for all, I changed all
plugin methods to be a void return, and added a _results field
as part of the passed params parameter
This not only simplifies all the use of _t types to the
ScummVM equivalents, it gets rid of the int32 usage in
favor of just int, solving common type clashes with the
Amiga, for which int doesn't match int32
The original had issues with the types of the method params
being 32 bits for ints, but 32 or 64 bits for string pointers.
This could easily result in a mismatch of passed params to
method definitions. To avoid this, I now pass the parameters
as a Common::Array, and a set of macros to simplify getting
the parameter values within the script method