aboutsummaryrefslogtreecommitdiff
path: root/common
AgeCommit message (Collapse)Author
2017-10-06COMMON: Allow construction of Arrays of non-copyable membersColin Snover
Although the previous count-constructor would never make a copy of a member at runtime, Array<T>::reserve *may* copy-construct, so the compiler would forbid creation of arrays of NonCopyable objects even when the array was created only once and then never resized (and thus never actually tried to perform a copy-construction).
2017-10-06COMMON: Prevent implicit conversion of smart pointers to non-boolsColin Snover
2017-10-06COMMON: Switch to compile-time checking of invalid SortedArray callsColin Snover
Runtime error detection is error-prone and unnecessary.
2017-09-30COMMON: Add standard data method to Common::ArrayColin Snover
This matches the C++11 std::vector method of the same name, and replaces usage of taking the address of the first element of an array by &array[0] or &array.front() or &*array.begin(). The data method is better than these usages because it can be used even when the array is empty.
2017-09-30COMMON: Add standard count & count+copy array constructorsColin Snover
These are additions to match C++11 std::vector common init patterns, to make Common::Array cover more common use cases where C-style arrays are currently used (and should not be).
2017-09-22COMMON: Remove DisposeAfterUse default value from dynamic write memory streamsBastien Bouclet
The default value was DisposeAfterUse::NO, which made it very easy to accidentally leak memory by omitting to specify a value.
2017-09-21VIDEO: Change QT edit list to a Common::ArrayBastien Bouclet
And fix an out of bounds acces when seeking to the end of a video. Skipping samples is needed even when seeking through silent edits because a silent stream is queued for those. Fixes #10219.
2017-09-08SCI32: Toggle Phant2 content censoring from game optionsColin Snover
To enable the optional content censoring mode, Phant2 looks for a RESDUK.PAT file, which is normally placed by the game's installer if the user chose to enable censorship. If the file exists, the game reads an unlock password out of the file and asks the user to enter the password when starting a new game to create an uncensored game, or to click a "less intense" button to start the game with censoring. The censorship state of the game is then persisted in the save game file, and installations with the RESDUK.PAT file need to enter the password again in order to restore any of the uncensored saves. Since we do not have an installer that can enable this feature, add a game option toggle to enable/disable censoring (for the releases that have the optional censorship mode) instead so the censored content feature is available for anyone that wants to use it. This flag is restored from ScummVM whenever a save game is loaded, so it can be toggled on or off at any point without needing a separate save game, unlike in the original interpreter.
2017-09-08COMMON: Add comparator for sorting ArchiveMemberListColin Snover
2017-09-04COMMON: Add helper macro for printing rectsColin Snover
2017-08-24COMMON: Optimize BitStream::getBitsWillem Jan Palenstijn
2017-08-24COMMON: Add BitStream classes for memory buffersWillem Jan Palenstijn
2017-08-24COMMON: Keep track of bitstream positionWillem Jan Palenstijn
2017-08-24COMMON: Cache BitStream sizeWillem Jan Palenstijn
2017-08-24COMMON: Remove BitStream base class to allow inlining callsWillem Jan Palenstijn
All users of BitStream were in fact using a specific, hardcoded variant, so we can hardcode that variant, removing the need for virtual calls, and enabling inlining.
2017-08-20COMMON: Implement SeekableReadStream interface for MemoryReadWriteStreamColin Snover
This allows MemoryReadWriteStream to be passed successfully to functions that use the SeekableReadStream type so that they can call the `pos` method, like the DPCMStream class of the VMD decoder.
2017-08-12COMMON: Added freeing notes to zlib wrapper methodsPaul Gilbert
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