Commit Graph

2969 Commits

Author SHA1 Message Date
Alex Szpakowski 5c1e6014cc Changed the love.keypressed and love.keyreleased event callbacks to be love.keypressed(key, scancode, isrepeat) and love.keyreleased(key, scancode). Added love.keyboard.isScancodeDown. Resolves issue #993.
--HG--
branch : minor
2015-02-16 17:10:03 -04:00
Alex Szpakowski cce995146f Merged default into minor
--HG--
branch : minor
2015-02-16 16:44:14 -04:00
Alex Szpakowski 976ce8ae00 Fixed cmakelists.txt.
--HG--
branch : minor
2015-02-16 16:31:10 -04:00
Alex Szpakowski 7f9abc1e77 Added love.touch module and touch screen events. Resolves issue #825.
Note: this implementation is slightly different from the implementation in the love 0.9.x Android and iOS ports!

Added love.touchpressed(id, x, y), love.touchmoved(id, x, y, dx, dy), and love.touchreleased(id, x, y, dx, dy).

id is a unique identifier for the touch press that persists until love.touchreleased. After that it is no longer unique.
x and y are the coordinates of the touch event in pixels within the window.
dx and dy are the amount in pixels that the touch has moved since the last event.

Added love.touch.getTouchCount and love.touch.getTouch(index).

