emscripten Humble Cloud interface
Edward Rudd
2015-07-09 232d457188ce7efce8f32670473a4524276b488b
client/library/library_humble.js
@@ -182,8 +182,8 @@
    humble_init: function() {
        // Dummy function to pull in the rest of the functions
    },
    humble_sync__deps: ['$FS', '$CLOUDFS','$HUMBLE_API'],
    humble_sync: function() {
    humble_syncfs__deps: ['$FS', '$CLOUDFS','$HUMBLE_API'],
    humble_syncfs: function() {
        FS.syncfs(function (err) {
            console.log('File Sync');
        });
@@ -216,15 +216,17 @@
            }
        });
    },
    humble_get_player_size__deps: ['$HUMBLE_API'],
    humble_get_player_size: function(w, h) {
        var ret = {width: 0, height: 0, locked: false};
        if (HUMBLE_API.options.playerSize) {
            ret = HUMBLE_API.options.playerSize();
        }
        if (w) {{{ makeSetValue('w', '0', 'ret.width', 'i32') }}};
        if (h) {{{ makeSetValue('h', '0', 'ret.height', 'i32') }}};
        if (w && ret.width > 0) {{{ makeSetValue('w', '0', 'ret.width', 'i32') }}};
        if (h && ret.height > 0) {{{ makeSetValue('h', '0', 'ret.height', 'i32') }}};
        return ret.locked ? 1 : 0;
    },
    humble_demo_ended__deps: ['$HUMBLE_API'],
    humble_demo_ended: function() {
        if (HUMBLE_API.options.demoEndedCallback) {
            return HUMBLE_API.options.demoEndedCallback.call(HUMBLE_API);
@@ -232,5 +234,4 @@
    }
};
autoAddDeps(LibraryHUMBLE, '$HUMBLE_API');
mergeInto(LibraryManager.library, LibraryHUMBLE);