Commit Graph

94 Commits

Author SHA1 Message Date
Alex Szpakowski daea857c1e Removed duplicated code for a crash workaround in Mac OS 10.5 2013-05-16 15:30:34 -03:00
Bart van Strien 721d50c2ef Make most love.filesystem functions return nil, err instead of erroring (when used correctly)
Note that argument exceptions, for instance, are still thrown as errors.
Also fixes a potential uncaught exception with getSize being called for the optional
size arg in read, now it just uses the ALL constant instead.
File:read no longer opens and closes a file automagically (this was undocumented, and weird)

NOTE: the love.filesystem.lines iterator can still error, but this should only happen in
case there's something really, really wrong (otherwise love.filesystem.lines would've failed
already)
NOTE: love.filesystem.lines still errors, because otherwise you'd get weird errors from the for
loop (namely 'attempt to call nil value') instead of seeing anything useful
2013-05-10 16:39:02 +02:00
Alex Szpakowski 4952ebd5d9 love.filesystem.newFile now accepts an optional FileMode parameter ("r", "w", "a") to better mirror io.open 2013-05-08 17:47:37 -03:00
Alex Szpakowski 63404f7097 Added love.graphics.getRendererInfo(infotype). Useful for creating more informative error reports and advanced debugging.
Returned string can be highly system-dependent, so don't rely on its output!