love.touch.getTouch takes an index (not the same as an id. indices are not stable and don't correspond to a unique touch press.)
It returns the id of the touch and its current x and y coordinates in pixels.

--HG--
branch : minor
2015-02-16 16:29:45 -04:00
Alex Szpakowski 24cb934fa6 Slightly reduced the memory usage of Fonts / Rasterizers created using the default font.
--HG--
branch : minor
2015-02-16 04:19:07 -04:00
Alex Szpakowski fb79788d74 Moved more Font code out of the FreeType implementation files.
--HG--
branch : minor
2015-02-16 03:12:47 -04:00
Alex Szpakowski e8286de1f3 Pulled some Font module code out of the freetype implementation files, since it's not freetype-specific.
--HG--
branch : minor
2015-02-16 01:47:20 -04:00
Alex Szpakowski c2628fe4f9 Added a workaround for a bug in PhysFS 2.1-alpha involving trailing slashes and PHYSFS_enumerateFiles.
--HG--
branch : minor
2015-02-16 00:27:17 -04:00
Alex Szpakowski 8edea22179 Added love.mouse.hasCursor. Returns true if mouse cursors are available.
--HG--
branch : minor
2015-02-16 00:21:39 -04:00
Alex Szpakowski 1f726b2fa1 Code style cleanup.
--HG--
branch : minor
2015-02-16 00:17:48 -04:00
Alex Szpakowski 813457aa71 Pre-emptive fix for an attenuation distance issue in iOS' OpenAL implementation.
--HG--
branch : minor
2015-02-16 00:10:11 -04:00
Alex Szpakowski 606f077e5d Moved Mac-specific code from platform/macosx/ to src/common/
--HG--
branch : minor
2015-02-15 23:44:35 -04:00
Alex Szpakowski 976deb0b74 Added a Sound Decoder using Apple's CoreAudio framework.
--HG--
branch : minor
2015-02-15 21:57:43 -04:00
Alex Szpakowski c106d9ff53 love.event can now handle any number of event arguments.
--HG--
branch : minor
2015-02-15 21:31:22 -04:00
Alex Szpakowski 672899f5c7 Use a message box for version compatibility warnings, rather than displaying a timed message before the game loads. 2015-02-15 17:38:43 -04:00
Alex Szpakowski 7d2f1d74a4 Renamed the Key and Scancode constants representing the spacebar from " " to "space" (see issue #976.)
--HG--
branch : minor
2015-02-15 16:11:50 -04:00
Alex Szpakowski b0b4613896 I forgot to export love.window.maximize in time for 0.9.2's release. :( 2015-02-14 21:00:30 -04:00
Alex Szpakowski 7a7567145a Updated the 0.10.0 changelog.
--HG--
branch : minor
2015-02-14 18:55:28 -04:00
Alex Szpakowski 10cf501979 Merged default into minor
--HG--
branch : minor
2015-02-14 18:53:31 -04:00
Alex Szpakowski ed4c364171 Fixed a potential crash when an invalid Scancode constant argument is used in love.keyboard.getKeyFromScancode. 2015-02-14 17:54:25 -04:00
Alex Szpakowski 84294ac684 Added tag 0.9.2 for changeset a5e405cdf14d 2015-02-14 16:12:18 -04:00
Alex Szpakowski 39db975cb5 Added release date for 0.9.2 0.9.2 2015-02-14 16:11:45 -04:00
Bart van Strien 902a7cb68b Update debian package files to the 0.9.2~rc1 version 2015-02-14 20:19:47 +01:00
Alex Szpakowski 5e088aa183 Updated changelog 2015-02-14 00:43:28 -04:00
Bart van Strien 600a369d77 Allow calling newRasterizer without arguments from newFont again
Fixes regression introduced by commit 9b0752574f26, the default value for the
1-argument newFont could not be called.
Thanks to josefnpat for reporting.
2015-02-13 15:18:52 +01:00
Alex Szpakowski d82d2c93b6 If love is run from an existing console window in Windows, it will use that for stdout (when console mode is enabled via love.conf or --console) rather than creating a new console. 2015-02-11 15:40:22 -04:00
Alex Szpakowski 36e99b4880 Fix an OpenGL error when an sRGB image is created with mipmaps in OpenGL ES 2.
--HG--
branch : minor
2015-02-09 21:46:56 -04:00
Alex Szpakowski d229fb1129 Merged default into minor
--HG--
branch : minor
2015-02-09 21:43:31 -04:00
Alex Szpakowski 320ec8b472 Added love.filesystem.getRealDirectory(filepath).
It returns the platform-specific full path of the directory containing the filepath (rather than the file.) For example, if 'saves/save1.txt' exists in the save directory, love.filesystem.getRealDirectory("saves/save1.txt") will equal love.filesystem.getSaveDirectory().
2015-02-09 17:43:59 -04:00
Alex Szpakowski 70ea0e1f3f Updated changelog. 2015-02-03 03:18:22 -04:00
Alex Szpakowski 685c77acd9 Fixed the Windows CMake build. 2015-02-02 17:28:11 -04:00
Alex Szpakowski a84367ef38 Prefer the higher performance GPU on Windows systems that use nvidia optimus (resolves issue #984.) 2015-02-02 16:29:58 -04:00
Alex Szpakowski 2a09774a54 Fixed love.graphics.newFont. 2015-02-02 15:26:13 -04:00
Alex Szpakowski 67aede6bc0 Merged default into minor
--HG--
branch : minor
2015-02-02 01:13:21 -04:00
Alex Szpakowski a314b18515 Added love.keyboard.getKeyFromScancode and love.keyboard.getScancodeFromKey. Resolves issue #982.
Scancodes represent a physical key independent of the keyboard's current layout. For example, pressing the key located where 'q' is on a U.S. keyboard will produce the key 'q' and the scancode 'q' when using a U.S. keyboard layout, but when using a French keyboard layout it will produce the key 'a' and the scancode 'q'.

Scancodes are useful for creating default controls that have the same physical locations on on all keyboards.
2015-02-01 03:13:14 -04:00
Alex Szpakowski 695ab41915 Added love.audio.set/getDopplerScale. 2015-02-01 00:36:34 -04:00
Alex Szpakowski ea2e45f4e2 Renamed love.mouse.setRelative to love.mouse.setRelativeMode, removed some unused OpenGL code. 2015-01-31 23:17:37 -04:00
Alex Szpakowski 8989e39b1e A better fix for love.mouse.setPosition not updating the return values of love.window.getPosition until the next love.event.pump call on Windows and Linux. 2015-01-31 02:36:31 -04:00
Alex Szpakowski f6bd177f84 A debug print statement snuck in there... 2015-01-31 01:35:17 -04:00
Alex Szpakowski 9cf1868b81 Fixed the point style and color mask getting reset in love.window.setMode (thanks Shell32) 2015-01-31 01:22:54 -04:00
Alex Szpakowski 665cdc4ae7 Moved the default Font logic from the graphics.lua script to the Graphics and Font module C++ code. Moved love.graphics.setNewFont from the graphics.lua script to the Graphics module Lua wrapper code. Moved the Vera.ttf data from the graphics.lua script to its own file inside the Font module. 2015-01-31 01:10:38 -04:00
Alex Szpakowski 72f98b9c8f love's overloaded love.graphics.print and love.graphics.printf functions now use proper tail calls, which fixes the filename and backtrace given if those functions cause an error. 2015-01-30 22:14:46 -04:00
Alex Szpakowski d0e34e86f1 Changed love.window.setMode to recreate the window as well as the context if a particular context profile can't be created, to work around some limitations of the OpenGL context and window code in some SDL backends.
The window/context creation code might still need some work..

--HG--
branch : minor
2015-01-30 17:19:47 -04:00
Alex Szpakowski 84a6dd3b1c Fixed OpenGL context version checking when OpenGL ES is used.
--HG--
branch : minor
2015-01-30 04:48:09 -04:00
Alex Szpakowski 6c11443a04 Fixed graphics initialization crashing love when OpenGL ES 2 is used.
--HG--
branch : minor
2015-01-30 04:24:31 -04:00
Alex Szpakowski cc79089339 Fixed a crash in love.window.setMode in Windows.
--HG--
branch : minor
2015-01-30 01:28:27 -04:00
Alex Szpakowski 54516a5652 Fixed a case of undefined behavior in love.graphics.printf and Text:set.
--HG--
branch : minor
2015-01-29 21:36:28 -04:00
Alex Szpakowski 62d596dec1 Fixed Windows build.
--HG--
branch : minor
2015-01-29 21:28:27 -04:00
Alex Szpakowski ad1fbbf3ea Merged default into minor
--HG--
branch : minor
2015-01-29 21:27:05 -04:00
Alex Szpakowski 423e35fd76 TrueType rasterizers now error properly when given an invalid size argument. 2015-01-29 20:38:12 -04:00