Add a file browser: it would popup a file browser window that allow the user to select a file. This function should have at least a filter parameter ( "*.map" ) and another one for the file access mode (read or save). This parameter is for security: it would allow this file to be opened only for either reading OR saving purpose. This function has to return the path and the filename or nil if the user cancels. It would also add the selected filename to an "approved file list". We would then be able to include/require/open the file.
Add binary operators: at least 2 functions... something like "love.bit.and(value1, value2)" and "love.bit.or(value1, value2)". These functions would have their registered C functions that should be like this:
Code: Select all
// love.bit.and
static int love_bit_and(lua_State *L)
{
int n = lua_gettop(L);
if(n < 1 || !lua_isnumber(L, 1))
luaL_typerror(L, 1, "number");
if(n < 2 || !lua_isnumber(L, 2))
luaL_typerror(L, 2, "number");
lua_pushnumber(L, int(lua_tointeger(L, 1)) & int(lua_tointeger(L, 2))); // for the OR function, replace & by |
return 1;
}
I think my two first suggestions are the ones that are more important, the last one would just be a cool feature to allow us to play older games.
Thanks for reading and grëät work guys!
Josh