infotype can be "name", "version", "vendor", or "device"
2013-05-05 16:47:42 -03:00
Alex Szpakowski fb9f8d2962 Added the getString method to all Data objects (issue #608) 2013-04-26 22:35:01 -07:00
Alex Szpakowski 16f3a93f28 Removed vestigial internal code for Data:getPointer 2013-04-26 22:05:58 -07:00
Alex Szpakowski 7403245715 Cosmetic code improvements
--HG--
branch : image-CompressedData
2013-04-07 22:58:08 -03:00
Alex Szpakowski 88d64954a4 Replaced the devil love.image module with love.image.magpie, which can decide which image library to use in a similar manner to love.sound.lullaby. Some rough edges still exist.
love.filesystem.newFileData now accepts filepaths and File objects.

--HG--
branch : image-CompressedData
2013-04-07 17:18:34 -03:00
Alex Szpakowski d5aa807747 More internal code cleanup 2013-03-31 19:02:27 -03:00
Alex Szpakowski 2838208338 Cleaned up love.filesystem.load and love.filesystem.getLastModified code 2013-03-17 13:43:07 -03:00
Alex Szpakowski a2cb35f4e3 Constified some Filesystem module methods 2013-03-17 03:54:11 -03:00
Alex Szpakowski 129ae0f4eb Added love.filesystem.append (issue #541) 2013-03-17 03:40:13 -03:00
Alex Szpakowski 96229bcb5d Cleaned up love.filesystem.read/write code 2013-03-17 03:30:36 -03:00
Alex Szpakowski 8d4f35b86b Added love.filesystem.getSize (issue #541) 2013-03-17 01:56:24 -03:00
Alex Szpakowski 96161c66f6 Updated copyright text for the new year 2013-02-05 05:32:49 -04:00
Bart van Strien b10ff8da42 Apply patch that fixes File:read from reading too much (on EOF) (bug #530) 2012-12-15 13:58:34 +01:00
rude 2149ecdf44 Use "L" to force wide literal string.
If multi-byte character set is chosen, TEXT() does not produce a wide string,
causing compilation errors.
2012-11-18 10:53:17 +01:00
Bart van Strien 33d7115887 Make love.sound.newDecoder accept FileData, and make File->read return FileData 2012-10-14 17:19:40 +02:00
Bart van Strien 7793e7f02f CRLF to LF 2012-07-04 14:40:24 +02:00
rude 81c38e22d0 Applied the new style guidelines.
Well, sort of. Lot's more to be done, but this is a start.
2012-06-28 23:52:33 +02:00
Bart van Strien dd04074d62 Add love.filesystem.getIdentity 2012-06-01 17:31:44 +02:00
Bart van Strien e57e9efe0e Improve love.filesystem.lines 2012-01-14 18:18:18 +01:00
Bill Meltsner be55579a22 Happy New Year, have an enormous diff 2012-01-09 02:41:11 -06:00
Bart van Strien 4b6df9baa2 Hopefully fix some more warnings in filesystem 2011-12-28 14:39:13 +01:00
Bart van Strien cd330783f0 Apparently some compilers hate macros being redefined.. 2011-12-27 23:04:50 +01:00
Bart van Strien 864c800e10 Fix some warnings 2011-12-27 21:25:06 +01:00
Bart van Strien c707a4ca45 Properly export all lua-facing functions and use those for initialization (love.cpp no longer explicitly mentions implementations) 2011-12-24 01:10:40 +01:00
Bill Meltsner 7378a90101 Upgrade love.filesystem to use 64-bit numbers for dealing with file sizes, thus (hopefully) enabling lovers to work with very large files (based on Boolsheet's patch in issue #179) 2011-12-22 02:45:11 -06:00
Bill Meltsner 6277f4c75b lua libraries, even on mac, almost never come in .dylib form, but rather .so - change love.filesystem.require accordingly 2011-12-19 01:42:34 -06:00
Bart van Strien 0aae9684b3 Automated formatting fix 2011-11-16 11:32:41 +01:00
Bart van Strien 0d174cfb81 Fix compiler warnings 2011-08-26 12:48:57 +02:00
Bart van Strien 09367dc3bd Make love loaders the first 2, preventing lua loaders from loading the wrong files (issue #283) 2011-08-22 18:04:19 +02:00
Bart van Strien 59a407bc6d Add second loader for binary modules 2011-08-12 13:49:49 +02:00
Bart van Strien 3da5b3fd46 Make the eof code compile on windows 2011-08-08 15:32:34 +02:00
Bart van Strien 7e06aebf66 Work around PhysicsFS eof bug on windows (issue #272) 2011-08-07 18:23:07 +02:00
Bart van Strien d3280ae55b Fix segfault in lines_i 2011-08-06 17:14:52 +02:00
Bart van Strien a79231f9f9 Catch exception in lines 2011-08-06 16:54:04 +02:00
Bart van Strien eae6c0ff85 Remove duplicate lines_i, finally fix leak (issue #271) 2011-08-06 16:51:33 +02:00
Bart van Strien fdc56e7e73 Fix File:getSize crashing for a non-existent file 2011-08-06 14:44:49 +02:00
Bart van Strien defd6c5ee4 Attempt to close open files when File objects are destroyed 2011-08-06 13:42:57 +02:00
Bart van Strien 9ed5906416 Fix lines iterator not closing opened files 2011-08-06 13:36:22 +02:00
rude e1d1ebb2f1 Fix warnings in MSVC 2010. 2011-07-24 18:32:11 +02:00
Bart van Strien 160c17c180 Drop old require syntax (no more .lua extension) 2011-06-22 14:54:29 +02:00
Bart van Strien fc5cda36e2 Allow merged games marked as 'release' to have their save dir directly in the appdata dir 2011-06-15 13:09:32 +02:00
Bart van Strien 7b8df4431a Use proper chunk names, so tracebacks show filenames. 2011-05-27 16:59:46 +02:00
Bart van Strien bac51446a7 Only remove trailing /. in paths (bug #194) 2011-03-03 09:46:52 +01:00
Bart van Strien 610b89cd19 Handle PHYSFS_fileExists failing with empty strings on windows 2011-02-20 01:00:27 +01:00
Bart van Strien 18ca165718 Fix fused games 2011-02-20 00:58:15 +01:00
Bart van Strien 453593c9b0 Catch some more file-opening exceptions and make them lua errors instead 2011-02-18 16:10:20 +01:00
Bill Meltsner fde708160e bringing in the new year by changing every 2010 to 2011 2011-01-15 14:40:27 -06:00