Commit Graph

415 Commits

Author SHA1 Message Date
Alex Szpakowski e9c75c342e Text:add and Text:addf now return index numbers which can be used as arguments to Text:getWidth and text:getHeight to determine the (pre-transformed) width and height of specific text within the Text object. 2015-11-14 18:51:43 -04:00
Alex Szpakowski 00845c0ad0 Added love.graphics.intersectScissor(x, y, w, h). Resolves issue #1071.
It sets the active scissor rectangle to the intersection of the existing scissor (if any) and the specified rectangle.
2015-09-16 19:04:57 -03:00
Alex Szpakowski 9c1214c77a Updated the Xcode project to use Xcode 7's recommended settings. 2015-09-16 16:36:44 -03:00
Alex Szpakowski 99debab3a4 Updated the readme: Xcode 7 lets you build iOS apps for your device without a registered developer account. 2015-09-14 18:50:48 -03:00
Alex Szpakowski d30e60f8d7 Disable bitcode (for now) when building the iOS app, since the dependencies don't have it. 2015-09-09 23:28:48 -03:00
Alex Szpakowski d3d970b925 Renamed iOS.mm and iOS.h to ios.mm and ios.h, to match the naming conventions of other files. 2015-08-27 18:46:04 -03:00
Bart van Strien 306049bcfe Move and manually include c++11 m4 file to work around old aclocal versions 2015-08-19 16:12:14 +02:00
Bart van Strien acca06907e Extend c++11 tests in configure script
Now also checks if gcc is at least version 4.7 or clang is at least version 3.1
2015-08-17 19:01:43 +02:00
Bart van Strien 987ddcdc26 Update path to macosx.mm in autotools build 2015-08-17 17:10:20 +02:00
Alex Szpakowski e44f20fdc6 Renamed OSX.mm/OSX.h to macosx.mm/macosx.h to match love's file naming conventions. 2015-08-15 00:41:45 -03:00
Martin Felis f5778ed86e Added a LOVE_ANDROID define and Android-specific code that interacts with the JNI and SDL. 2015-08-13 19:38:07 -03:00
djcj 4989bd76a0 Update Debian packaging files, move manpage to section 6
Modified application of pull request #43 by bartbes
 - Kept binary in /usr/bin
 - Remove postinst/postrm scripts
