271 Commits

Author SHA1 Message Date
Alex Szpakowski ef61573cd3 Merge default into minor
--HG--
branch : minor
2016-08-29 22:41:24 -03:00
Anders Ruud d896f7f871 Work-around for gcc bug 1568899. 2016-08-19 08:46:05 +00:00
Alex Szpakowski e9ac008f43 Merge default into minor
--HG--
branch : minor
2016-08-13 12:41:14 -03:00
Alex Szpakowski 2e8f785a01 Potentially fix building with megasource on Windows 2016-07-31 14:40:55 -03:00
Bart van Strien 990839383f Merge default into minor
--HG--
branch : minor
2016-07-14 18:42:42 +02:00
rude 7922c44d27 Make CMake build functional on Linux.
At least on Ubuntu.
2016-07-14 18:07:20 +02:00
rude 64ee986984 Make LÖVE buildable (barely) with Megasource on Mac. 2016-07-14 16:29:45 +02:00
rude ba1a234543 Use LÖVE in NSIS once again. 2016-07-13 22:42:06 +01:00
rude b0effb5570 Make CMakeLists.txt more decoupled from Megasource. 2016-07-13 21:26:50 +01:00
Alex Szpakowski e71f95595c ImageData (and Images loaded from them) now support different data formats. Resolves issue #1048.
Currently exposed formats are rgba8 and rgba16 (normalized), and rgba16f and rgba32f (floating-point). Some systems, especially mobile ones, won't support every format when creating a love.graphics Image. Use love.graphics.getRawImageFormats to check for support.

love.image.newImageData now takes an optional format parameter as its third argument when creating an empty sized ImageData. It defaults to rgba8.

16-bit PNGs, .hdr images, and floating-point OpenEXR images can now be loaded via love.image.newImageData and love.graphics.newImage.

