Age | Commit message (Collapse) | Author |
|
Instead of all these atoull() I've added everywhere.
|
|
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.
|
|
|
|
So one can erase everything from OSD and then blit something on it.
|
|
I was lazy to implement that in OpenGLGraphicsManager and I'm not sure
it's implemented correctly in SurfaceSdlGraphicsManager, but it works
for me.
|
|
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.
|
|
It's needed to ::destroy() it in main().
|
|
Also add CloudManager::testFeature(), because syncSaves() now works fine
and I don't want to break it again and again with my testing requests.
|
|
Added ErrorResponse and ErrorCallback. Each Request now has an
ErrorCallback, which should be called instead of usual callback in case
of failure.
|
|
It's needed for the cloud saves upload/sync feature.
|
|
|
|
|
|
I get 'warning: ISO C++98 does not support the '%lg' ms_printf format'
warning though.
|
|
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.
|
|
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.
|
|
There was a problem with file downloading in MinGW. Strangely, there is
no such problem in Visual Studio, yet this fixes the problem.
|
|
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.
|
|
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.
|
|
And do some minor cleanup work.
|
|
Cleaned up all example code and old callbacks.
New Callback classes are introduced in "common/callback.h" and
documented.
|
|
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.
|
|
These callbacks can call object's methods, not some global C functions.
DropboxStorage::info2() and DropboxStorage::infoMethodCallback()
demonstrate the idea.
|
|
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).
|
|
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).
|
|
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.
|
|
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.
|
|
|
|
Adds USE_CLOUD in both configure and create_project.
|
|
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.
|
|
Would be changed soon.
|
|
Replaced with scumm_strnicmp().
|
|
|
|
Resharper + manual methods & fields renaming.
|
|
Forgot to edit those.
|
|
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.
|
|
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
|
|
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.
|
|
ALL: Don't use 'defined' in macro definitions
|
|
|
|
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().
|
|
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.
|
|
TITANIC: Starship Titanic engine
|
|
This reverts commit 1f8667c5d949070035390531e4f10c0f945d7352.
|
|
EventRecorder is in the gui lib which is not linked in the cxxtest suite.
|
|
This is undefined behavior and clang warns about it.
See <http://lists.llvm.org/pipermail/cfe-commits/Week-of-Mon-20160118/147239.html>.
|
|
|
|
Ow. My eyeballs.
|
|
|
|
|
|
|