Commit Graph

3033 Commits

Author SHA1 Message Date
lubomyr
15acee29f1 ANDROIDSDL: implemented checkbox for change mouse mode in Options menu 2017-01-30 22:35:40 +02:00
Eugene Sandulenko
4ede54e6b0 GRAPHICS: Rename MacFont to MacFONTFont to avoid clashed 2017-01-17 20:30:32 +01:00
D G Turner
906f850a9c COMMON: Fix Variable Used Uninitialized Compiler Warning. 2017-01-15 11:46:42 +00:00
Colin Snover
135ac922aa COMMON: Define STATIC_ASSERT for all ports
Ports with -DNONSTANDARD_PORT need this too.
2017-01-14 10:17:58 -06:00
Eugene Sandulenko
0b95b734b8 COMMON: Add ReadStream::readPascalString() 2017-01-14 12:45:58 +01:00
Eugene Sandulenko
8096ccb745 Merge pull request #881 from csnover/span-h
COMMON: Add Span to common library
2017-01-13 22:20:26 +01:00
D G Turner
7db886e02f VKEYBD: Remove Unused Variable. 2017-01-12 09:59:27 +00:00
D G Turner
70d3726034 COMMON: Replace sprintf() with safer String::format() in JSON module. 2017-01-12 04:50:45 +00:00
Eugene Sandulenko
eab2e06169 COMMON: Enhanced debug channel checks.
Now it is possible to enforce checking by specifying level -1,
that is, debug level 11 will not turn it on.
2017-01-09 09:22:35 +01:00
Colin Snover
3c02008262 COMMON: Fix GCC 4 shadow warnings in Span 2017-01-08 15:17:22 -06:00
Colin Snover
3cfc396ecd COMMON: Simplify Span code
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-08 14:08:16 -06:00
Colin Snover
b2796e65aa COMMON: Restrict use of data access helpers
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-08 13:21:10 -06:00
Colin Snover
2558b20cdd COMMON: Improve test coverage for Span and fix bugs from testing 2017-01-08 13:20:23 -06:00
Colin Snover
7e0b40173f COMMON: Add STATIC_ASSERT macro to scummsys.h 2017-01-08 13:20:23 -06:00
Colin Snover
640f6039ca COMMON: Add Span to common library
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-08 13:20:23 -06:00
Colin Snover
ff1c2295ab COMMON: Add type traits to common library
Type traits allow conditional selection and manipulation of types
during compilation.
2017-01-08 13:20:23 -06:00
Colin Snover
9d3893459f COMMON: Add strnlen for safer C string length reads
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.
2017-01-05 22:07:24 +01:00
Colin Snover
849e29dc87 COMMON: Add stddef.h to scummsys.h for ptrdiff_t 2016-12-19 15:00:09 -06:00
Eugene Sandulenko
6acbe91a27 COMMON: Added Estonian language 2016-12-04 15:21:37 +01:00
Ben Castricum
6f38c1e55d ALL: game state => saved game 2016-11-29 20:15:20 +01:00
D G Turner
844972441e COMMON: Fix GCC Warning in JSON Parser.
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-30 14:46:47 +00:00
Thierry Crozat
3ae52a61af COMMON: Add referencing and destruction of the OSDMessageQueue instance
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-29 15:13:32 +01:00
Thierry Crozat
e732186724 COMMON: Add OSDMessageQueue singleton
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-29 15:13:32 +01:00
Eugene Sandulenko
3071bb40d8 COMMON: Added debug method for printing out stream contents 2016-10-26 19:00:13 +02:00
Thierry Crozat
5151bd99dd Merge pull request #847 from criezy/sdl-filtering
Add graphics linear filtering feature
2016-10-16 18:42:40 +01:00
Eugene Sandulenko
e89c76f63c Merge pull request #836 from peterkohaut/bladerunner
BLADERUNNER: added basic support for blade runner game
2016-10-13 23:48:50 +02:00
Thierry Crozat
30aae5178a OSYSTEM: Add kFeatureFilteringMode 2016-10-13 01:45:01 +01:00
Eugene Sandulenko
355c4fa646 JANITORIAL: Remove more trailing spaces 2016-10-09 15:02:02 +02:00
Eugene Sandulenko
7ab0985ca8 COMMON: Add ReadFloatLE to Common::ReadStream 2016-09-29 22:33:36 +02:00
Bastien Bouclet
0802bbd8ee OSYSTEM: Remove the API allowing to draw to the OSD surface directly 2016-09-13 20:41:26 +02:00
Bastien Bouclet
521ba2cb8a OSYSTEM: Introduce a method allowing to draw a background activity icon 2016-09-13 20:25:13 +02:00
Paul Gilbert
bd010bc79f COMMON: Converted Common::BitStream to use DisposeAfterUse 2016-09-10 11:16:07 -04:00
Thierry Crozat
1f2a50bcd3 CLOUD: Move openUrl to OSystem 2016-09-10 01:12:42 +01:00
Thierry Crozat
dff88b1058 COMMON: Fix indentation inconsistencies 2016-09-09 22:28:48 +01:00
Eugene Sandulenko
fab199d37e JANITORIAL: Make GPL headers uniform 2016-09-03 12:46:38 +02:00
Eugene Sandulenko
029e1c0d1a Merge pull request #820 from waltervn/platform-atari8bit
COMMON: Add Atari 8-bit platform
2016-09-02 23:41:29 +02:00
Willem Jan Palenstijn
9b6bbeb911 COMMON: Replace broken URL 2016-08-30 21:59:12 +02:00
Willem Jan Palenstijn
3b2bdd3a89 COMMON: Fix sign warning 2016-08-30 21:53:22 +02:00
Walter van Niftrik
51360ec6ab COMMON: Add Atari 8-bit platform 2016-08-29 17:52:36 +02:00
Alexander Tkachev
368f664c81 COMMON: Fix WriteStream::pos() once again
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-24 16:24:16 +06:00
Alexander Tkachev
b9bba9bd4b ALL: Move Clipboard support to OSystem
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-24 16:07:55 +06:00
Alexander Tkachev
438ba985a4 JANITORIAL: Remove spaces at the end of the line
I knew there were some, but I wanted to fix them once, instead of doing
it all the time.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
627bda9d82 COMMON: Add replace(String, String, String)
Searches for a substring in the string and replaces it with the other
string.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
acce1c89ab CLOUD: Fix saves sync
Tested that on actual unix system and found out a few minor bugs related
to paths.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
fa3ea83165 CLOUD: Fix some warnings
Mostly on format string
2016-08-24 16:07:55 +06:00
Alexander Tkachev
aee713141b CLOUD: Make OutSaveFile start saves sync
It had to become a proxy class in order to do that.
finalize() starts the saves sync.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
c99b24c16d COMMON: Add String::asUint64()
Instead of all these atoull() I've added everywhere.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
9eb4aad7fd CLOUD: Make DefaultSaveFileManager ignore syncing files
MetaEngines don't get "locked" files in the list, so won't try to open
these.

