LoveFS
- Positive07
- Party member
- Posts: 1014
- Joined: Sun Aug 12, 2012 4:34 pm
- Location: Argentina
Re: LoveFS
Thank you! That is nice I'll host it and let you know about it.
for i, person in ipairs(everybody) do
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
[tab]if not person.obey then person:setObey(true) end
end
love.system.openURL(github.com/pablomayobre)
Re: LoveFS
Hello ! I see that, on Windows, you got some trouble with spamming cmd~...
You can use kernel32.dll functions directly in Love2D using FFI library : http://luajit.org/ext_ffi.html (Love2D use LuaJIT which include FFI). But you need to setup the C part with all C datatype (BOOL, LPCTSTR, , _FILETIME, etc, etc...)
Use it like this :
kernel32.lua
And you just need to do this for what you need !
You can do it also for POSIX system. But I think you don't need any "ffi.load" call
You done a great job, don't staph
Bye~
PS: I found this : https://github.com/stuta/Luajit-Tcp-Server Use "WTypes.lua" and "WinBase.lua" for all C types. But if you copy that, don't forget the credit
You can use kernel32.dll functions directly in Love2D using FFI library : http://luajit.org/ext_ffi.html (Love2D use LuaJIT which include FFI). But you need to setup the C part with all C datatype (BOOL, LPCTSTR, , _FILETIME, etc, etc...)
Use it like this :
kernel32.lua
Code: Select all
ffi = require "ffi"
kernel32 = {}
kernel32._handle = ffi.load ("Kernel32")
ffi.cdef [[
DWORD GetFileAttributesA (LPCTSTR path);
// More code~
]]
function kernel32:get_file_attributes (path)
return self._handle.GetFileAttributesA (path)
end
-- More code~
function file_exists (path)
local res = kernel32:get_file_attributes (path)
--if on W32 :
return res ~= -1 -- (0xffffffffffffffff)
-- if on W64 :
return res ~= 4294967295 -- (0x00000000ffffffff) Thanks Microsoft... ~
end
You can do it also for POSIX system. But I think you don't need any "ffi.load" call
You done a great job, don't staph
Bye~
PS: I found this : https://github.com/stuta/Luajit-Tcp-Server Use "WTypes.lua" and "WinBase.lua" for all C types. But if you copy that, don't forget the credit
Founder of NeoShadow Studio. Currently working on the project "Sirami".
github / linkpy
github / linkpy
Re: LoveFS
I get this error when running it on latest 64 bit Ubuntu with Löve from the official PPA:
Code: Select all
stack traceback:
[C]: in function 'ipairs'
lovefs/dialogs.lua:37: in function 'refresh'
lovefs/dialogs.lua:174: in function 'loadDialog'
main.lua:16: in function 'onclick'
loveframes/objects/button.lua:195: in function 'mousereleased'
loveframes/objects/base.lua:141: in function 'mousereleased'
loveframes/init.lua:267: in function 'mousereleased'
main.lua:76: in function <main.lua:75>
[string "boot.lua"]:433: in function <[string "boot.lua"]:413>
[C]: in function 'xpcall'
Re: LoveFS
It seems that os.execute() always return -1. This behaviour breaks the code since a successful execution should return 0.
This is probably due to the change to luajit and some compilation option in love 0.9.2. I would call it a bug.
I'll try to make lovefs work but right now I don't have any chance to test os.execute.
This is probably due to the change to luajit and some compilation option in love 0.9.2. I would call it a bug.
I'll try to make lovefs work but right now I don't have any chance to test os.execute.
Re: LoveFS
At last 0.10.2 killed the os.execute() bug, BUT... since I've been away for so long, It was time to rewrite this library.
loveFS 1.0 drop console commands and embrace ffi, so it's now feasible to use it on Windows.
Also, the demo is made with Gspot.
Tested on Mint 64 bits and Windows 7 32 bits.
Thanks to Linkpy for showing me the way. You're the man!
(1st post updated with links)
loveFS 1.0 drop console commands and embrace ffi, so it's now feasible to use it on Windows.
Also, the demo is made with Gspot.
Tested on Mint 64 bits and Windows 7 32 bits.
Thanks to Linkpy for showing me the way. You're the man!
(1st post updated with links)
Re: LoveFS
Very nice library! At last a good alternative to the binary LuaFileSystem. I've sent a pull request for a fix related to having more than one window open (which shouldn't be possible).
About this bit from the OP:
About this bit from the OP:
I'm interested in that. I've been considering working on one since I first saw LÖVE. Specifically, a ZZT/MZX-style editor, with several ZZT/MZX-like preset tiles and effects. So I have to ask, what kind of game editor is that and what's its current status?File Systems are the most boring subject I can find, but, since I started a game editor in love (yet to come) I had some revolutionary ideas like loading images from somewhere...
Re: LoveFS
You're right. I think that a better fix (more inline with code style) would be
The editor I was talking about was developed in loveframes 4 years ago. It's very very VERY incomplete and I must try it with the last loveframes version. Since the future of loveframes is uncertain, I don't know if the code is of any interest.
Code: Select all
if self.dialog then
self:closeDialog(gspot)
end
Re: LoveFS
That might use a different gspot instance to that the previous dialog was created with, and crash. That's why I used self.dialog.Gspot, which should use the same instance.linux-man wrote:You're right. I think that a better fix (more inline with code style) would beCode: Select all
if self.dialog then self:closeDialog(gspot) end
Thanks. I'm still interested. I've seen a few ports of loveframes to LÖVE 0.10, so not all is lost. What kind of games was it for?linux-man wrote:The editor I was talking about was developed in loveframes 4 years ago. It's very very VERY incomplete and I must try it with the last loveframes version. Since the future of loveframes is uncertain, I don't know if the code is of any interest.
Re: LoveFS
Never thought of using several gspot instances. Pull accepted.
Give me some time to update the editor code (the game was named "Knights" and would be a "Lords of Midnight" clone).
Give me some time to update the editor code (the game was named "Knights" and would be a "Lords of Midnight" clone).
Re: LoveFS
Another update, now with a LoveFrames dialog based on a modified LoveFrames (https://github.com/linux-man/LoveFrames).
Any suggestion for other GUI?
Any suggestion for other GUI?
Who is online
Users browsing this forum: No registered users and 190 guests