Ok, project generation didn't really work out. Reverted.

This commit is contained in:
rude
2009-08-10 21:33:07 +02:00
parent ba1a75e547
commit dd420d68a3
68 changed files with 4136 additions and 4196 deletions
+4 -4
View File
@@ -64,10 +64,10 @@ namespace physfs
save_identity = std::string(ident);
// Generate the relative path to the game save folder.
save_path_relative = std::string(APPDATA_FOLDER PATH_SEPARATOR) + save_identity;
save_path_relative = std::string(LOVE_APPDATA_FOLDER LOVE_PATH_SEPARATOR) + save_identity;
// Generate the full path to the game save folder.
save_path_full = std::string(getAppdataDirectory()) + std::string(PATH_SEPARATOR);
save_path_full = std::string(getAppdataDirectory()) + std::string(LOVE_PATH_SEPARATOR);
save_path_full += save_path_relative;
std::cout << save_path_full << std::endl;
@@ -155,10 +155,10 @@ namespace physfs
const char * Filesystem::getWorkingDirectory()
{
#ifdef WINDOWS
#ifdef LOVE_WINDOWS
_getcwd(cwdbuffer, _MAX_PATH);
#else
char * temp = getcwd(cwdbuffer, MAXPATHLEN);
char * temp = getcwd(cwdbuffer, LOVE_MAXPATHLEN);
if(temp == 0)
return 0;
#endif
+13 -13
View File
@@ -47,20 +47,20 @@ namespace physfs
return 1;
}
int w_FileData_open(lua_State * L)
static const luaL_Reg w_FileData_functions[] = {
// Data
{ "getPointer", w_Data_getPointer },
{ "getSize", w_Data_getSize },
{ "getFilename", w_FileData_getFilename },
{ "getExtension", w_FileData_getExtension },
{ 0, 0 }
};
int luaopen_filedata(lua_State * L)
{
static const luaL_Reg w_FileData_functions[] = {
// Data
{ "getPointer", w_Data_getPointer },
{ "getSize", w_Data_getSize },
{ "getFilename", w_FileData_getFilename },
{ "getExtension", w_FileData_getExtension },
{ 0, 0 }
};
return luax_register_type(L, "FileData", w_FileData_functions);
}
@@ -35,7 +35,7 @@ namespace physfs
FileData * luax_checkfiledata(lua_State * L, int idx);
int w_FileData_getFilename(lua_State * L);
int w_FileData_getExtension(lua_State * L);
int w_FileData_open(lua_State * L);
int luaopen_filedata(lua_State * L);
} // physfs
} // filesystem
} // love
@@ -214,46 +214,46 @@ namespace physfs
return instance->load(L);
}
int w_Filesystem_open(lua_State * L)
// List of functions to wrap.
static const luaL_Reg functions[] = {
{ "init", w_init },
{ "setIdentity", w_setIdentity },
{ "setSource", w_setSource },
{ "newFile", w_newFile },
{ "getWorkingDirectory", w_getWorkingDirectory },
{ "getUserDirectory", w_getUserDirectory },
{ "getAppdataDirectory", w_getAppdataDirectory },
{ "getSaveDirectory", w_getSaveDirectory },
{ "exists", w_exists },
{ "isDirectory", w_isDirectory },
{ "isFile", w_isFile },
{ "mkdir", w_mkdir },
{ "remove", w_remove },
{ "read", w_read },
{ "write", w_write },
{ "enumerate", w_enumerate },
{ "lines", w_lines },
{ "load", w_load },
{ 0, 0 }
};
static const lua_CFunction types[] = {
luaopen_file,
luaopen_filedata,
0
};
// List of constants.
static const LuaConstant constants[] = {
{ "file_closed", File::CLOSED },
{ "file_read", File::READ },
{ "file_write", File::WRITE },
{ "file_append", File::APPEND },
{ 0, 0 }
};
int luaopen_love_filesystem(lua_State * L)
{
// List of functions to wrap.
static const luaL_Reg functions[] = {
{ "init", w_init },
{ "setIdentity", w_setIdentity },
{ "setSource", w_setSource },
{ "newFile", w_newFile },
{ "getWorkingDirectory", w_getWorkingDirectory },
{ "getUserDirectory", w_getUserDirectory },
{ "getAppdataDirectory", w_getAppdataDirectory },
{ "getSaveDirectory", w_getSaveDirectory },
{ "exists", w_exists },
{ "isDirectory", w_isDirectory },
{ "isFile", w_isFile },
{ "mkdir", w_mkdir },
{ "remove", w_remove },
{ "read", w_read },
{ "write", w_write },
{ "enumerate", w_enumerate },
{ "lines", w_lines },
{ "load", w_load },
{ 0, 0 }
};
static const lua_CFunction types[] = {
luaopen_file,
luaopen_filedata,
0
};
// List of constants.
static const LuaConstant constants[] = {
{ "file_closed", File::CLOSED },
{ "file_read", File::READ },
{ "file_write", File::WRITE },
{ "file_append", File::APPEND },
{ 0, 0 }
};
if(instance == 0)
{
try