Save/Load dialog updates save list every time SavesSyncRequest tells it
to.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
1b9987ddc9 GUI: Add getOSDFormat() and make OSD 32 bpp 2016-08-24 16:07:55 +06:00
Alexander Tkachev
2a15b8b280 GUI: Add clearOSD() method
So one can erase everything from OSD and then blit something on it.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
7ff1f91808 GUI: Add copyRectToOSD()
I was lazy to implement that in OpenGLGraphicsManager and I'm not sure
it's implemented correctly in SurfaceSdlGraphicsManager, but it works
for me.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
da3b7bd8d9 CLOUD: Add GoogleDriveStorage
It has its own GoogleDriveTokenRefresher and knows how to do info().

This commit also contains JSON int -> long long int fix and
CurlJsonRequest '\n' -> ' ' fix.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
b3bf532211 CLOUD: Make CloudManager singleton
It's needed to ::destroy() it in main().
2016-08-24 16:07:55 +06:00
Alexander Tkachev
4e7dec5500 CLOUD: Add DropboxCreateDirectoryRequest
Also add CloudManager::testFeature(), because syncSaves() now works fine
and I don't want to break it again and again with my testing requests.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
eb63b50b7f CLOUD: Refactor Request
Added ErrorResponse and ErrorCallback. Each Request now has an
ErrorCallback, which should be called instead of usual callback in case
of failure.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
cc4512e50b COMMON: Add SaveFileManager::openRawFile()
It's needed for the cloud saves upload/sync feature.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
701b07adfb COMMON: Fix JSON to understand integers correctly 2016-08-24 16:07:55 +06:00
Peter Bozsó
81c34adaef Fix comment formatting 2016-08-24 16:07:55 +06:00
Alexander Tkachev
14d60e62f8 CLOUD: Fix format string warnings
I get 'warning: ISO C++98 does not support the '%lg' ms_printf format'
warning though.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
f4547f44df CLOUD: Add RequestIdPair struct
Can be used with Callback<T> (means it's still type safe). It's used to
pass not only Request id to user's callback, but also a value user
wanted.

void *data field is removed from RequestInfo.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
ae8e7f39f5 CLOUD: Make download() create necessary directories
DumpFile::open() with createPath=true create would create the missing
directories from the path before opening a file. Thus, one can easily
create a file and avoid "can't open a file" error.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
d014b5bf38 CLOUD: Fix MemoryReadWriteStream
There was a problem with file downloading in MinGW. Strangely, there is
no such problem in Visual Studio, yet this fixes the problem.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
5f4bbe6e9e CLOUD: Add OneDrive Storage stub
Knows how to OAuth already.

This commit also adds CloudManager::addStorage(), so OneDriveStorage can
add newly created Storage and CloudManager can save it in the
configuration file.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
41e65db7d0 CLOUD: Add Storage saving mechanism
In this commit CloudManager starts supporting multiple Storage. Now, in
its init() it loads all the Storages and determines the current one.

It now also has save() method. In that method all Storages are saved
with their new saveConfig() method.

CloudManager::save() not called from anywhere, though. The only one
Storage that could be added is DropboxStorage in case you have no
cloud-related config keys or you have no storages connected.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
b570499164 CLOUD: Add Callback typedefs
And do some minor cleanup work.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
9e531e3ce7 CLOUD: Polish Callbacks
Cleaned up all example code and old callbacks.

New Callback classes are introduced in "common/callback.h" and
documented.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
e1109c0c32 CLOUD: Add CallbackBridge
This commit also adds GlobalFunctionCallback, because it was needed in
order to replace plain C pointers to functions (which were used in
Request) into our object-oriented BaseCallback pointers.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
ca456a7241 CLOUD: Add object-oriented Callbacks
These callbacks can call object's methods, not some global C functions.

DropboxStorage::info2() and DropboxStorage::infoMethodCallback()
demonstrate the idea.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
17eb5f9143 CLOUD: Add complex callbacks
Originally, I intended to add Storage API, StorageFile and StorageInfo
stubs. When I tried to implement a simple info() call, I ended up fixing
Request to contain some pointer field and all callbacks to have Request*
parameter. And, now I have to place callback pointer into Request. which
calls another callback.

And, eventually, these "simple" callbacks would again require another
pointer (to some caller class).
2016-08-24 16:07:55 +06:00
Alexander Tkachev
e743a65636 CLOUD: Add Dropbox into CloudManager's configs
This commit adds:
* ConfMan's new "cloud" domain;
* CloudManager's init() method, where it loads keys from "cloud" configs
domain;
* CurlJsonRequest's addHeader() and addPostField() methods;
* temporary Storage's printInfo() method;
* DropboxStorage's implementation of printInfo(), which is using access
token and user id;
* DropboxStorage's loadFromConfig() static method to load access token
and user id from configs and create a Storage instance with those;
* temporary DropboxStorage's authThroughConsole() static method, which
guides user through auth process from the console.

So, in CloudManager's init() implementation ScummVM checks that there is
"current_storage_type" key in "cloud" domain of configs, and loads
corresponding storage if there is such key.

If there is no such key, ScummVM offers user to auth with Dropbox.
That's done through console, and thus it's temporary (it also requires
restarting ScummVM twice and manually editing config.ini file).
2016-08-24 16:07:55 +06:00
Alexander Tkachev
03217cd5c3 CLOUD: Add CurlJsonRequest
Now we can do REST API request by creating CurlJsonRequest and waiting
for it to call our callback. Passed pointer is Common::JSONValue.

This commit also does some minor variable renaming fixes.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
9c22b7cc64 CLOUD: Rewrite NetworkReadStream
Now it is based on MemoryReadWriteStream, which is introduced by this
commit. This stream is using ring buffer and is dynamically increasing
its size when necessary.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
b272bba751 CLOUD: Do minor fixes 2016-08-24 16:07:55 +06:00
Alexander Tkachev
fade746f37 CLOUD: Add USE_CLOUD feature
Adds USE_CLOUD in both configure and create_project.
2016-08-24 16:07:55 +06:00
Alexander Tkachev
ca2eeb2214 CLOUD: Add Cloud::Manager and Cloud::Storage
This commit introduces Common::CloudManager, which can be accessed from
OSystem.

The backend for this manager is Cloud::Manager (defined in
backends/cloud/manager.h). It should load all users storages from
configs and provide access to current Storage instance. For now it just
creates a new one.

Cloud::Storage (backends/cloud/storage.h) provides an API to interact
with cloud storage, for example, create new directory or sync files.
Right now it's not ready and has only two dummy methods: listDirectory()
and syncSaves().

There is Cloud::Dropbox::DropboxStorage backend
(backends/cloud/dropbox/dropboxstorage.h) for Cloud::Storage. Right now
it implements both listDirectory() and syncSaves() with starting timer
task and handling it by printing out some JSON examples.
2016-08-24 16:05:07 +06:00
Alexander Tkachev
7446ffd73b CLOUD: Integrate CloudThread into OSystem
Would be changed soon.
2016-08-24 16:05:07 +06:00
Alexander Tkachev
e4e2ec390d CLOUD: Remove wcsncasecmp() usage from SimpleJSON
Replaced with scumm_strnicmp().
2016-08-24 16:05:07 +06:00
Alexander Tkachev
2ac2816d68 CLOUD: Refactor SimpleJSON 2016-08-24 16:05:07 +06:00
Alexander Tkachev
a7fb8c72ab CLOUD: SimpleJSON refactor
Resharper + manual methods & fields renaming.
2016-08-24 16:05:07 +06:00
Alexander Tkachev
79e6368b42 CLOUD: Add SimpleJSON library (module.mk hotfix)
Forgot to edit those.
2016-08-24 16:05:07 +06:00
Alexander Tkachev
8429c40362 CLOUD: Add SimpleJSON library as Common::JSON
This commit also adds CloudThread class, which work() method is called
every second by TimerManager.

Right now it prints JSON examples on the console, so that's why it's
introduced with SimpleJSON library.
2016-08-24 16:05:07 +06:00
Eugene Sandulenko
0ab903a9e2 COMMON: Added checkers for debug channels.
Sometimes there is a need to add debug execution and enable it from
the command line. Now it is possible, both with debug levels and channels
2016-08-19 09:55:22 +02:00
Eugene Sandulenko
0fdab36710 COMMON: Introduce --debug-channels-only command line flag.
Many of our systems currently generate significant amount of debug
output on deeper levels. Now, when your engine is using Debug Channels,
you might want to show that debug information only, which is currently
not possible, as the generic output will be mixed in your output.

Alternative solution would be to implement possibility to specify
per-channel debug levels.
2016-08-13 21:07:43 +02:00
Willem Jan Palenstijn
68a15c10be Merge pull request #790 from salty-horse/clang_fixes
ALL: Don't use 'defined' in macro definitions
2016-08-13 11:57:39 +02:00
Paul Gilbert
9e0a6cda67 COMMON: Fix octal for GUIO_GAMEOPTIONS9 2016-08-12 20:46:21 -04:00
Alexander Tkachev
f58abd9540 COMMON: Update GZipWriteStream::pos()
Though it seemed the _wrapped stream should return valid position, it
was always 0. That's why I've added a _pos field, which is updated in
write() and returned in pos().
2016-08-04 15:14:06 +06:00
Alexander Tkachev
7a89caac84 COMMON: Add WriteStream::pos()
It returns int32, because some complex streams are derived from both
WriteStream and ReadStream, and in ReadStream pos() returns int32,
because -1 means an error.

I had to change MemoryStream's uint32 to int32, which is probably not so
good.
2016-08-04 14:36:21 +06:00
Eugene Sandulenko
9d3a2c1c7f Merge pull request #786 from dreammaster/titanic
TITANIC: Starship Titanic engine
2016-08-01 00:27:28 +03:00
Bastien Bouclet
8d34d5190d Revert "BUILD: Fix test compilation with event recorder enabled"
This reverts commit 1f8667c5d9.
2016-07-28 18:23:50 +02:00
Bastien Bouclet
ad3ab61241 COMMON: Remove the EventRecorder dependency from OSystem
EventRecorder is in the gui lib which is not linked in the cxxtest suite.
2016-07-28 18:23:46 +02:00
Ori Avtalion
4d120800fa ALL: Don't use 'defined' in macro definitions
This is undefined behavior and clang warns about it.
See <http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160118/147239.html>.
2016-07-23 16:18:51 +03:00
Paul Gilbert
68e230182c TITANIC: Implement TTparser normalize 2016-07-10 16:39:35 -04:00
Colin Snover
b6dbc79021 SCI32: Add support for blacklined video
Ow. My eyeballs.
2016-07-10 09:36:10 -05:00
Willem Jan Palenstijn
e243147f1e COMMON: Make MemoryWriteStreamDynamic private members protected 2016-07-02 21:19:23 +02:00
Eugene Sandulenko
603fccf74b COMMON: Fixed SortedArray implementation 2016-06-04 13:50:15 +02:00
Eugene Sandulenko
31913eee17 COMMON: Fix warning about shadowing class members 2016-05-28 17:18:17 +02:00
Eugene Sandulenko
cdbf10ca81 COMMON: Fix another warning.
We're shadowing the class variables with local ones.
2016-05-23 22:47:03 +02:00
Eugene Sandulenko
c383ed4104 COMMON: Remove const qualifiers.
We have to cast it back to void *, which loses const qualifier
2016-05-23 22:44:36 +02:00
Eugene Sandulenko
419211733e COMMON: Fix warning 2016-05-23 22:41:21 +02:00
Eugene Sandulenko
3d89af272b COMMON: Fix SortedArray implementation for empty array 2016-05-23 16:36:34 +02:00
Eugene Sandulenko
1f8667c5d9 BUILD: Fix test compilation with event recorder enabled 2016-05-23 16:36:26 +02:00
Eugene Sandulenko
a6fd06074d COMMON: Fix SortedArray implementation.
Had to use a modified bsearch for finding the nearest element.
2016-05-22 22:59:41 +02:00
Eugene Sandulenko
cc54c7723c COMMON: Implement SortedArray 2016-05-22 22:12:59 +02:00
Eugene Sandulenko
8d8b1836ba Merge pull request #688 from blorente/master
COMMON:String::replace and Common::replace functionality added.
2016-05-19 20:45:57 +02:00
Borja Lorente Escobar
a19b50ddf2 COMMON: Add replace functions to Common and String.
COMMON: Add replacement to common/algorithm.h

COMMON: Intermediate commit to show doubts.

 COMMON: Basic String::replace() methods implemented.

COMMON: Fix typo in the algorithm.h documentation.

COMMON: Fix documentation of String::replace()

COMMON: Fix formatting issues in method signatures.

COMMON: Add assert and reformat loops in str and algorithm.

COMMON: Fix typo in comment.

COMMON: Fix style in string test cases.

COMMON: Add Doxygen documentation to algorithm and String.

COMMON: Add Doxygen documentation to algorithm and String.

COMMON: Add Doxygen documentation to algorithm.

COMMON: Fix style in algorithm comments.

COMMON: Add Doxygen comments to String.

COMMON: Add Doxygen comments to algorithm test function.

COMMON: Add String support for substring replace.

COMMON: Fix string replace to comply with STL

COMMON: Fix documentation on string replace

COMMON: Fix style in string replace

COMMON: Fix unwanted reference problem in String::replace().

COMMON: Fix indentation in comments for replace

COMMON: Fix indentation in replace

COMMON: Fix comments in String::replace to match implementation.

COMMON: Remove assert to allow for not-null-terminated character arrays

COMMON: Add new test for String::replace

COMMON: Fix broken comments on String::replace

COMMON: Fix sharing bug on ensureCapacity

COMMON: Remove superfluous call to makeUnique()
2016-05-16 22:01:21 +02:00
Eugene Sandulenko
2cd0a99e2b Merge pull request #745 from Cruel/3ds
3DS: New Backend
2016-05-16 10:05:00 +02:00
Thierry Crozat
cede9e7734 UPDATES: Fix interval normalization
When given a valid value the normalization was returning the next
valid value instead of returning the given one. This caused for
example the interval to be changed each time we opened the
options (and thus check to be automatically activated the first
time the options were accessed).
2016-04-09 21:47:20 +01:00
Eugene Sandulenko
c18a12453e UPDATES: Implemented method getLastUpdateCheckTimeAndDate()
Currently it uses methods and constants deprecated in 10.10.
10.10+ -specific code will follow
2016-04-09 17:04:04 +02:00
Thomas Edvalson
e2b9572a83 3DS: Initial commit 2016-04-06 02:12:02 -04:00
Eugene Sandulenko
0925e9cd29 UPDATES: Fix endless loop 2016-04-03 23:10:55 +02:00
Eugene Sandulenko
d643036c20 Merge pull request #735 from sev-/updates-gui
UPDATES: Add GUI. Opt-in dialog and Options
2016-04-03 11:38:06 +02:00
Eugene Sandulenko
98f0be39e2 Merge pull request #743 from fuzzie/apple2-platform
COMMON: Add Apple II platform
2016-04-02 23:08:39 +02:00
Alyssa Milburn
0dd3563085 COMMON: Add Apple II platform 2016-04-02 21:57:48 +02:00
Eugene Sandulenko
a743ec2e07 UPDATES: Implement and use method for normalizing interval value to accepted values 2016-04-01 21:29:29 +02:00
Eugene Sandulenko
14478a65f1 UPDATES: Added documentation to new methods 2016-04-01 21:19:15 +02:00
Eugene Sandulenko
08e7f0ab91 UPDATES: Got rid of hardcoded update intervals list 2016-03-31 09:31:57 +02:00
Eugene Sandulenko
73784c6a84 UPDATES: Made interval set/get functions accept normal integers 2016-03-30 19:27:59 +02:00
Eugene Sandulenko
f1fa8ea1ca COMMON: Use better reallocation strategy in MemoryWriteStreamDynamic.
Fixes bug #6983: "SWORD25: long saving time"
2016-03-28 18:45:34 +02:00
Johannes Schickel
10d4d30628 Merge pull request #682 from lordhoto/savefilemanager-case-insensitive
ALL: Make SaveFileManager case insensitive.
2016-03-16 21:35:01 +01:00
Johannes Schickel
b8fb9e6a51 COMMON: Cleanup: Use StringArray instead of custom type. 2016-03-01 19:18:23 +01:00
Johannes Schickel
91b5c5a413 COMMON: Add a method to list files to MacResManager. 2016-03-01 19:16:10 +01:00
Willem Jan Palenstijn
d4d4b779aa COMMON: Fix Rect::intersects doc 2016-03-01 19:11:49 +01:00
Johannes Schickel
8c5931bca4 COMMON: Add documentation about savefile names. 2016-02-25 21:51:53 +01:00
Johannes Schickel
e7e7aa0558 COMMON: Beautify SaveFileManager documentation. 2016-02-25 21:51:53 +01:00
Colin Snover
4ba0ff8deb COMMON: Add convenience method to Common::Rational for 1:1 ratios
For SCI engine games, ratios may not be normalised and so to avoid
extra scaling, there needs to be a way to simply check whether a
ratio is 1:1.
2016-02-18 13:18:02 -06:00
Colin Snover
7d54f0aaaf COMMON: Add methods for inserting and erasing with iterators
This provides improved feature parity to Common::List and is used
in SCI32 engine.
2016-02-18 13:18:01 -06:00
Alexandre Detiste
6c298e964f JANITORIAL: Typos detected with lintian & grep 2016-02-15 18:27:02 +01:00
Johannes Schickel
01d3d02679 COMMON: Fix formatting issues in archive.cpp. 2016-02-09 12:10:04 +01:00
Willem Jan Palenstijn
3e90a83aa4 COMMON: Fix memory leak in decompressDCL 2016-02-07 00:00:13 +01:00
Johannes Schickel
29b37f473c COMMON: Add render mode for Macintosh.
On request of m_kiewitz who wants to use it for AGI.
2016-02-05 12:38:28 +01:00
Johannes Schickel
06641f29a7 COMMON: Allow '#' to only match digits in matchString. 2016-01-26 16:35:30 +01:00
Johannes Schickel
354a3af717 COMMON: Add another GUIO game option flag.
We still can only display 7 options in our GUI though. Blame m_kiewitz if
anybody runs into that issue now. He wanted this.
2016-01-22 01:20:37 +01:00
Johannes Schickel
b166cb84e2 COMMON: Use spaces for beautifying formatting. 2016-01-21 23:48:48 +01:00
Johannes Schickel
a481702488 COMMON: Allow translation of PC-98 render modes. 2016-01-21 23:41:30 +01:00
Johannes Schickel
0024519e9c COMMON: Use our standard FM-TOWNS spelling for render modes. 2016-01-21 23:41:30 +01:00
Johannes Schickel
1479219f7a COMMON: Add render modes for Apple IIgs and Atari ST.
On request of m_kiewitz who wants to use it for AGI.
2016-01-21 23:41:30 +01:00
Johannes Schickel
54f5c95832 COMMON: Make FSNode(AbstractFSNode *) private again.
This also fixes a memory leak in OSystem_iOS7::addSysArchivesToSearchSet.
2016-01-07 11:25:02 +01:00
Vincent Bénony
73385584ba IOS: Adds a warning 2016-01-06 16:20:30 +01:00
Vincent Bénony
e0bfdb41d0 IOS: Formatting 2016-01-06 16:20:30 +01:00
Vincent Bénony
16605a3e10 IOS: Moves the helper function were it is used. 2016-01-06 16:20:29 +01:00
Vincent Bénony
64f50761ec IOS: Merge master 2016-01-06 16:19:03 +01:00
Vincent Bénony
bbf3785bba IOS: Adds two helper functions on strings 2016-01-06 15:35:30 +01:00
Vincent Bénony
108ce38443 IOS: Added a chroot like filesystem
This is needed because it is not possible to keep absolute paths to the iOS document directory, because a part of its name change between each installation / update.
2016-01-06 15:35:17 +01:00
Johannes Schickel
e7f54aec7d COMMON: A few formatting fixes. 2015-12-12 06:54:58 +01:00
Filippos Karapetis
7707f05338 COMMON: Throw a warning on inconsistent DCL fixed size buffers
This is useful for debugging, and needed for fixes in Russian fan made
translations of The Neverhood Chronicles
2015-11-19 02:05:12 +02:00
Filippos Karapetis
65a36315ea COMMON: The DCL decompressor is also used in neverhood 2015-11-19 02:05:12 +02:00
Bertrand Augereau
1311fe5c49 COMMON: Avoid useless (and dangerous when cctor/operator= don't support it) SWAP(x, x) in sorting 2015-11-10 20:08:19 +01:00
Bertrand Augereau
4920b3ab3e COMMON: Some ill-formed xml files triggered a seek(CUR, -2) in the parser 2015-11-09 22:51:15 +01:00
Paul Gilbert
89dfd36b60 CREATE_PROJECT: Add support for Visual Studio 2015 2015-09-28 19:23:58 -04:00
Bastien Bouclet
53388bf6e8 COMMON: Plug a memory leak in the FFT class 2015-07-13 18:45:31 +02:00