Re: Trying to get Love2D game working under Windows, works fine on Linux
OK, now I have my own problem. I have an audio.zip file containing all my audio files. I mount the file:
if not love.filesystem.mount("audio.zip", "audio") then
-- handle error
end
I then run the following function on the mounted directory:
function recursiveEnumerate(folder, fileTree)
local lfs = love.filesystem
local filesTable = lfs.getDirectoryItems(folder)
for i, v in ipairs(filesTable) do
local file = folder.."/"..v
local info = lfs.getInfo(file)
if info.type == lfs.file then
fileTree = fileTree.insert(fileTree, file)
elseif info.type == lfs.directory then
fileTree = recursiveEnumerate(file, fileTree)
end
end
return fileTree
end
Yes, thank you, LOVE Wiki.
I then iterate through the table:
for k, file in ipairs(recursiveEnumerate("audio/audio", {})) do
sounds[file] = love.sound.newSoundData(file)
end
(The sounds table is created globally.)
But here's where the problems start. As soon as I type "lovec lgame" (which is my game...) it just sits there, then crashes for no apparent reason. No lua error, no error message dialog, nothing. This is a 64-bit version, if I'm not mistaken, so even if I am going above the 4 GB mark this shouldn't be happening.
-- Audiogames-reflector mailing list Audiogames-reflector@sabahattin-gucukoglu.com https://sabahattin-gucukoglu.com/cgi-bin/mailman/listinfo/audiogames-reflector