Commit Graph
24 Commits
Author SHA1 Message Date
Le Philousophe c5bc568d41 AGS: Fix call_function signature
call_function returns from PluginMethod::operator() which returns a
NumberPtr.
Its two calls also expect a NumberPtr but the function returned an int.
This should fix bug #13557.
2024-11-15 22:39:15 +01:00
Walter Agazzi 455b9609d0 AGS: Script API: implemented Type.GetByName() for all applicable types
From upstream 29602688ec766cdc0b8fb7aa761f73292365651b
2024-10-30 18:07:42 +02:00
Walter Agazzi f13f7cfac2 AGS: Engine: rem the distinction between static/dynamic objects in script VM
From upstream 04450b2a41f0e0f107a4ea85dab375f439b4ffae
2024-10-30 18:07:42 +02:00
Walter Agazzi ac0422354a AGS: Engine: renamed ICCDynamicObject to IScriptObject
because this interface is now used for both Dynamic and
Static object managers.
From upstream 1bb14f7a2bae43534edf950c040bcd4a1be5f7df
2024-10-30 18:07:42 +02:00
Walter Agazzi 795dacac07 AGS: Engine: inherit StaticObject managers from ICCDynamicObject
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
2024-10-30 18:07:42 +02:00
Walter Agazzi 27ce106dac AGS: Engine: added a template ScFnRegister ctor for easier direct function
From upstream 78dcba2b8e874c3c313493e04dc0b83fdfb564cb
2024-10-30 18:07:42 +02:00
Walter Agazzi 813801779c AGS: Engine: Added new functions for API scripts registration
These can be used to gradually move to the new style introduced
in upstream 9221ea54c1a81b9f37829d7fafc90ac2806d4eb1
2024-10-30 18:07:42 +02:00
Walter Agazzi 1467791290 AGS: Engine: tidy code a bit in script_runtime.cpp 2024-10-30 18:07:42 +02:00
Thierry Crozat 6f512bb2af AGS: Removed some redundant/obsolete comments
From upstream a7bd24cd4822bdcabef061197c98d1224200aa2a
2022-10-09 18:56:36 +01:00
Thierry Crozat 08db4be24c AGS: As a hotfix, restored the old way to test for hung script loops
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
2022-06-23 23:57:49 +01:00
Thierry Crozat 6f665dfe68 AGS: Test for hanging script using timeout instead of while loops
From upstream c34f0c96596f1a7814c15e7a06c2c498cb95ebfc
2022-06-23 23:57:27 +01:00
Eugene Sandulenko abea37c9bb ALL: Update ScummVM project license to GPLv3+ 2021-12-26 18:48:43 +01:00
Paul Gilbert 2702b13768 AGS: Built-in script methods were being added to wrong import list 2021-07-23 20:08:21 -07:00
Paul Gilbert 7dfeb809f2 AGS: Refactored call_function to also use PluginMethod 2021-07-19 19:17:12 -07:00
Paul Gilbert ae1814553f AGS: Implement PluginMethod class as proxy for calling script methods 2021-07-18 21:47:45 -07:00
Paul Gilbert e543a32ec0 AGS: In progress converting plugin classes to be instance based
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.
2021-07-18 17:07:01 -07:00
Paul Gilbert 701396361c AGS: Import of fresh codebase 2021-06-13 21:08:44 -07:00
Paul Gilbert 9a78e04039 AGS: Beginnings of engine/ inclusion 2021-02-06 16:37:31 -08:00
Paul Gilbert d8e471b03c AGS: Changing Common namespace to Shared 2021-02-06 16:37:31 -08:00
Paul Gilbert 76a2e90366 AGS: Wrapping headers in an AGS3 namespace 2021-02-06 16:37:31 -08:00
dreammaster 8026e4bb30 AGS: Run astyle formatting 2021-02-06 16:37:31 -08:00
Paul Gilbert 90ec822f76 AGS: Cleaning up header file guard defines 2021-02-06 16:37:31 -08:00
Paul Gilbert bd6a58d1a1 AGS: Adding ScummVM comment headers 2021-02-06 16:37:31 -08:00
Paul Gilbert a60d290a08 AGS: Initial addition of engine/ and shared/ folders 2021-02-06 16:37:31 -08:00