Bart van Strien
06f4d6363e
Move all love::Type initialisation to their respective (new) files
...
Previously Data, Stream, Drawable and Image (and for some reason Filesystem) had types in types.cpp
--HG--
branch : dynamiccore2
2016-11-30 12:55:08 +01:00
Alex Szpakowski
cc1ea70272
Fix indentation
...
--HG--
branch : minor
2016-11-27 22:57:23 -04:00
Alex Szpakowski
0a3adc0839
Unify pixel format enums for ImageData, CompressedImageData, and Canvas into a single PixelFormat enum.
...
Replace love.graphics.getRawImageFormats and love.graphics.getCompressedImageFormats with love.graphics.getImageFormats.
--HG--
branch : minor
2016-11-27 22:53:23 -04:00
Bart van Strien
24a7a3d367
Merge minor into dynamiccore2
...
--HG--
branch : dynamiccore2
2016-11-26 22:19:12 +01:00
Alex Szpakowski
92774b759b
Fix line and shape segment counts and smooth line antialiasing when love.graphics.applyTransform and replaceTransform are used.
...
--HG--
branch : minor
2016-11-25 19:59:48 -04:00
Alex Szpakowski
14aa6965b3
Added Transform objects to love.math (resolves issue #1228 ).
...
- Added love.math.newTransform.
- Added love.graphics.applyTransform and love.graphics.replaceTransform.
- love.graphics.draw/print/printf, Text:add/addf, and SpriteBatch:add can accept a Transform argument.
- love.graphics.push can accept an optional Transform as a second argument, which will apply the Transform after pushing the matrix stack,
- Shader:send can accept Transform objects when sending to a mat4 uniform variable.
--HG--
branch : minor
2016-11-24 21:30:45 -04:00
Alex Szpakowski
99a3653d10
Merged in rcoaxil/love-patches/minor-mic-input (pull request #68 )
...
Microphone input implemented.
--HG--
branch : minor
2016-11-20 13:51:49 +00:00
Bart van Strien
de29986d38
Minor performance tweaks for love::Type
...
On my system these tweaks restore performance to "enum" levels
--HG--
branch : dynamiccore2
2016-11-16 14:45:06 +01:00
Bart van Strien
9f6aa716fa
Pass Type to luax_register_type by pointer instead of reference
...
Since the type is passed to va_start, and apparently that's undefined behaviour if it's a reference.
<Textmode> the best kind of behavior
--HG--
branch : dynamiccore2
2016-11-14 21:51:47 +01:00
Bart van Strien
d967a755e5
Make love::Type handle type names
...
TODO: Fix undefined behaviour in luax_register_type, you can't use a va_list after a reference type
--HG--
branch : dynamiccore2
2016-11-14 21:06:53 +01:00
Bart van Strien
5d43c9601a
Automatically deduce the type in luax_pushtype, if possible
...
--HG--
branch : dynamiccore2
2016-11-13 17:38:42 +01:00
Bart van Strien
7dd960619d
Automatically deduce the type in luax_checktype, luax_getmodule, luax_optmodule and luax_totype
...
--HG--
branch : dynamiccore2
2016-11-13 17:13:40 +01:00
Bart van Strien
4a0a90e511
Include int.h to fix windows build
...
--HG--
branch : dynamiccore2
2016-11-13 16:51:27 +01:00
Bart van Strien
3b88c13535
Delete love::Type copy constructor
...
--HG--
branch : dynamiccore2
2016-11-13 16:46:26 +01:00
Bart van Strien
c761202486
Build type information on first use (load-time), instead of using a hardcoded list
...
--HG--
branch : dynamiccore2
2016-11-13 16:38:57 +01:00
Julio Felipe Angelini
cdf7199c48
Added new raw values constructor to Matrix4 and Matrix4::setRawTransformation().
...
--HG--
branch : set-raw-transform
2016-10-26 17:45:28 -02:00
Raidho
87f0b2811e
Microphone input implemented.
...
RecordingDevice class added
(number)love.audio.getRecordingDeviceCount() and (table)love.audio.getRecordingDevices() exposed
(bool):startRecording([samples, sampleRate, bitDepth, channels], (SoundData):stopRecording([SoundData]),
(SoundData):getData([SoundData]), (number):getSampleCount(), (number):getSampleRate(), (number):getBitDepth(),
(number):getChannels(), (string):getName(), (number):getID(), (bool):isRecording() member functions exposed
previously existed stub implementation removed
getFormat moved to love::audio::openal::Audio
getFormat arguments order swapped to (bitDepth, channels)
getFormat now returns AL_NONE if format is invalid
--HG--
branch : minor-mic-input
2016-10-23 17:56:52 +03:00
Alex Szpakowski
37520bd18b
Added Object:release. Calling it is the equivalent of removing all Lua-side references to an object and doing a full garbage collection cycle (thus deleting the object from memory if nothing else in LÖVE's code is referencing it).
...
Any attempt to call a method on the object after it has been released will result in an error. Object:release() returns true if it was successful, or false if not (if it has already been released previously).
--HG--
branch : minor
2016-10-06 21:59:01 -03:00
Alex Szpakowski
60d90ca4a8
Merge default into minor
...
--HG--
branch : minor
2016-10-30 01:07:39 -03:00
Alex Szpakowski
4c122e6581
Add love.graphics.transformPoint and love.graphics.inverseTransformPoint.
...
--HG--
branch : minor
2016-10-20 18:13:20 -03:00
Alex Szpakowski
ef61573cd3
Merge default into minor
...
--HG--
branch : minor
2016-08-29 22:41:24 -03:00
Alex Szpakowski
677a8d60b8
Use love::Vector (8 bytes) instead of love::Vertex (20 bytes) for love.math.triangulate and love.math.isConvex.
2016-08-24 18:02:27 -03:00
Bart van Strien
990839383f
Merge default into minor
...
--HG--
branch : minor
2016-07-14 18:42:42 +02:00
rude
64ee986984
Make LÖVE buildable (barely) with Megasource on Mac.
2016-07-14 16:29:45 +02:00
rude
f66011de2f
Return correct size from b64_decode.
...
The current implementation does not take into account padding (and yet it does
actually depend on padding), or skipped whitespace/gibberish characters.
The actual size can be computed by subtracting the padding and gibberish bytes,
but in this case it's easier to just return the actual number of bytes written.
2016-07-12 21:25:23 +02: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
Alex Szpakowski
31b44797bc
Merge default into minor
...
--HG--
branch : minor
2016-05-12 18:20:01 -03:00
Alex Szpakowski
9bebe9e4e8
Updated the version.
2016-05-02 18:03:57 -03:00
Alex Szpakowski
ef5411e8ee
Fix building for Windows XP.
2016-04-10 21:58:03 +00:00
Alex Szpakowski
2cbaa7b3ae
Better fix, hopefully
2016-04-10 15:59:03 +00:00
Alex Szpakowski
08671ae48e
Fix building for Windows desktop
2016-04-10 15:51:50 +00:00
T-Bone
c12005b4bb
Forgot one LOVE_NOMPG123.
2016-04-10 06:29:58 +02:00
T-Bone
b2291fb62a
Fixes to make Löve compile on Windows 10 UWP
2016-04-07 22:56:03 +02:00
Alex Szpakowski
734789eb93
Added love.math.encode(format, data | string [, linelength]) and love.math.decode(format, data | string). Current formats are "base64" and "hex". The optional line length only applies to base64 and specifies the maximum number of characters per line in the encoded string.
...
Removed the variant of love.filesystem.newFileData which decoded a base64-encoded string since it's redundant.
--HG--
branch : minor
2016-03-28 19:28:40 -03:00
Alex Szpakowski
293bc79b97
Merge default into minor
...
--HG--
branch : minor
2016-03-12 22:04:07 -04:00
Alex Szpakowski
d0c0240e09
Very minor channel / variant performance improvements and cleanup.
2016-03-12 19:11:03 -04:00
Alex Szpakowski
2e5f385be3
Merge default into minor
...
--HG--
branch : minor
2016-03-03 21:28:30 -04:00
Alex Szpakowski
f51bbb8462
Cleaned up some StrongRef-related code.
2016-03-01 18:57:17 -04:00
Alex Szpakowski
e08374fdd1
We don't need a mutex lock in Channel::retain/release... I think.
2016-02-26 18:38:39 -04:00
Bart van Strien
2f7492667a
Bump version
...
--HG--
branch : minor
2016-02-26 15:11:42 +01:00
Alex Szpakowski
cf4b409302
Renamed some things.
2016-02-18 22:11:41 -04:00
Alex Szpakowski
2dd80fcb49
Fixed a compiler warning...
2016-02-14 19:52:27 -04:00
Alex Szpakowski
5d7425b60e
Reduced the size in bytes of Variant slightly by allowing the compiler to better pack its member variables together in memory.
2016-02-14 19:51:55 -04:00
Alex Szpakowski
7ea259e38b
Optimize constructing a Variant from a Lua table with a non-zero array size.
2016-02-14 19:24:17 -04:00
Alex Szpakowski
23fcaec89f
The Variant class is now meant to be used on the stack instead of allocated on the heap. As a result (and because of related changes), performance of Channels has roughly doubled when pushing and popping most types.
2016-02-14 16:39:32 -04:00
Alex Szpakowski
ab91ff0bfe
Removed LOVE_LEGENDARY_UTF8_ARGV_HACK, SDL 2.0 does it for us.
2016-01-25 22:52:32 -04:00
Alex Szpakowski
46a2e7b85c
Happy new year! 🎉
2016-01-01 00:05:06 -04:00
Alex Szpakowski
2cadb30ecf
Updated the version to 0.10.1.
2015-12-29 22:52:16 -04:00
Alex Szpakowski
cabf6dcae2
Made type checking for love objects slightly more robust.
...
LÖVE should now cause an error instead of a crash when a Lua io file is passed into an argument expecting a love object.
2015-12-14 18:30:43 -04:00
Alex Szpakowski
925eebdaf0
Removed love.event.addListener/removeListener/clearListeners.
...
They take away too much control from the main game code, which makes it harder to implement things like gamestates without modifying library code.
2015-12-12 17:54:54 -04:00