Commit Graph

1264 Commits

Author SHA1 Message Date
vrld d842c5d28d Fix box muller transform in common/math.cpp.
Random numbers have to be in (0:1], not in [0:1).
2013-02-26 10:37:42 +01:00
vrld 03518d51ac Merge something (?) 2013-02-25 18:34:23 +01:00
vrld 5f586390d8 Add module love.math. Implements xorshift RNG.
Contains just a RNG for now, but may include other functionality (e.g.
transforms) later on.

New Functions:

-- as in the lua math library:
love.math.randomseed(number) -- set random seed
love.math.random()           -- get random number in [0:1) (uniformly distributed)
love.math.random(high)       -- get integer random number in [1:high]
love.math.random(low, high)  -- get integer random number in [low:high]

-- additional functions
love.math.randnormal()     -- get normally distributed number with zero mean
                           -- and unit variance
love.math.randnormal(o)    -- get normally distributed number with zero mean
                           -- and standard deviation `o`
love.math.randnormal(m, o) -- get normally distributed number with mean `m`
                           -- and standard deviation `o`
2013-02-25 18:32:54 +01:00
Alex Szpakowski 86ced3c70e Simplified the error message on image creation failure 2013-02-24 15:02:56 -04:00
Bart van Strien 6282cad960 Update changelog 2013-02-24 15:11:14 +01:00
Bart van Strien 4c2b1ea104 Make visual studio produce love.dll instead of liblove.dll 2013-02-24 14:54:25 +01:00
Alex Szpakowski 1d34dda48b Removed SpriteBatch:remove(id) (reverted commit 2ca82dd)
The implementation had issues with sprite draw order when SpriteBatch:add used indices in the vertex buffer previously freed with SpriteBatch:remove
2013-02-24 09:47:03 -04:00
Alex Szpakowski 7d579308dc LÖVE now errors when Image creation fails 2013-02-24 00:50:39 -04:00
Alex Szpakowski 472915a4bb Worked around ATI/AMD driver bugs when creating mipmaps for Images 2013-02-23 15:52:03 -04:00
Alex Szpakowski d9736ab3ab Removed mipmap support from Font graphics objects 2013-02-19 14:21:01 -04:00
Alex Szpakowski 5bf78f891d Fixed OpenGL vertex buffer function usage (issue #489.)
The functions will be assigned to their core version counterparts if the extension version isn't supported but the core version is.
2013-02-19 03:17:05 -04:00
Alex Szpakowski 23968d3b4a Fixed image mipmap creation on some systems with buggy video drivers 2013-02-17 11:36:17 -04:00
Alex Szpakowski 8c21c4dce0 Fixed love.graphics.getBlendMode on systems which don't support the subtractive blend mode 2013-02-17 00:19:46 -04:00
Alex Szpakowski a68bdfe7a2 Constified many Graphics and Window methods 2013-02-16 01:45:01 -04:00
Alex Szpakowski eba8cbc0b5 Removed internal code support for multitexturing without shaders, since it's not currently used and there are no plans to do so 2013-02-16 01:04:00 -04:00
Alex Szpakowski 0e4d7f1f4a Replaced deprecated lua_open calls with luaL_newstate 2013-02-16 00:51:57 -04:00
Alex Szpakowski 1945b7975d Cleaned up exception handling code when creating new fonts, spritebatches, and shaders 2013-02-14 21:49:11 -04:00
Alex Szpakowski e1779897ab Removed love.graphics.drawTest 2013-02-14 08:03:55 -04:00
Alex Szpakowski e05e8e6e6a Switched audio backends in OS X from Apple's OpenAL implementation to OpenAL Soft 2013-02-13 04:01:02 -04:00
Alex Szpakowski 77ab120424 Fixed SpriteBatch file includes 2013-02-11 20:27:29 -04:00
Alex Szpakowski ceb0ee6c7e Added SpriteBatch:remove(id) 2013-02-11 18:27:57 -04:00
Alex Szpakowski 842c01b4e5 liblove now builds as a framework on OS X 2013-02-10 02:37:54 -04:00
Alex Szpakowski 668a1bfa6d Silenced some compiler warnings 2013-02-09 21:24:41 -04:00
Alexander Szpakowski ef8bdb96bd removed stowaway hgcheck file 2013-02-09 21:16:25 -04:00
Alex Szpakowski c6da6ffab9 XCode project now builds liblove and uses it with love.app 2013-02-09 21:11:23 -04:00
Alex Szpakowski 3cf03fee8f Fixed the lua header generator script to output the correct year in the copyright text 2013-02-06 23:53:22 -04:00
Alex Szpakowski 96161c66f6 Updated copyright text for the new year 2013-02-05 05:32:49 -04:00
Alex Szpakowski e16b5afa6d Fixed love.graphics.getPointStyle 2013-02-01 01:44:00 -04:00
Alex Szpakowski a76ffd5715 Fixed VertexIndex::getElementSize 2013-01-30 19:01:14 -04:00
Alex Szpakowski de959b7275 Added a method to VertexIndex to determine the size in bytes of an element in the index array 2013-01-30 17:50:32 -04:00
Alex Szpakowski a9211a1389 Removed direct OpenGL calls in the SDL Window module 2013-01-30 00:27:46 -04:00
Bart van Strien 8fba362fc5 Add SoundData:getDuration, returns the duration in seconds 2013-01-29 23:19:26 +01:00
Alex Szpakowski 7a16e4cb49 Made Visual Studio play nice with the C++ STL min/max functions in the new shader code 2013-01-29 13:01:34 -04:00
Alex Szpakowski 7384bf15d3 Merged rude/love into default 2013-01-29 11:25:38 -04:00
Alex Szpakowski 02d2a872ab Improved shader member variable names, fixed up XCode project file 2013-01-29 04:34:36 -04:00
Alex Szpakowski 383cfb11ea Merged rude/love into vertexshader/default 2013-01-28 20:41:45 -04:00
Bart van Strien f81eebfb5f Reapply sdl's keyrepeat settings after setWindow 2013-01-28 00:25:03 +01:00
Alex Szpakowski 09ee533cea Cleaned up TrueType Rasterizer code 2013-01-27 17:18:11 -04:00
Alex Szpakowski 5cae5ea37e Removed code for tesselation and geometry shader detection 2013-01-24 18:26:40 -04:00
Alex Szpakowski 383bed8098 Use const references for string function arguments 2013-01-23 15:28:11 -04:00
Alex Szpakowski 191af5cd5b Minor cosmetics 2013-01-23 06:26:17 -04:00
Alex Szpakowski 76b0537eff ImageFonts now replace the spacer color with transparency when generating a glyph instead of when first parsing ImageData (source ImageData used to generate an ImageFont is now unmolested.) 2013-01-23 06:00:28 -04:00
Alex Szpakowski 6247e7b60b Removed silly exception case 2013-01-23 03:15:49 -04:00
Alex Szpakowski e51a9eb25d Added support for UTF-8 ImageFont glyphs and ImageFonts with more than 256 characters 2013-01-23 03:02:46 -04:00
Alex Szpakowski 022f549554 Use unsigned ints instead of unsigned shorts to represent UTF8 font glyphs 2013-01-22 23:43:35 -04:00
Alexander Szpakowski f016840ed0 Merged in changes from main repository 2013-01-21 02:31:15 -04:00
Alexander Szpakowski ce75b3af69 Merge from root 2013-01-17 20:29:48 -04:00
Bart van Strien a72c981c32 Make sure love.errhand gets a local reference to print as well, and find the error handler at errortime (partial #390) 2013-01-18 00:55:28 +01:00
Bart van Strien 501beb7d02 Add blend mode 'none' (issue #536) 2013-01-18 00:48:36 +01:00
Bart van Strien 49961d66c7 Fix setVolumeLimits (issue #537) 2013-01-18 00:32:25 +01:00