Commit Graph
150 Commits
Author SHA1 Message Date
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
D G Turner 6d7663b1b1 AGS: Fix Redundant Declaration Warnings
These are emitted by GCC when -Wredundant-decls is passed.
2022-03-09 15:28:19 +00: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
Paul Gilbert 80dbcd7fc8 AGS: Fix inventory scroll buttons in 5 Days a Stranger 2021-09-29 21:47:59 -07:00
Thunderforge 35c3668275 COMMON: Fixing misspellings "occured" -> "occurred"
Fixing this misspelled word across multiple parts of the codebase.
2021-09-25 21:36:42 +03:00
D G Turner a0fb27f955 AGS: Fix Compiler Warnings 2021-09-12 17:53:30 +01:00
antoniou79 d474ee3003 AGS: Change a few char variables to int8
In order to specify that they should be treated as signed

Some ports may treat an (unspecified) "char" as unsigned by default. Android does this for its ARM architectures and while we did fix this by enforcing -fsigned-char to its compiler, the issue may come up for other ports. Also it should be better to clarify in the engine when a variable is not actually storing string characters.

I've spotted and changed the most "safe" cases I could find for this. As far as I can tell, out of these, only the Outline field and fontoutline array could potentially be assigned valid negative values which would cause bugs for ports treating chars as unsigned.
2021-09-09 19:27:49 -07:00
Paul Gilbert 1e76c86ff4 AGS: Fix display of plugin function names in script dumps 2021-09-08 21:54:40 -07:00
Paul Gilbert aff8bbb31c AGS: Hook up script dump to ScummVM debug channels 2021-09-08 21:10:09 -07:00
Paul Gilbert 6a8f1f9a71 AGS: More accurate notification of GUI control changes for redrawing
From upstream fd7cb8dc822e50cc485aa0dfc937217ead1cb996
2021-08-20 21:49:38 -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
Max Horn b7e6d61669 JANITORIAL: Fix compiler warnings about unused code 2021-08-07 10:46:14 +02: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 5ccb07acf9 AGS: implemented bool Room.Exists(int room)
From upstream d676baaea0860ef1737019452d8e97b4aee12526
2021-07-27 22:03:36 -07: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 2a3bfcf8c6 AGS: Clear methodName in RuntimeScriptValue for other data types 2021-07-23 20:08:20 -07:00
Paul Gilbert 6a4062d3fc AGS: Fix some comments in call_function 2021-07-20 20:25:54 -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 83bf163365 AGS: Move script exports for DrawingSurface to a new plugins/core/ folder 2021-07-16 19:48:13 -07:00
Paul Gilbert 46eeb0aa2a AGS: Fix crash quitting app when speech dialog is active 2021-07-10 20:23:52 -07:00
Paul Gilbert d9bbf9775c AGS: Rewrote ci_find_file() into File::FindFileCI()
From upstream 4e2df949ff36bbb6d08e402586dc8c2bb02ecad9
2021-07-10 18:56:59 -07:00
Paul Gilbert ddb5daca4c AGS: improve debug level and cc_error output for missing imports
From upstream ca66d3cb69930c9f755da5fc26e173098169ae7d
2021-07-10 18:56:57 -07:00
Paul Gilbert 8f3b1e4b0e AGS: print all missing script imports for current script module
From upstream 9a1c401ba97267947db5357b34db55e62b213f99
2021-07-10 18:56:57 -07:00
Paul Gilbert 04d6a41c42 AGS: Simplified System.Log implementation
From upstream 3d13f9056cd26b0d4da7b8e3207ad330e20a4799
2021-07-10 14:33:40 -07:00
Paul Gilbert ba10eb247e AGS: print original filename for import errors if possible
From upstream 94fc737b34e84a5753479910f8da97a28744f918
2021-07-10 14:33:38 -07:00
Paul Gilbert 44828747f4 AGS: Fix crash quitting Whispers of a Machine from main menu 2021-06-25 22:29:35 -07:00
D G Turner efc9e04ce0 AGS: Fix Various GCC Compiler Warnings 2021-06-15 11:07:23 +01:00
Paul Gilbert edb1ac0f6c AGS: fixed formatting type for several size_t and soff_t values
From upstream 548573740a5c8acc48600f9b069b7d1dc94d0dc3
2021-06-13 21:09:01 -07:00
Paul Gilbert 73347d4559 AGS: Remove _G macros from comments 2021-06-13 21:09:00 -07:00
Paul Gilbert eb1e337edd AGS: Removed String's "const char*" conversion operator
From upstream 7c426674e7e53bffe9120f8ffc059b77fa03a606
2021-06-13 21:08:59 -07:00
Paul Gilbert adb44e0336 AGS: Replaced few cases of strcmp with String::Compare and equivs
From upstream 69288fb93cbc78fc76eb9212e3e23f504b0d50e1
2021-06-13 21:08:58 -07:00
Paul Gilbert 87dba2e276 AGS: Re-added checks for SHOULD_QUIT and abort_engine 2021-06-13 21:08:52 -07:00
Paul Gilbert c942554810 AGS: Fixes for calling plugins 2021-06-13 21:08:52 -07:00
Paul Gilbert 701396361c AGS: Import of fresh codebase 2021-06-13 21:08:44 -07:00
Paul Gilbert e22a8657ac AGS: Fix crash exiting Mage's Initiation 2021-04-30 20:35:09 -07:00
Paul Gilbert bc8c92c2f9 AGS: Replace QFG2 workarounds with generic upstream fix
This applies commit b07ddea6d2a16cd4e77e687675853dbc914b15ca
2021-04-17 16:37:13 -07:00
Paul Gilbert 407d38e7e9 AGS: Add a lot of abort_engine checks to break out of scripts
Previously, quitting could generate spurious error messages
between the point abort_engine was set, and the outer game
loop where game execution was aborted. It just wasn't visible,
because abort_engine was set. Now that we're immediately
generating a ScummVM error for any error generated, I needed
to add extra abort_engine break checks to avoid any errors
2021-04-16 20:44:41 -07:00
Thierry Crozat 44c0f0d115 AGS: Improve print of arguments when dumping script instruction 2021-04-16 01:14:45 +01:00
Eugene Sandulenko 5e7fe2dc57 JANITORIAL: Replace spaces in indentation with tabs 2021-04-15 21:20:36 +02:00
Thierry Crozat d77aa09eb0 AGS: Fix compilation on 64 bit Windows 2021-04-15 12:11:20 +01:00
Thierry Crozat b1683699bd AGS: Fix script dump
The code for dumping script was not working. One issue is that it
was opening and closing the file for each line, which was very
slow. Another issue is that we do not support opening in rw mode,
so it was open in write mode only and only the last line was
available in the file. The code switches to writing the file using
Common::DumpFile and keeps the file open until we close the engine.
2021-04-14 23:54:48 +01:00
Paul Gilbert 879a06fabf AGS: Extend workaround to fix QFG2 F4 cheat key 2021-04-08 19:08:02 -07:00