aboutsummaryrefslogtreecommitdiff
path: root/common
AgeCommit message (Collapse)Author
2016-08-24CLOUD: Make DefaultSaveFileManager ignore syncing filesAlexander Tkachev
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-24GUI: Add getOSDFormat() and make OSD 32 bppAlexander Tkachev
2016-08-24GUI: Add clearOSD() methodAlexander Tkachev
So one can erase everything from OSD and then blit something on it.
2016-08-24GUI: Add copyRectToOSD()Alexander Tkachev
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-24CLOUD: Add GoogleDriveStorageAlexander Tkachev
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-24CLOUD: Make CloudManager singletonAlexander Tkachev
It's needed to ::destroy() it in main().
2016-08-24CLOUD: Add DropboxCreateDirectoryRequestAlexander Tkachev
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-24CLOUD: Refactor RequestAlexander Tkachev
Added ErrorResponse and ErrorCallback. Each Request now has an ErrorCallback, which should be called instead of usual callback in case of failure.
2016-08-24COMMON: Add SaveFileManager::openRawFile()Alexander Tkachev
It's needed for the cloud saves upload/sync feature.
2016-08-24COMMON: Fix JSON to understand integers correctlyAlexander Tkachev
2016-08-24Fix comment formattingPeter Bozsó
2016-08-24CLOUD: Fix format string warningsAlexander Tkachev
I get 'warning: ISO C++98 does not support the '%lg' ms_printf format' warning though.
2016-08-24CLOUD: Add RequestIdPair structAlexander Tkachev
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-24CLOUD: Make download() create necessary directoriesAlexander Tkachev
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-24CLOUD: Fix MemoryReadWriteStreamAlexander Tkachev
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-24CLOUD: Add OneDrive Storage stubAlexander Tkachev
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-24CLOUD: Add Storage saving mechanismAlexander Tkachev
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-24CLOUD: Add Callback typedefsAlexander Tkachev
And do some minor cleanup work.
2016-08-24CLOUD: Polish CallbacksAlexander Tkachev
Cleaned up all example code and old callbacks. New Callback classes are introduced in "common/callback.h" and documented.
2016-08-24CLOUD: Add CallbackBridgeAlexander Tkachev
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-24CLOUD: Add object-oriented CallbacksAlexander Tkachev
These callbacks can call object's methods, not some global C functions. DropboxStorage::info2() and DropboxStorage::infoMethodCallback() demonstrate the idea.
2016-08-24CLOUD: Add complex callbacksAlexander Tkachev
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-24CLOUD: Add Dropbox into CloudManager's configsAlexander Tkachev
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-24CLOUD: Add CurlJsonRequestAlexander Tkachev
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-24CLOUD: Rewrite NetworkReadStreamAlexander Tkachev
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-24CLOUD: Do minor fixesAlexander Tkachev
2016-08-24CLOUD: Add USE_CLOUD featureAlexander Tkachev
Adds USE_CLOUD in both configure and create_project.
2016-08-24CLOUD: Add Cloud::Manager and Cloud::StorageAlexander Tkachev
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-24CLOUD: Integrate CloudThread into OSystemAlexander Tkachev
Would be changed soon.
2016-08-24CLOUD: Remove wcsncasecmp() usage from SimpleJSONAlexander Tkachev
Replaced with scumm_strnicmp().
2016-08-24CLOUD: Refactor SimpleJSONAlexander Tkachev
2016-08-24CLOUD: SimpleJSON refactorAlexander Tkachev
Resharper + manual methods & fields renaming.
2016-08-24CLOUD: Add SimpleJSON library (module.mk hotfix)Alexander Tkachev
Forgot to edit those.
2016-08-24CLOUD: Add SimpleJSON library as Common::JSONAlexander Tkachev
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-19COMMON: Added checkers for debug channels.Eugene Sandulenko
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-13COMMON: Introduce --debug-channels-only command line flag.Eugene Sandulenko
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-13Merge pull request #790 from salty-horse/clang_fixesWillem Jan Palenstijn
ALL: Don't use 'defined' in macro definitions
2016-08-12COMMON: Fix octal for GUIO_GAMEOPTIONS9Paul Gilbert
2016-08-04COMMON: Update GZipWriteStream::pos()Alexander Tkachev
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-04COMMON: Add WriteStream::pos()Alexander Tkachev
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-01Merge pull request #786 from dreammaster/titanicEugene Sandulenko
TITANIC: Starship Titanic engine
2016-07-28Revert "BUILD: Fix test compilation with event recorder enabled"Bastien Bouclet
This reverts commit 1f8667c5d949070035390531e4f10c0f945d7352.
2016-07-28COMMON: Remove the EventRecorder dependency from OSystemBastien Bouclet
EventRecorder is in the gui lib which is not linked in the cxxtest suite.
2016-07-23ALL: Don't use 'defined' in macro definitionsOri Avtalion
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-10TITANIC: Implement TTparser normalizePaul Gilbert
2016-07-10SCI32: Add support for blacklined videoColin Snover
Ow. My eyeballs.
2016-07-02COMMON: Make MemoryWriteStreamDynamic private members protectedWillem Jan Palenstijn
2016-06-04COMMON: Fixed SortedArray implementationEugene Sandulenko
2016-05-28COMMON: Fix warning about shadowing class membersEugene Sandulenko
2016-05-23COMMON: Fix another warning.Eugene Sandulenko
We're shadowing the class variables with local ones.