Walter Agazzi
cc6bbd1083
AGS: Engine: hotfix potential exception if cc_error is called during quit()
...
From upstream a64e3424f70677f9393e4f8c506f03ed628aee47
2024-04-02 23:09:17 +02:00
Walter Agazzi
a660cd67a4
AGS: Engine: fixed bytecode fixup assertion done for unapplicable case
...
Was broken by 973845a
From upstream 9d86d5ab1a6e84115c33ffbfc8a96185e6b9fd63
2024-01-17 03:12:32 +01:00
Walter Agazzi
46b14a21c6
AGS: Engine: safety check for fixups with out of range code reference
...
From upstream 973845a15ed9726956895161c8847bc668c3e787
2024-01-17 03:12:31 +01:00
Walter Agazzi
d9377bbb63
AGS: Engine: Fix typo in commit b81abc533f508e5831e7ca6d2512c66d506ef09d
...
loopIterations -> loopCheckIterations
2023-08-13 10:58:26 +02:00
Walter Agazzi
4d28890458
AGS: Engine: fixed loop check... again...
...
The latest change (c694126) was meant to fix a timeout test logic,
but it broke the primary loop count check.
The incorrect behavior may be observed when a function with
many loops and `noloopcheck` modifier is called *repeatedly*
from another function. Normally in such case the iterations
passed withing a `noloopcheck` function should not be counted,
but they were.
Apparently the situation cannot be resolved without having 2 counters:
1. One is working all the time, and is used to detect timeouts, as these
may occur both in normal circumstances and in functions with
`noloopcheck` modifier.
2. Second is working only in functions without `noloopcheck` modifier
and is used to do the "stuck in a loop" test.
+ backported small optimization from 3.6.1 branch.
From upstream 70afd47f4879b4eaed5dab664af9e4485055875f
2023-08-13 10:58:26 +02:00
elasota
067626137e
AGS: Fix cast of integer to pointer of greater size warning
2023-07-08 22:02:00 +03:00
Walter Agazzi
0690f14871
AGS: Engine: ccInstance: do not assert stack if script was aborted
...
from upstream a55d76322fca302c0668e3ab76f0c122b22341d3
2023-06-19 22:01:30 +03:00
D G Turner
12d14752bd
AGS: Fix Set But Unused Variable GCC Compiler Warning
2023-05-15 22:33:41 +01:00
Walter Agazzi
6055a5fe5a
AGS: Engine: fixed script's timeout check was working incorrectly again
...
From upstream c694126d77503b9d5528bd95427a8ef6ee48aa6c
2023-05-14 23:04:38 +02:00
Walter Agazzi
1bf6a2025f
AGS: Engine: improvements to the "timeout" check
...
* 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
2023-05-14 23:04:38 +02:00
Walter Agazzi
88a1083e0d
AGS: Move strlen out of loops
...
From upstream b476dfca4b40bc2ca59b7f0fd793543524397ccf
2023-03-12 20:58:28 +00:00
Donovan Watteau
2c804b9c71
AGS: Fix AmigaOS and NDS builds
2022-12-18 14:03:39 +01:00
Thierry Crozat
5772893340
AGS: Engine: fixed CallScriptFunction for the ancient games + added comments
...
Was broken by dec92f05ea
(e38df03c5d1658a2c44a26ba4ee6f22663c1e701 in upstream).
Some games do not have function arg count appended to the function names in
the export table; in that case `export_args` remained uninitialized.
From upstream cdbb7a7367db57e14983015232ecc97f6a3dd212
2022-12-17 22:10:55 +01:00
Hubert Maier
255730b227
AGS: Correct spelling mistake
...
occured -> occurred
2022-10-27 15:56:08 +02:00
Donovan Watteau
27f9a460b5
JANITORIAL: Fix "the the" and similar typos
2022-07-29 19:36:40 +03:00
Thierry Crozat
4f90db8fb4
AGS: Small correction to the hung script loop check
2022-06-24 20:54:42 +01:00
D G Turner
7f2f42e4a1
AGS: Fix Signed vs. Unsigned Comparison GCC Compiler Warning
2022-06-24 01:28:37 +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
Thierry Crozat
305fdb853a
AGS: Abort current scripts on close window event
...
This helps kill "hanging" scripts if user closed the window while
there's no real engine update.
From upstream a758fd6de2dccd0c948fc7f9e5b65200df902a65
2022-06-23 23:57:26 +01:00
Paul Gilbert
8e55de7b77
AGS: Changed sccmd_info array from being global objects
2022-05-31 18:33:21 -07:00
Paul Gilbert
13f40609c7
AGS: Reset currentline when exiting script function, for cc_errors
...
From upstream 538e9072b03b0441853ac0022d17f8990065f8de
2022-05-05 22:41:10 -07:00
Paul Gilbert
b1649597d7
AGS: Replaced Math/std Min/Max with ScummVM macros
...
Inspired by 6dee5ee6f271c600e30879d892295ea6069e8cc9
2022-05-05 22:41:10 -07:00
Paul Gilbert
8e132f7b3f
AGS: cc_error returns stack from all script threads
...
From upstream 9e76800d668d8d0af7d47d815e6d1b781c7601f6
2022-05-05 22:41:07 -07:00
Paul Gilbert
16d0d89787
AGS: Grouped ccError variables in a struct
...
From upstream 48ef387226e4d420dc62d0a0b204cf4cd89a1139
2022-05-05 22:41:07 -07:00
Paul Gilbert
a2a5f2575d
AGS: Reorganized few cc_ headers
...
From upstream ea1f8b9ece69fc7c49c4d3aa7b9af51c4ca736e5
2022-05-05 22:41:07 -07:00
Paul Gilbert
480be2134b
AGS: Added script instance thread stack, replacing current_instance
...
From upstream f3443cb7a4ae5858e5d2d28131aaf6cf138bc0ec
2022-05-05 22:41:06 -07:00
Paul Gilbert
68e5184afa
AGS: Replaced some (v)sprintfs with sNprintf counterparts
...
From upstream a34bd392249f87a152dc470d90c67a7d193a28d8
2022-04-27 20:51:30 -07:00
Paul Gilbert
a633e9d72f
AGS: Fixing various type-cast warnings
...
From upstream 6c42c7331e96386721f28c92ec3cb4cd039e10cd
2022-04-25 20:06:19 -07:00
Paul Gilbert
608389c4c5
AGS: made SystemImports index an unsigned value
...
From upstream 30b8f4016c815f01b49398ddb697b454f1565218
2022-04-24 16:00:05 -07:00
Le Philousophe
edcce8744f
AGS: Fix build on AmigaOS and NDS
2022-04-19 18:37:09 +02:00
Paul Gilbert
99cc27e840
AGS: Fixed few comments in ccInstance::Run()
...
From upstream 109346cf4cc747c9a3bef72c234a18a5f63d30fe
2022-04-18 19:10:40 -07:00
Paul Gilbert
dec92f05ea
AGS: Support passing partial argument list to a script callback
...
From upstream e38df03c5d1658a2c44a26ba4ee6f22663c1e701
2022-04-18 19:10:40 -07:00
Paul Gilbert
2fa13bb149
AGS: Compilation fix
2022-04-13 22:12:16 -07:00
Paul Gilbert
fb52856d7e
AGS: Reorder function linking steps
...
From upstream 0f977a56f0b1cf293f711e8380bb9ddaa54d2573
2022-03-29 21:43:59 -07:00
Paul Gilbert
52b3d7437c
AGS: Updated comment in ccInstance::AddGlobalVar() about glvar fixup
...
From upstream 23c2e0aee21de7960e5660aca6c96bf039ead1db
2022-03-23 20:13:06 -07:00
D G Turner
f50e2c4aa5
AGS: Fix Signed vs. Unsigned Comparison GCC Compiler Warning
2022-03-20 12:58:14 +00:00
Paul Gilbert
19e7035ded
AGS: Replaced few function params from PScript to ccScript*
...
From upstream 432cbd2ee9fd76f7799336a5daee690ad9609a65
2022-03-19 21:25:10 -07:00
Paul Gilbert
28d91ca846
AGS: Try report script section and line on fixup error
...
From upstream 27e578e8140d0bc7d455fbff0e365c2608554c61
2022-03-19 21:25:09 -07:00
Eugene Sandulenko
abea37c9bb
ALL: Update ScummVM project license to GPLv3+
2021-12-26 18:48:43 +01:00
Eugene Sandulenko
04d9b302f6
AGS: Fix warnings
2021-12-01 00:03:04 +01:00
Orgad Shaneh
3919f53326
ENGINES: Replace new[]/memset with new[]()
2021-11-10 19:53:15 +01:00
D G Turner
a0fb27f955
AGS: Fix Compiler Warnings
2021-09-12 17:53:30 +01:00
Paul Gilbert
aff8bbb31c
AGS: Hook up script dump to ScummVM debug channels
2021-09-08 21:10:09 -07:00
Paul Gilbert
93396cdcc1
AGS: Fix formatting of delete[] calls
2021-08-17 21:31:56 -07:00
D G Turner
100541f247
AGS: Fix Set-But-Unused Variable GCC Warning
2021-08-13 12:36:20 +01:00
Paul Gilbert
72cbc27fa3
AGS: Added TFG detection entries
2021-08-12 19:19:39 -07:00
Paul Gilbert
a359c9e9ff
AGS: Fix startup of Maniac Mansion Mania 13
2021-08-07 20:54:19 -07:00
Paul Gilbert
19cc95468a
AGS: Fix 64-bit pointer plugin method result checks
...
In most cases, it looks like the GlobalReturnValue global is
set, resulting the return value being discarded
2021-08-04 20:55:37 -07:00
Paul Gilbert
7dfeb809f2
AGS: Refactored call_function to also use PluginMethod
2021-07-19 19:17:12 -07:00