diff options
Diffstat (limited to 'src/library_sdl.js')
-rw-r--r-- | src/library_sdl.js | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/src/library_sdl.js b/src/library_sdl.js index da682eab..7078aa9d 100644 --- a/src/library_sdl.js +++ b/src/library_sdl.js @@ -940,7 +940,10 @@ var LibrarySDL = { // TODO }, - SDL_GetKeyboardState: function() { + SDL_GetKeyboardState: function(numKeys) { + if (numKeys) { + {{{ makeSetValue('numKeys', 0, 0x10000, 'i32') }}}; + } return SDL.keyboardState; }, @@ -1097,7 +1100,11 @@ var LibrarySDL = { return ret; }, + rotozoomSurface__deps: ['zoomSurface'], rotozoomSurface: function(src, angle, zoom, smooth) { + if (angle % 360 === 0) { + return _zoomSurface(src, zoom, zoom, smooth); + } var srcData = SDL.surfaces[src]; var w = srcData.width * zoom; var h = srcData.height * zoom; @@ -1828,6 +1835,11 @@ var LibrarySDL = { return Math.floor(fontData.size*0.02); // XXX }, + TTF_FontHeight: function(font) { + var fontData = SDL.fonts[font]; + return fontData.size; + }, + // SDL gfx $SDL_gfx: { |