aboutsummaryrefslogtreecommitdiff
path: root/common
AgeCommit message (Collapse)Author
2017-08-07COMMON: Add a setVersion method to Common::SerializerPaul Gilbert
2017-07-30COMMON: Migrate Various Endian Functions to Common from Engine Code.D G Turner
Thanks to N.E.C <beholdnec@gmail.com> for this.
2017-07-27COMMON: Only clear events from the EventSources in clearEvents()Thierry Crozat
2017-07-26COMMON: Add method in EventManager to clear the event queueThierry Crozat
2017-07-13STREAM: add read/write functions for float LE/BEyinsimei
2017-07-10Revert "COMMON: Change way the Singleton instances are instantiated"Eugene Sandulenko
This reverts commit eefa72afa1978a9dea10f5b1833fcc8f58a3468e. With this patch ConfigManager is broken.
2017-07-10COMMON: Change way the Singleton instances are instantiatedThierry Crozat
This fixes tons of warnings with clang from a recent xcode version on macOS (and possibly other systems) complaining that an instantiation of _singleton is required but no definition is available.
2017-07-06COMMON: Add yet another GUIO option flagColin Snover
SCI engine has very many game options.
2017-06-08COMMON: Take immutable reference in SpanOwner copy assignmentColin Snover
Thanks again to @waltervn.
2017-06-08COMMON: Make SpanOwner copy assignment make a copy of the owned SpanColin Snover
To move data from one SpanOwner to another, use `moveFrom`. Thanks @waltervn for pointing out the problem.
2017-03-30COMMON: Reduce maximum Span size to 4GiBColin Snover
Until C++11 (which introduces the z and t length modifiers), there is no consistent way to print size_t and ptrdiff_t types using printf formatting across 32-bit, LLP64, and LP64 architectures without using a cumbersome macro to select the appropriate length modifier for the target architecture. Since ScummVM engines currently need to support 32-bit targets, there is no reason at the moment to support any larger memory sizes in Span anyway. Span error output is also updated in this commit to reflect that index values are unsigned.
2017-03-28COMMON: Compilation fix for Visual Studio 2015Paul Gilbert
The SpanImpl template was generating a bunch of C2248 errors that protected fields of the SpanBase template could not be accessed
2017-03-10BUILD: Fixed mingw-w64 32 bits buildPeter Kohaut
2017-03-09BUILD: Fixed macro redefinition warning for 64 bits buildsPeter Kohaut
2017-03-05BACKENDS: Fix const'ness which led to warningsEugene Sandulenko
2017-03-04PSP2: Add Playstation Vita (PSP2) supportcpasjuste
2017-02-22SDL: Fix erratic analog pointer + control optionsrsn8887
Fixes erratic speeds in analog pointer motion Implemented option to set analog/keyboard pointer speed and control the analog joystick deadzone. The deadzone option appears only if the build supports analog joystick (via JOY_ANALOG define)
2017-02-21Merge pull request #905 from lubomyr/masterEugene Sandulenko
ANDROIDSDL: added tab Control in main Options menu for switching some features
2017-02-14ANDROIDSDL: implemented checkbox for swap menu and back buttonslubomyr
2017-02-14ANDROIDSDL: backend related checking in options.cpp replaced with ↵lubomyr
hasFeature... condition, renamed some fields and methods
2017-02-11Merge pull request #895 from csnover/gui-volume-optionsEugene Sandulenko
GUI: Add three new options for volume slider controls
2017-02-08COMMON: Fix calling Span::getStringAt with non-zero indexColin Snover
2017-02-06BUILD: Define SCUMM_64BITS on 64 bits platforms when not using configureThierry Crozat
This for example fixes the compilation of the fullpipe engine on 64 bits platforms when using create_project.
2017-02-05GUI: Add three new options for volume slider controlsColin Snover
GUIO_NOSPEECHVOLUME can be used for games that allow toggling of speech but do not provide the ability for users to control speech volume. GUIO_LINKMUSICTOSFX and GUI_LINKSPEECHTOSFX can be used for games that allow control of music, sfx, and speech in combinations, like games that provide control of digital audio separately from MIDI, or games that only control all three audio types through a single volume control.
2017-01-31ANDROIDSDL: implemented checkbox for show/hide on-screen control in Options menulubomyr
2017-01-30ANDROIDSDL: implemented checkbox for change mouse mode in Options menulubomyr
2017-01-17GRAPHICS: Rename MacFont to MacFONTFont to avoid clashedEugene Sandulenko
2017-01-15COMMON: Fix Variable Used Uninitialized Compiler Warning.D G Turner
2017-01-14COMMON: Define STATIC_ASSERT for all portsColin Snover
Ports with -DNONSTANDARD_PORT need this too.
2017-01-14COMMON: Add ReadStream::readPascalString()Eugene Sandulenko
2017-01-13Merge pull request #881 from csnover/span-hEugene Sandulenko
COMMON: Add Span to common library
2017-01-12VKEYBD: Remove Unused Variable.D G Turner
2017-01-12COMMON: Replace sprintf() with safer String::format() in JSON module.D G Turner
2017-01-09COMMON: Enhanced debug channel checks.Eugene Sandulenko
Now it is possible to enforce checking by specifying level -1, that is, debug level 11 will not turn it on.
2017-01-08COMMON: Fix GCC 4 shadow warnings in SpanColin Snover
2017-01-08COMMON: Simplify Span codeColin Snover
Implicitly generated constructors can be used instead of explicit constructors, which reduces the amount of necessary boilerplate. Long lists of identical typedefs to the superclass are now defined using a macro. data() const now returns a pointer to data that matches the value_type of the data, instead of forcing the data to be const. This better matches the intent of the Span class, which provides a view into data, rather than being a container that holds data.
2017-01-08COMMON: Restrict use of data access helpersColin Snover
The data access helpers as written are effectively little-endian when reading from spans with value_types larger than the size of the requested data (e.g. more than 1 byte for getting a char, more than 2 bytes for getting a uint16, etc.). For now, restrict use of these methods at compile time until someone actually needs to read memory that way.
2017-01-08COMMON: Improve test coverage for Span and fix bugs from testingColin Snover
2017-01-08COMMON: Add STATIC_ASSERT macro to scummsys.hColin Snover
2017-01-08COMMON: Add Span to common libraryColin Snover
Span is roughly modelled on the GSL span<T> type, and is intended to replace direct access to raw pointers -- especially pointers that are passed to functions along with a separate size parameter. It provides low-cost bounds-checked reads and writes, as well as convenience functions for reading common values (integers of varying endianness, strings, etc.). While similar to MemoryReadStream in purpose, Span is superior in cases where memory is writable, where memory is accessed randomly rather than sequentially, or where any invalid access should be treated as an unrecoverable error. It should also be more efficient than a MemoryReadStream because it is implemented using CRTP, so there is no runtime overhead from dynamic dispatch. NamedSpan is an extension of Span which provides enhanced debugging information when out-of-bounds memory accesses occur. It allows programmers to name the memory span at construction time, and it also tracks the offsets of subspans so that the absolute byte offset of the original memory can be provided in the error message if an out-of-bounds access occurs. SpanOwner is similar to ScopedPtr but has awareness of the design of Span objects, so allows the memory pointed to by the Span object inside the SpanOwner to be freed when the SpanOwner is freed without requiring holding a separate pointer to the start of memory. It also provides some copy semantics, so unlike a ScopedPtr, SpanOwners can be held by objects in movable containers like Common::Array -- but note that because there are no move semantics in C++98, this means that a new, complete memory copy of the pointed-to data will be created, rather than just a new Span pointing to the same block of memory, when a container holding a SpanOwner expands.
2017-01-08COMMON: Add type traits to common libraryColin Snover
Type traits allow conditional selection and manipulation of types during compilation.
2017-01-05COMMON: Add strnlen for safer C string length readsColin Snover
This API is intended for use in cases where C strings come from untrusted sources like game files, where malformed data missing the null terminator would cause strlen to read out of bounds.
2016-12-19COMMON: Add stddef.h to scummsys.h for ptrdiff_tColin Snover
2016-12-04COMMON: Added Estonian languageEugene Sandulenko
2016-11-29ALL: game state => saved gameBen Castricum
2016-10-30COMMON: Fix GCC Warning in JSON Parser.D G Turner
The emitted warning is "ISO C++98 does not support the ‘%lg’ gnu_printf format [-Wformat=]". Though "%lg" is required for *scanf functions to indicate the field size, it is not required for *printf functions which use "%g" instead.
2016-10-29COMMON: Add referencing and destruction of the OSDMessageQueue instanceThierry Crozat
Registering the OSDMessageQueue instance as an event source is now done right after the event manager is initialised. This ensures that it is created in a sensible place and not for example in another thread). Also registering the event source is moved to a separate function instead of being in the constructor to remove any issue in case some code tries to display a OSD Message very early on (the instance would be created then, but it would be registered as an event source later).
2016-10-29COMMON: Add OSDMessageQueue singletonThierry Crozat
This class can be used to get messages to display on the OSD from any thread. Those messages are then passed to the backend in the graphic thread.
2016-10-26COMMON: Added debug method for printing out stream contentsEugene Sandulenko
2016-10-16Merge pull request #847 from criezy/sdl-filteringThierry Crozat
Add graphics linear filtering feature