2015-07-13 17:32:18 +02:00
Alex Szpakowski c3612acfde Fixed the use of getRealDirectory when auto-detecting the identity name. 2015-06-25 10:00:54 -03:00
Alex Szpakowski 42ae9c9585 Moved the love.graphics Lua code into the graphics module folder. 2015-06-18 14:27:45 -03:00
Bart van Strien 3cb777e2b7 Add basic lua 5.3 support 2015-06-16 10:25:41 +02:00
Alex Szpakowski df1bd42dec Implemented efficient FFI versions of ImageData methods.
Note that ImageData:mapPixel (with its optional sub-rectangle parameters) is often many times faster than a loop of ImageData:setPixel and/or getPixel, for anything more than a few pixels.
2015-06-15 00:50:01 -03:00
Alex Szpakowski 532c61c6c2 Implemented efficient FFI versions of SoundData methods, which are used when the LuaJIT FFI and JIT compiler are present. 2015-06-14 18:41:34 -03:00
Alex Szpakowski 16ebe92176 Added a flag to the Mac info.plist which allows high-dpi windows to be created in all situations when requested and supported. 2015-06-12 16:53:05 -03:00
Alex Szpakowski 59e4b1b8d6 Removed some debug prints on iOS. 2015-06-11 21:16:28 -03:00
Alex Szpakowski 9e2dd384cb Removed the "LÖVE" text label from the default iOS launch screen. 2015-06-09 00:03:55 -03:00
Alex Szpakowski 17fe6bd30a Hopfully fixed some Xcode syntax highlighting and in-line error detection issues. 2015-05-18 21:46:04 -03:00
Alex Szpakowski 3704595189 Enabled OpenGL ES 3 support for Windows/Linux/Android when SDL 2.0.4+ is used, since that SDL version fixed its EGL code for GLES 3+. 2015-05-11 21:14:10 -03:00
Alex Szpakowski 60e8cc24bf Removed iOS-specific code to decode and encode images using the ImageIO framework (it's now redundant.) 2015-05-03 20:49:06 -03: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 8e42f591ce Updated the iOS xcode project search paths for the luajit headers and static library. 2015-04-25 12:00:07 -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 2844499ef7 Added the ability to have custom vertex attributes in Meshes (resolves issue #768.)
Added new love.graphics.newMesh variants: newMesh(vertexformat, vertices [, drawmode, meshusage]) and newMesh(vertexformat, numvertices [, drawmode, meshusage]).

Replaced the regular love.graphics.newMesh variants with newMesh(vertices [, drawmode, meshusage]) and newMesh(numvertices [, drawmode, meshusage]). To use an image or canvas with a mesh, use Mesh:setTexture.

vertexformat is a table with the following prototype:
{
  {attributename, datatype, components},
  {attributename, datatype, components},
  ...
}

Where attributename is the name of the vertex attribute (can be the built-in names 'VertexPosition', 'VertexTexCoord', or 'VertexColor', or a custom name for use in a vertex shader), datatype is the type of values used for the attribute ('float' or 'byte'), and components is the number of components in the vertex attribute (between 1 and 4.)

The vertex format is used to determine the layout of the vertices in the mesh, for example the 'regular' newMesh variants use this vertex format:
format = {
  {"VertexPosition", "float", 2},
  {"VertexTexCoord", "float", 2},
  {"VertexColor", "byte", 4},
}

The mesh usage parameter accepts the same constants as the spritebatch usage hint in love.graphics.newSpriteBatch - "dynamic", "static", and "stream".

Mesh:setVertex now sets *all* vertex attributes for a specific vertex in the Mesh.

Added Mesh:setVertexAttribute(vertexindex, attributeindex, attributevalue1, ...), which sets the values for a specific vertex attribute in a specific vertex in the Mesh (resolves issue #784.)

Added Mesh:getVertexFormat and Mesh:flush.

Added Mesh:setAttributeEnabled(attributename, enable) and Mesh:isAttributeEnabled(attributename), to enable or disable the use of a specific attribute when drawing the Mesh.

Added Mesh:attachAttribute(attributename, mesh), which makes the Mesh use a vertex attribute from another mesh when drawing the Mesh. This can be used to separate out vertex attributes which are updated at different rates into different meshes, and to share vertex data between multiple meshes.

Removed Mesh:setVertices, Mesh:getVertices, and Mesh:setVertexColors.
2015-04-08 22:24:17 -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
Bart van Strien 95d9dfa801 Explicitly search for pkg-config in configure script 2015-03-21 21:49:17 +01: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
djcj 9d2a2832ab Disable static libraries by default in linux build 2015-03-18 11:28:01 +00:00
Bart van Strien bd271ce5cb Remove OpenGL as compile-time dependency on linux, SDL loads it at runtime (and also GLES, if applicable) 2015-03-15 21:37:04 +01:00
Bart van Strien b049dd0387 Also add *.hpp files to autotools sources lists 2015-03-15 21:36:35 +01: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 c4dd3df799 Added a placeholder default launch screen nib for iOS so the app always uses the device's native resolution (in iOS 8+, at least.)
--HG--
branch : minor
2015-02-24 03:54:29 -04:00
Alex Szpakowski 182792de85 Enabled CoreAudio sound decoder support on iOS
--HG--
branch : minor
2015-02-22 22:17:17 -04:00
Alex Szpakowski aac4b3487a Replace deprecated PHYSFS_addToSearchPath calls with PHYSFS_mount.
--HG--
branch : minor
2015-02-22 17:48:32 -04:00
Alex Szpakowski 3faa3c7645 Removed some unnecessary xcode project config files
--HG--
branch : minor
2015-02-20 20:12:44 -04:00
Alex Szpakowski ebc68023a7 Fix many warnings about implicit integer conversions when compiling for 64 bits.
--HG--
branch : minor
2015-02-20 01:20:08 -04:00
Alex Szpakowski 85de3c41fb Initial iOS implementation.
--HG--
branch : minor
2015-02-20 00:21:21 -04:00
Alex Szpakowski 24c7539182 Updated some Xcode project settings
--HG--
branch : minor
2015-02-18 23:04:01 -04:00
Alex Szpakowski df0fab1b67 Moved the xcode project files and related data from platform/macosx to platform/xcode.
--HG--
branch : minor
2015-02-18 22:47:04 -04:00
Alex Szpakowski 482b61187f Added a new backend for loading and saving images using Apple's ImageIO framework. It's not enabled on any platform yet.
--HG--
branch : minor
2015-02-17 17:56:40 -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