Commit Graph

52 Commits

Author SHA1 Message Date
John Doe 062c5e8e2a Refactor var name to show its used internally 2025-11-22 22:48:00 +00:00
John Doe 9e55b14695 Add drag & drop game to start into nogame 2025-11-22 22:45:35 +00:00
John Doe 6f08eb94c6 Update copyright notice with correct year 2025-07-12 23:19:22 +01:00
Sasha Szpakowski 19681f1a75 nogame: resizing doesn't change existing cloud shapes 2025-02-08 20:25:27 -04:00
Sasha Szpakowski b20a0b81a4 nogame: fix duckloon disappearing for a short time after a resize 2025-02-04 23:12:56 -04:00
Sasha Szpakowski b61b35d5fb move gammacorrect, renderers, and excluderenderers love.conf options to a new t.graphics table. 2024-12-20 20:40:53 -04:00
Sasha Szpakowski 64a30f177f Merge branch 'main' into 12.0-development 2024-02-10 12:24:48 -04:00
Sasha Szpakowski 94d5864144 update year for copyright notice 2024-02-10 12:13:22 -04:00
Sasha Szpakowski 112a09ceb7 Shape:setDensity no longer needs Body:resetMassData unless the Body already has custom mass data.
Add Body:hasCustomMassData.
If the Body has custom mass data, attaching a Shape to it doesn't automatically reset its mass data.
2023-10-08 12:43:27 -03:00
Sasha Szpakowski 5b4758819e nogame screen uses non-deprecated APIs 2023-10-07 15:35:00 -03:00
Sasha Szpakowski f6cdbdc868 Merge branch 'main' into 12.0-development 2022-12-31 22:46:34 -04:00
Sasha Szpakowski c823dbca96 Update copyright year for 2023 2022-12-31 22:25:49 -04:00
Alex Szpakowski d51e012812 Merge branch '12.0-development' into metal 2022-01-05 21:12:22 -04:00
Alex Szpakowski 7f3538d2ba Merge branch 'main' into 12.0-development 2022-01-05 21:10:27 -04:00
Alex Szpakowski 8e7fd10b6f Update copyright year for 2022 2021-12-31 18:33:40 -04:00
Alex Szpakowski e63025b74f Merge branch '12.0-development' into metal 2021-12-24 15:34:05 -04:00
Alex Szpakowski 21f5ba86d3 Merge branch 'master' into 12.0-development 2021-04-07 20:33:44 -03:00
Alex Szpakowski f89aabb0bb Update copyright year for 2021 2021-04-04 16:14:45 -03:00
Alex Szpakowski 20a92a4106 Merge branch '12.0-development' into metal 2020-12-22 22:37:17 -04:00
Alex Szpakowski 905e5baf06 Replace highdpi window flag with t.highdpi in love.conf 2020-11-01 21:36:15 -04:00
Alex Szpakowski 5b4de2308d show the renderer name in the no-game's title 2020-07-29 19:42:38 -03:00
Alex Szpakowski 8478a870a9 Add new*Texture variants which don't require image files.
Update the no-game screen to avoid deprecated functions.
2020-02-12 20:07:35 -04:00
Alex Szpakowski fc4847c69d Update copyright for the new year 2020-01-03 22:40:36 -04:00
Alex Szpakowski db1c982f76 boot.lua and nogame.lua line numbers match the source code once they're embedded into love (thanks, pgimeno!) 2019-04-06 13:08:25 -03:00
Alex Szpakowski 0752f27bdf Update copyright year for 2019 2019-01-03 21:09:05 -04:00
Alex Szpakowski 388c93b049 nogame screen: escape key quits love. 2018-04-01 15:05:39 -03:00
Alex Szpakowski 3fe9e51a46 nogame screen: bring back double-tap-to-exit on touch screens. 2018-04-01 13:01:02 -03:00
Bart van Strien 2f17cab3b4 Prevent out-of-bounds access in Text:add when an empty string is added (fixes #1372) 2018-01-30 17:31:44 +01:00
Bart van Strien e80247c191 Happy new year! 2018-01-03 19:47:35 +01:00
Alex Szpakowski 9fa73f8b87 Several love.data functions now take an enum ("data" or "string") to determine whether they return a Data object or a string.
Changed functions are love.data.compress, decompress, encode, decode, and pack.
2017-12-22 16:13:20 -04:00
rude 5950688770 Added new nogame screen (Duckloon). 2017-12-13 22:15:23 +01:00
Alex Szpakowski 90e86c329d Add love.data module.
- Moved love.math.compress / decompress / decode / encode / hash to love.data.
- Changed love.data.compress/decompress to take the format argument first instead of second.
- Added love.data.newDataView. Returns a read-only subsection of an existing Data object.
- Added love.data.newByteData. Mostly useful in combination with LuaJIT's FFI as it has no extra methods currently.
- Added implementations of Lua 5.3's data packing APIs: love.data.packString / packData / unpack / getPackedSize.

Resolves issue #1336.
Resolves issue #1331.

--HG--
branch : minor
2017-09-24 19:25:27 -03:00
Alex Szpakowski 844900db39 Rename all cases of 'pixel density' to 'DPI scale' in love's APIs.
--HG--
branch : minor
2017-09-24 16:09:05 -03:00
Bart van Strien 03b863d788 Simplify love.audio's Pool class
Move most logic back to Source. Pool now simply contains a list of playing
sources and a mutex. Also gets rid of the pause/pauseAtomic duplication in
Source, since it can now request a lock from Pool itself.

--HG--
branch : minor
2017-02-11 21:41:22 +01:00
Alex Szpakowski abb72cb813 Happy new year! 🥂
--HG--
branch : minor
2017-01-02 01:28:29 -04:00
Alex Szpakowski d26002f5cc Revamped and streamlined retina / high-DPI support (resolves issue #1122).
With the highdpi window flag enabled on a retina-capable display and OS, content should now appear to the user at the same size and in the same positions as with the flag disabled.

As a result, mouse and touch coordinates, Texture and graphics dimensions, and the graphics coordinate system now use pixel density-scaled units instead of pixels. Raw pixel units should generally only be used for things such as shader algorithms which execute per-pixel and rely on accurate pixel dimensions. love.window.fromPixels and friends typically don’t need to be used anymore.

Images, Canvases, and Fonts can have an optional explicit ‘pixel density’ set when creating them. This allows for easily loading high pixel density content which displays at the same size as regular or low pixel density content.

API changes:

- Added Texture:getPixelWidth/getPixelHeight/getPixelDimensions and Texture:getPixelDensity. Texture:getWidth/getHeight return the pixel density-scaled width and height (as it will appear on the screen when drawn) rather than the number of pixels on each texture dimension.

- Added love.graphics.getPixelWidth/getPixelHeight/getPixelDimensions.

- Added optional ‘pixeldensity’ field to the settings table parameter of love.graphics.newImage. It defaults to 1, or if the file the Image was loaded from has “@2x”, “@3x”, etc. at the end of its name, it uses that number as the pixel density scale by default.

- love.graphics.newCanvas now takes a table as its third parameter, with fields “format”, “msaa”, and “pixeldensity”. pixeldensity defaults to the main screen’s pixel density. The width and height parameters specify the visual size that the Canvas will be drawn at / can be drawn to (pixel density-scaled units).

- love.graphics.newVideo accepts a table as its second parameter, with optional fields “audio” and “pixeldensity”. pixeldensity defaults to 1.

- love.graphics.newFont variants have an optional pixeldensity parameter at the end of the argument list. For TrueType fonts this defaults to the current pixel density scale of the screen, and for BMFonts and ImageFonts this defaults to 1.

- Added Font:getPixelDensity.

- Renamed love.window.getPixelScale to love.window.getPixelDensity.

--HG--
branch : minor
2016-12-29 23:55:51 -04:00
Alex Szpakowski 0d2e08baff Implement automatic batching for points, lines, shapes, and images/quads.
The above are batched together into a single draw call when called without other drawing calls in between, as long as the following criteria are met:

- The texture is the same.
- The primitive type is the same (points cannot be batched with non-points).
- The love.graphics state is the same (aside from the current color - i.e. setColor - and the transform state).
- The active shader’s uniform values are the same.

You can examine the ‘drawcalls’ field of love.graphics.getStats() to help determine if your code is allowing for optimum batching.

--HG--
branch : minor
2016-12-27 21:02:58 -04: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 ed933847f8 Color values in love's APIs are now in the range of [0, 1] rather than [0, 255].
--HG--
branch : minor
2016-01-31 10:49:29 -04:00
Alex Szpakowski 46a2e7b85c Happy new year! 🎉 2016-01-01 00:05:06 -04:00
Alex Szpakowski 5ef0195a88 Fixed an error in the nogame screen if the window's height is too small. 2015-12-22 15:47:50 -05:00
Alex Szpakowski ed0ec611b9 Pressing escape now exits the nogame screen. 2015-12-14 11:54:09 -04:00
Alex Szpakowski 532943649b Slightly tweaked the no-game screen. 2015-12-11 22:33:51 -04:00
Alex Szpakowski 75faf77d66 Improved the performance of Shader:send when matrices are used. 2015-11-24 14:25:52 -04:00
rude 2990b6d440 Add some mosaic patterns which appear sometimes. 2015-11-18 17:12:54 +01:00
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 b2b14eb2d6 Simplified some of the high-dpi scaling code for the no-game screen. 2015-11-11 19:57:09 -04:00
Alex Szpakowski 7043b5314d Added high-dpi / retina support to the no-game screen; additional minor tweaks and cleanup. 2015-11-11 19:35:45 -04:00
rude 3cd18bae20 Tweak colors in no-game screen. 2015-11-11 18:23:13 +01:00
rude 7a260af39f Add 0.10.0 (Super Toast) no-game screen.
This commit adds a version codename and accompanying no-game screen. It should
cause at least a few seizures, if we're lucky. (Press 'F' for fullscreen).

Colors could use some tweaks, probably ... and it would be cool if various
hypnotizing patterns appeared intermittedly in the mosiac ... but that's for
the next commit. (Only two years until next time)!
2015-11-10 23:17:48 +01:00