aboutsummaryrefslogtreecommitdiff
path: root/common
AgeCommit message (Collapse)Author
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-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
2016-10-13Merge pull request #836 from peterkohaut/bladerunnerEugene Sandulenko
BLADERUNNER: added basic support for blade runner game
2016-10-13OSYSTEM: Add kFeatureFilteringModeThierry Crozat
2016-10-09JANITORIAL: Remove more trailing spacesEugene Sandulenko
2016-09-29COMMON: Add ReadFloatLE to Common::ReadStreamEugene Sandulenko
2016-09-13OSYSTEM: Remove the API allowing to draw to the OSD surface directlyBastien Bouclet
2016-09-13OSYSTEM: Introduce a method allowing to draw a background activity iconBastien Bouclet
2016-09-10COMMON: Converted Common::BitStream to use DisposeAfterUsePaul Gilbert
2016-09-10CLOUD: Move openUrl to OSystemThierry Crozat
2016-09-09COMMON: Fix indentation inconsistenciesThierry Crozat
2016-09-03JANITORIAL: Make GPL headers uniformEugene Sandulenko
2016-09-02Merge pull request #820 from waltervn/platform-atari8bitEugene Sandulenko
COMMON: Add Atari 8-bit platform
2016-08-30COMMON: Replace broken URLWillem Jan Palenstijn
2016-08-30COMMON: Fix sign warningWillem Jan Palenstijn
2016-08-29COMMON: Add Atari 8-bit platformWalter van Niftrik
2016-08-24COMMON: Fix WriteStream::pos() once againAlexander Tkachev
MemoryReadWriteStream now returns int32, not uint32. It actually doesn't ever return -1 to indicate that an error occured, so uint32 was a better choice, but that's what is used in WriteStream base class now. That method is abstract, so that's also why OutSaveFile had to override it.
2016-08-24ALL: Move Clipboard support to OSystemAlexander Tkachev
Commit adds kFeatureClipboardSupport. hasTextInClipboard() and getTextFromClipboard(). OSystem_SDL has this feature if SDL2 is used. EditableWidget and StorageWizardDialog use g_system to access clipboard now.
2016-08-24JANITORIAL: Remove spaces at the end of the lineAlexander Tkachev
I knew there were some, but I wanted to fix them once, instead of doing it all the time.
2016-08-24COMMON: Add replace(String, String, String)Alexander Tkachev
Searches for a substring in the string and replaces it with the other string.
2016-08-24CLOUD: Fix saves syncAlexander Tkachev
Tested that on actual unix system and found out a few minor bugs related to paths.
2016-08-24CLOUD: Fix some warningsAlexander Tkachev
Mostly on format string
2016-08-24CLOUD: Make OutSaveFile start saves syncAlexander Tkachev
It had to become a proxy class in order to do that. finalize() starts the saves sync.
2016-08-24COMMON: Add String::asUint64()Alexander Tkachev
Instead of all these atoull() I've added everywhere.