diff options
author | Jukka Jylänki <jujjyl@gmail.com> | 2013-06-13 16:49:36 +0300 |
---|---|---|
committer | Jukka Jylänki <jujjyl@gmail.com> | 2013-06-13 16:49:36 +0300 |
commit | 45de2f170796d9fe3b17f4d9e3539b46fd6a056a (patch) | |
tree | b384d45eaed48fda0fd40270769f9a6de0c5a580 /src | |
parent | 886e3158cf5d95a2c2721e5eb9a1c3ac4461f805 (diff) |
Don't throw when SDL_CreateRGBSurfaceFrom is called, but at least give an uninitialized surface.
Diffstat (limited to 'src')
-rw-r--r-- | src/library_sdl.js | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/library_sdl.js b/src/library_sdl.js index a131f424..6adfc1e2 100644 --- a/src/library_sdl.js +++ b/src/library_sdl.js @@ -965,6 +965,13 @@ var LibrarySDL = { return SDL.makeSurface(width, height, flags, false, 'CreateRGBSurface', rmask, gmask, bmask, amask); }, + SDL_CreateRGBSurfaceFrom: function(pixels, width, height, depth, pitch, rmask, gmask, bmask, amask) { + // TODO: Actually fill pixel data to created surface. + // TODO: Take into account depth and pitch parameters. + console.log('TODO: Partially unimplemented SDL_CreateRGBSurfaceFrom called!'); + return SDL.makeSurface(width, height, 0, false, 'CreateRGBSurfaceFrom', rmask, gmask, bmask, amask); + }, + SDL_DisplayFormatAlpha: function(surf) { var oldData = SDL.surfaces[surf]; var ret = SDL.makeSurface(oldData.width, oldData.height, oldData.flags, false, 'copy:' + oldData.source); @@ -1837,7 +1844,6 @@ var LibrarySDL = { Mix_FadeOutChannel: function() { throw 'Mix_FadeOutChannel' }, Mix_Linked_Version: function() { throw 'Mix_Linked_Version: TODO' }, - SDL_CreateRGBSurfaceFrom: function() { throw 'SDL_CreateRGBSurfaceFrom: TODO' }, SDL_SaveBMP_RW: function() { throw 'SDL_SaveBMP_RW: TODO' }, SDL_HasRDTSC: function() { return 0; }, |