--HG--
branch : minor
2016-05-22 15:28:20 -03:00
Bart van Strien 3a2e859acd Add love.math.hash, which supports MD5/SHA-1/SHA-2.
--HG--
branch : minor
2016-04-02 18:39:53 +02:00
Alex Szpakowski bd93f0dfef Fixed and reenabled lovec.exe. 2016-02-15 16:29:16 -04:00
Alex Szpakowski 78fa2ab536 Disabled lovec.exe until I can actually test it (since it doesn't work yet). 2016-02-14 22:06:43 -04:00
Alex Szpakowski f281e5871b Only try to make lovec.exe in Windows. 2016-02-14 21:56:32 -04:00
Alex Szpakowski 8c22b1bff2 Added "lovec.exe" in Windows, which uses the console subsystem so love games don't need to set t.console to true if they want to output to the console. 2016-02-14 21:51:29 -04:00
Alex Szpakowski 46a2e7b85c Happy new year! 🎉 2016-01-01 00:05:06 -04:00
Bart van Strien 22f2175bec Add initial video playback support for Ogg Theora videos (resolves issue #66.)
The basic APIs are:

video = love.graphics.newVideo("myvideo.ogv")

love.graphics.draw(video, ...) -- Video objects are Drawables.

video:play(), video:pause()

video:getDuration(), video:tell(), video:rewind(), video:seek(seconds)

video:getSource()

video:getWidth(), video:getHeight(), video:setFilter(min, mag)

More advanced APIs include video:setSource(source), video:getStream(), and videostream:setSync.

To use a custom pixel shader when drawing a Video, call the new TexelVideo(texcoords) function instead of Texel(texture, texcoords) in order to get the pixel colors of a video frame.
2015-12-08 22:41:19 -04:00
Alex Szpakowski 77998c707d Added the ability to use ASTC compressed textures, when the system supports them. 2015-11-28 14:55:26 -04:00
Alex Szpakowski 11aa69f815 Changed 'LÖVE' to 'LOVE" in the NSIS installer, since the former wasn't being displayed correctly (resolves issue #1100.) 2015-11-27 17:20:51 -04:00
Alex Szpakowski ac99a47386 Moved most of the ParticleSystem code from modules/graphics/opengl/ to modules/graphics/ 2015-11-25 04:29:00 -04:00
Alex Szpakowski 5dbf589d47 Removed libjpeg-turbo as a dependency (closes issue #1031.) Removed jpeg support for ImageData:encode. stb_image now handles jpeg image loading. 2015-05-03 17:52:20 -03:00
Alex Szpakowski 97806f87c0 Replaced Simplex noise with Perlin noise for the 3D and 4D variants of love.math.noise, to avoid patent-infringement issues (resolves issue #997.) 2015-04-17 17:01:41 -03:00
Alex Szpakowski 86d41620dd Replaced the mouse button constants ("l", "r", "m", etc.) with button numbers. 1 is the primary button, 2 is the secondary button, 3 is middle-mouse, etc. Resolves issue #1019. 2015-03-25 00:31:16 -03:00
Alex Szpakowski a29b349014 Added love.math.compress(data, format [, level]) and love.math.decompress(compresseddata) / love.math.decompress(compressedstring, format).
Renamed the love.image CompressedData type to CompressedImageData.

love.math.compress returns a love.math CompressedData object which holds the newly compressed data. Currently supported formats are "lz4" and "zlib". Note that the formats are not file formats and don't compress filesystem hierarchies.
2015-03-23 11:28:14 -03:00
Alex Szpakowski 163d059305 Moved most of the love.timer code out of the sdl implementation folder. 2015-03-20 00:55:14 -03:00
Alex Szpakowski 4ef0d257e9 Added an optional font hinting argument to love.graphics.newFont / love.font.newRasterizer when loading TrueType fonts. Resolves issue #963.
Accepted values are "normal", "light", "mono", and "none".
2015-03-07 22:05:37 -04:00
Alex Szpakowski 8277eb9abd Renamed the internal OpenGL buffer class from VertexBuffer to GLBuffer. 2015-03-03 02:21:28 -04:00
Alex Szpakowski 2f419c1c83 Replaced most cases of type bits and type name strings in love's Lua wrapper code with type id's.
--HG--
branch : minor
2015-03-01 18:32:41 -04:00
Alex Szpakowski 3830a0969c Moved the Texture and Quad Lua wrapper files out of the opengl graphics implementation folder.
--HG--
branch : minor
2015-03-01 03:51:44 -04:00
Alex Szpakowski c572b1af19 Moved the Lua wrapper code for love.event out of the sdl implementation folder.
--HG--
branch : minor
2015-03-01 02:55:50 -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 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 d229fb1129 Merged default into minor
--HG--
branch : minor
2015-02-09 21:43:31 -04:00
Alex Szpakowski 685c77acd9 Fixed the Windows CMake build. 2015-02-02 17:28:11 -04:00
Alex Szpakowski 970704c2b7 Added Text objects via love.graphics.newText(font [, textstring]). Reworked the internal code of Font objects to use fewer individual textures and less VRAM per object, and to be compatible with OpenGL ES. Slightly improved the performance of love.graphics.print and love.graphics.printf.
Text objects are Drawable objects that represent text on the screen. They decouple text drawing from text parsing and vertex uploading, in a similar manner to SpriteBatches. They also optionally allow efficient batching of text from the same Font in different relative coordinate transformations, without having many draw calls.

Text objects currently have the following methods:

Text:set(textstring) -- replaces any existing text in the object with the new string.
Text:setf(textstring, wraplimit, alignmode) -- replaces any existing text with formatted text using the new string.

Text:getFont() -- gets the Font object used for this Text object.
Text:getWidth() -- gets the width in pixels of the most recently added text in the Text object.
Text:getHeight() -- gets the height in pixels of the most recently added text in the Text object.

Text:add(textstring, x, y, angle, sx, sy, ox, oy, kx, ky) -- adds a new string to the text object using the specified relative coordinate transformation, without replacing existing text. This behaves much like SpriteBatch:add.
Text:addf(textstring, wraplimit, alignmode, x, y, angle, sx, sy, ox, oy, kx, ky) -- adds a new formatted string to the text object using the specified relative coordinate transformation.
Text:clear() -- clears all text from the object.

--HG--
branch : minor
2015-01-23 00:47:28 -04:00
Alex Szpakowski 5b98083e01 Merged default into minor
--HG--
branch : minor
2015-01-22 02:18:56 -04:00
Alex Szpakowski e82d1dfe54 Added Lua 5.3's UTF-8 module to LÖVE. Resolves issue #951.
The module must be required before use, i.e. utf8 = require("utf8").  API documentation can be found here: http://www.lua.org/manual/5.3/manual.html#6.5

Removing the last unicode character in a string (for proper backspace support in text boxes, for example) can be done using utf8.offset, e.g. text = text:sub(1, utf8.offset(text, -1) - 1).
2015-01-21 16:52:56 -04:00
Alex Szpakowski dfdd52e499 Added support for ETC1 and PVR1 compressed textures contained in KTX, PKM, and PVR files.
Most desktop graphics drivers don't support those formats.

--HG--
branch : minor
2015-01-20 03:18:28 -04:00
Alex Szpakowski a7e4148869 Merged default into minor
--HG--
branch : minor
2015-01-16 15:47:26 -04:00
Alex Szpakowski c7b45b3505 Updated copyright for the new year 2014-12-31 19:32:43 -04:00
Alex Szpakowski 8d0654a6a7 Added runtime drag-and-drop file and folder support via new love.filedropped and love.directorydropped event callback functions. filedropped has a single File object argument, and directorydropped has a single string argument containing the full path of the directory, which can be used with love.filesystem.mount.
--HG--
branch : minor
2014-10-18 20:30:36 -03:00
Alex Szpakowski 8edb90a719 Added support for loading BMFont bitmap font files with love.graphics.newFont (see issue #190.) Some esoteric BMFont features are not supported.
Moved the Font module Lua wrapper code out of the freetype implementation folder.

--HG--
branch : minor
2014-09-28 16:00:40 -03:00
Alex Szpakowski fffbd3ecab Merged default into minor
--HG--
branch : minor
2014-09-18 02:15:20 -03:00
Bart van Strien 793ef5db01 Apply foo0's patch to disable mpg123 in cmake megasource builds (issues #931 and #404) 2014-09-15 17:43:31 +02:00
Alex Szpakowski b59e088d6c Hopefully fixed the Windows build (see issue #921.)
--HG--
branch : minor
2014-08-27 08:17:40 -03:00
Alex Szpakowski 5f6ee50541 Replaced the GLee OpenGL function loader with a modified version of GLAD (resolves issue #728.)
--HG--
branch : minor
2014-08-18 21:35:52 -03:00
Alex Szpakowski fcf8329369 Fixed detection of TGA and BMP images and updated stb_image to the latest version.
--HG--
branch : minor
2014-08-11 03:11:51 -03:00
Alex Szpakowski bfa3ec9369 Merged default into minor
--HG--
branch : minor
2014-06-05 03:02:50 -03:00
Alex Szpakowski 10e0d4b900 Moved the love.joystick Lua wrapper code from modules/joystick/sdl/ to modules/joystick/. 2014-06-04 16:23:39 -03:00