aboutsummaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2016-08-24CLOUD: Make StorageInfo usefulAlexander Tkachev
It now contains a few useful methods to get name or quota usage. DropboxStorage returns a finely filled StorageInfo.
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: Fix Request destructorAlexander Tkachev
It now contains not a pointer to a function, but an actual pointer, which must be freed.
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 ConnectionManager hotfixAlexander Tkachev
Tried to compile these two last commits with GCC and found a few minor problems.
2016-08-24CLOUD: Make ConnectionManager singletonAlexander Tkachev
With ConnectionManager singleton one can start their Requests without creating Storage instance. Moreover, Storage instance should contain cloud API, not Requests-related handling and timer starting methods. Thus, these methods were moved into ConnectionManager itself.
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: Fix CurlJsonRequestAlexander Tkachev
It's using MemoryWriteStreamDynamic instead of String and it prepares raw byte contents of this stream for JSON::parse().
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: Add ConnectionManager and NetworkReadStreamAlexander Tkachev
NetworkReadStream actually saves whole response in the memory now. There is a pause mechanism in libcurl, but if libcurl is requesting something compressed, it would have to uncompress data as it goes even if we paused the request. Even though our own stream won't be notified about this data when when "pause" the request, libcurl's own buffer wound be expanding.
2016-08-24CLOUD: Add CurlRequestAlexander Tkachev
CurlRequest uses own multi_handle, in which it creates an easy_handle to make a request. Every time `handle()` is called it checks whether request is complete and, if it is, stops.
2016-08-24CLOUD: Fix GCC static cloudThread compile errorAlexander Tkachev
It's not static anymore.
2016-08-24CLOUD: Add first RequestAlexander Tkachev
Just fooling around with the example Request, but the idea works well.
2016-08-24CLOUD: Do minor fixesAlexander Tkachev
2016-08-24CONFIGURE: Fix cloud support detectionEugene Sandulenko
2016-08-24CLOUD: Add USE_CLOUD featureAlexander Tkachev
Adds USE_CLOUD in both configure and create_project.
2016-08-24CONFIGURE: Added libcurl detectionEugene Sandulenko
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-24CONFIGURE: Added detection for SDL_netEugene Sandulenko
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-24SCI32: Add workarounds for a bug in Torin, in an animation of LycentiaFilippos Karapetis
2016-08-24DIRECTOR: Add more width corrections for Apartment demoTorbjörn Andersson
These are the widths for the taxi. 1110 doesn't actually need a correction to be drawn right, but 96 makes more sense than 90 if I decode the image by hand. It may be worth noting that all three sprite widths are multiples of 8, and that one of them was already a multiple of 8, but I still needed to add 8 to it. (This would suggest that w = (w & ~7) + 8 would yield the correct width for everything, except it doesn't so scratch that idea.)
2016-08-23TITANIC: Implemented more game classesPaul Gilbert
2016-08-24ADL: Make the optional scanlines less harshWalter van Niftrik
2016-08-24DIRECTOR: Gather statistic on correct bitmap sizesEugene Sandulenko
2016-08-23DIRECTOR: Added test D3 targetEugene Sandulenko
2016-08-23DIRECTOR: Further reduction of include dependencyEugene Sandulenko
2016-08-23DIRECTOR: Reduce header dependencyEugene Sandulenko
2016-08-23SCI32: Fix crash in Torin, chapter 4, catapult scene (via ScreenItem)Filippos Karapetis
loopNo/celNo are set to unsigned integers in ScreenItem::setFromObject in SSCI, thus their value will be adjusted when it's negative, like in this case
2016-08-23TITANIC: Implemented CLift classPaul Gilbert
2016-08-23SCI32: Allow kListAt to reference an empty listFilippos Karapetis
Happens in Torin when examining Di's locket in chapter 3
2016-08-23SCI32: Add a workaround for an uninitialized variable in TorinFilippos Karapetis
2016-08-23SCI32: Explicitly abord kEachElementDo when a game is being loadedFilippos Karapetis
This is a better check than the one in commit 3d1f1a3a21
2016-08-23SCI32: Update the SCI2/SCI2.1 games that use global 90 for speech/subsFilippos Karapetis
2016-08-23SCI32: Fix restoring games from Torin's game restore dialogFilippos Karapetis
The list in kListEachElementDo may be invalidated after a selector invocation
2016-08-23SCI32: Also handle game checks for "torinsg.cat" in TorinFilippos Karapetis
This shows the "Open..." button when continuing a game
2016-08-23DIRECTOR: Split score.cpp file into classesEugene Sandulenko
2016-08-23DIRECTOR: Fix memory overwriteEugene Sandulenko
2016-08-23SCI32: Fix palette in SCI32 Mac gamesFilippos Karapetis
2016-08-22TITANIC: Implemented more game classesPaul Gilbert