Commit Graph

359 Commits

Author SHA1 Message Date
Alex Szpakowski 113ed1cfe7 Merged SDL2 changes from bartbes/love-experiments/SDL2 into default.
- Added love.system module, including clipboard functions.

- Added custom hardware cursors (love.mouse.newCursor, love.mouse.setCursor.)

- Revamped love.joystick:
-- added Joystick objects and moved love.joystick functions which operated on individual joysticks to methods on the Joystick objects.
-- Added love.joystick.getJoystick and love.joystick.getJoystickCount.
-- Added events for when joysticks are connected and disconnected.
-- Added 'Gamepad' methods to Joystick objects: Joystick:isGamepad, Joystick:getGamepadAxis, and Joystick:isGamepadDown. They're a common abstraction for xbox controller-like joystick across operating systems.

- Added monitor choosing support and "fullscreen desktop" mode to love.window.

- Moved unicode text input events to their own callback function (love.textinput), removed the key repeat functions from love.keyboard and made the second argument of love.keypressed a boolean saying whether the keypress was a repeat.

- liblove now works with love.window and love.graphics in OS X
2013-08-25 16:51:42 -03:00
Alex Szpakowski ce4d895918 The error handler now makes sure the mouse is visible and ungrabbed 2013-08-17 03:44:44 -03:00
Alex Szpakowski 3fc0d0171a Fall back to an alternative visual in the nogame screen if subtractive blending isn't supported, instead of erroring 2013-08-17 00:08:22 -03:00
Alex Szpakowski d815374a9b Renamed the 'ModelViewMatrix' and 'ModelViewProjectionMatrix' built-in shader variables to 'TransformMatrix' and 'TransformProjectionMatrix', respectively. 2013-08-16 03:17:55 -03:00
Alex Szpakowski ecd5330c57 Made the no-game screen resizable (thanks Robin) 2013-08-14 19:56:04 -03:00
Alex Szpakowski 76565a3e11 Renamed love.window.setCaption to love.window.setTitle (resolves issue #703) 2013-08-14 11:16:41 -03:00
Alex Szpakowski 73e9f327dc Cleaned up boot.lua a tiny bit 2013-08-08 03:19:54 -03:00
Alex Szpakowski fc3affb9b9 Removed 'release mode' and love.releaseerrhand, and added love.filesystem.isFused (resolves issue #579).
Games which are fused (either via appending the .love to the executable or with --fused) automatically have the changes which previously only applied to fused games in release mode.
2013-08-05 15:02:50 -03:00
Alex Szpakowski 140a19593b Changed the default error handlers to attempt to create a window to show the error if the window isn't created yet, instead of just quitting 2013-08-04 18:07:50 -03:00
Alex Szpakowski 7a20bbc6c4 Added an optional search order enum ("first" or "last") to love.filesystem.setIdentity and love.filesystem.mount (resolves issue #694) 2013-08-04 00:32:23 -03:00
Alex Szpakowski a4ff39e0d4 Improved error checking for some enum strings (resolves issue #690).
Also moved love.audio.newSource from Lua code into C++ code
2013-08-03 21:24:43 -03:00
Alex Szpakowski 2106ff2403 Added love.threaderror event callback function (re issue #673) 2013-08-03 15:10:08 -03:00
Alex Szpakowski bdb4c7eb90 Renamed t.screen to t.window in love.conf (resolves issue #637) 2013-07-20 14:49:14 -03:00
Alex Szpakowski 67353d4de7 Reduced CPU usage (and improved performance) for the nogame screen 2013-07-14 18:04:20 -03:00
rude aa1c091cc9 Add Baby Inspector no-game screen.
As always, I had great plans for the no game screen, but these great plans take
way too much time to implement. So I settled for something simpler, i.e. the
standard LSD stuff.
2013-07-14 21:49:04 +02:00
Alex Szpakowski 8084096937 Fixed the error screen sometimes not properly appearing until the next input event due to double/triple-buffering 2013-07-01 23:29:18 -03:00
Alex Szpakowski 958a25e0af Flipped the loading order of the graphics and window modules (first window, then graphics) 2013-06-21 06:02:09 -03:00
Alex Szpakowski 66b9b46846 Removed the love.joystickball event callback function 2013-06-12 06:30:00 -03:00
Alex Szpakowski 6b7eb35d8a Added love.visible(boolean visible) event callback 2013-06-11 20:15:55 -03:00
Alex Szpakowski f253a016f6 Cleaned up love.run a bit 2013-06-08 19:56:36 -03:00
Alex Szpakowski 6a76e082e4 Re-added love.graphics.getWidth/getHeight 2013-05-28 20:23:31 -03:00
Alex Szpakowski 252aa114a7 Fixed a potential error in the release errhand function 2013-05-27 16:18:38 -03:00
Bart van Strien 7b923dc75b On windows, open the console window before the main window, which should mean that the main window gets focus 2013-05-24 22:22:40 +02:00
Alex Szpakowski 4dc2072fc6 Fixed error messages in functions where love.filesystem.newFile(Data) is called internally 2013-05-23 17:59:15 -03:00
Alex Szpakowski 7959158ffa love.audio.newSource now optionally accepts FileData (issue #624) 2013-05-23 14:03:58 -03:00
Alex Szpakowski eaf69aead1 Renamed love.window.setTitle back to love.window.setCaption
Previous rename was unnecessary
2013-05-21 22:24:51 -03:00
Alex Szpakowski 123889dfed Converted code for Shader:send from Lua to C++ 2013-05-21 20:41:26 -03:00
Alex Szpakowski ff77eb4b29 Added love.window (issue #6.) All window-related functions have been moved from love.graphics to love.window.
love.graphics.setCaption has been renamed to love.window.setTitle.
2013-05-10 22:32:15 -03:00
Bart van Strien 8a5c8c4dc4 Use tail calls to event handlers from love.handlers 2013-05-10 19:06:12 +02:00
Bart van Strien 79d1a7a6ef Add love.mousefocus (partial issue #120) temporary name (see issue #573) and it's waiting for an exposed love.window to get a check, too 2013-05-10 19:03:16 +02:00
Alex Szpakowski c9003750fa Removed extension and "."'s from default filesystem identity (issue #568) 2013-05-03 15:43:10 -03:00
Alex Szpakowski 77c6efd8fd Fixed love.mouse.setPosition when called in love.load (issue #611) 2013-05-02 07:05:14 -07:00
Alex Szpakowski 0130b726de Improved error messages when sending bad values to a shader (also issue #587) 2013-04-24 23:19:37 -07:00
Alex Szpakowski 6142352cd4 love._openConsole is now called before main.lua is loaded 2013-04-18 17:03:32 -03:00
Alex Szpakowski ba3a363fd3 Potentially worked around an SDL resize event bug in windows causing initial window creation to happen twice 2013-04-12 14:20:00 -03:00
Alex Szpakowski 7391d9821f Merged love.graphics.origin into default (issue #124) 2013-04-11 17:59:32 -03:00
Alex Szpakowski 63ac9aa52a De-obfuscated more shader error message tracebacks 2013-03-27 19:44:50 -03:00
Alex Szpakowski a55c7e871e fixed canvas:clear() when multi-canvas rendering is active, changed some names and wording
--HG--
branch : MRTs
2013-03-26 04:58:43 -03:00
Alex Szpakowski 2ea065c68b Added MRT support to canvases via love.graphics.setCanvases(c1, c2, ...), and an 'effects' callback function in shaders.
- Simultanious rendering to multiple canvases requires all canvases to be the same size (limitation of pre-GL3.0 framebuffers)
- love.graphics.isSupported("mrtcanvas") was added
- love_Canvases[n] (0-based array of active canvases) can be written to in pixel shaders in the 'effects' callback function
- everything drawn to multiple canvases at once will be duplicated to all canvases if no shader is active or the standard 'effect' shader function is used

--HG--
branch : MRTs
2013-03-24 02:20:15 -03:00
Alex Szpakowski 9e9eb42f1d Fixed filedata not being cleaned up when love.image.newImageData(filepath) fails 2013-03-19 09:01:15 -03:00
Alex Szpakowski f3290d84b7 Improved error handling and error messages when love.graphics.newShader fails 2013-03-18 22:55:41 -03:00
Alex Szpakowski 991b15d670 More renaming of "fragment" to "pixel" 2013-03-18 04:07:18 -03:00
Bart van Strien 7efe11b11f Add centered flag to setMode, optionally centers the window (on by default, as before) (issue #463) 2013-03-10 23:00:31 +01:00
Alex Szpakowski 6b1222366d Removed 'moved' suffix from new joystick callbacks
--HG--
branch : joystickevents
2013-03-05 12:31:11 -04:00
Alex Szpakowski a844ac2389 Added love.joystickaxismoved, love.joystickballmoved, and love.joystickhatmoved callbacks
--HG--
branch : joystickevents
2013-03-04 18:49:25 -04:00
Alex Szpakowski 2d7dd87eb5 Removed PixelEffect compatibility functions (love.graphics.newPixelEffect is now love.graphics.newShader, etc)
Also removed love.graphics.isSupported("pixeleffect") in favor of love.graphics.isSupported("shader")
2013-03-04 14:01:04 -04:00
Bart van Strien 3d0c5761ce Merge in default, update changelog
--HG--
branch : minor
2013-03-03 19:51:04 +01:00
vrld 5f586390d8 Add module love.math. Implements xorshift RNG.
Contains just a RNG for now, but may include other functionality (e.g.
transforms) later on.

New Functions:

-- as in the lua math library:
love.math.randomseed(number) -- set random seed
love.math.random()           -- get random number in [0:1) (uniformly distributed)
love.math.random(high)       -- get integer random number in [1:high]
love.math.random(low, high)  -- get integer random number in [low:high]

-- additional functions
love.math.randnormal()     -- get normally distributed number with zero mean
                           -- and unit variance
love.math.randnormal(o)    -- get normally distributed number with zero mean
                           -- and standard deviation `o`
love.math.randnormal(m, o) -- get normally distributed number with mean `m`
                           -- and standard deviation `o`
2013-02-25 18:32:54 +01:00
Alex Szpakowski 083218742a Added love.graphics.origin(): resets the coordinate system (replaces the current transformation matrix with the identity)
--HG--
branch : love.graphics.origin
2013-02-24 14:07:03 -04:00
Alex Szpakowski 3cf03fee8f Fixed the lua header generator script to output the correct year in the copyright text 2013-02-06 23:53:22 -04:00