Solarus-Games English Forum

Solarus => Development => Topic started by: MetalZelda on November 01, 2015, 06:16:47 PM

Title: Where is used PhySFS in Solarus ?
Post by: MetalZelda on November 01, 2015, 06:16:47 PM
Hi

I would ask a question to Solarus' developpers, I see that you use a archiving library that can access zip, etc. However, it also allows writing on some files.

In the Solarus engine, I do only found Physfs in the "QuestManagement.cpp" and I do wonder what would happen if I delete this lib and replace it manually by manually defined path and do something like Vincent Jouilat does?

Is physfs used elsewhere ?
Title: Re: Where is used PhySFS in Solarus ?
Post by: Christopho on November 01, 2015, 06:41:46 PM
The main use of PhysFS in Solarus is to allow transparent access to files inside the data.solarus zip archive.
Title: Re: Where is used PhySFS in Solarus ?
Post by: MetalZelda on November 01, 2015, 11:12:51 PM
Quote from: Christopho on November 01, 2015, 06:41:46 PM
The main use of PhysFS in Solarus is to allow transparent access to files inside the data.solarus zip archive.

Oh, so if I don't use .zip or .solarus, just 'data' folder  PhySFS is useless ?
I though first it was used elsewhere like the savegame files
Title: Re: Where is used PhySFS in Solarus ?
Post by: Christopho on November 02, 2015, 08:42:01 AM
PhysFS is also used to load regular files and also savegame files, but this could be easy to do without it.
Title: Re: Where is used PhySFS in Solarus ?
Post by: MetalZelda on November 02, 2015, 09:13:46 AM
Quote from: Christopho on November 02, 2015, 08:42:01 AM
PhysFS is also used to load regular files and also savegame files, but this could be easy to do without it.

Thanks for these info, I'm gonna work on it now
Title: Re: Where is used PhySFS in Solarus ?
Post by: Christopho on November 02, 2015, 09:54:57 AM
Ok, but why do you need to remove it?
Title: Re: Where is used PhySFS in Solarus ?
Post by: MetalZelda on November 02, 2015, 11:42:03 AM
Quote from: Christopho on November 02, 2015, 09:54:57 AM
Ok, but why do you need to remove it?

Because it's the only library that I can't find for the target system, and thus, rewriting the library for the system is a very huge task and huge time consuming
Title: Re: Where is used PhySFS in Solarus ?
Post by: Christopho on November 02, 2015, 01:46:44 PM
What is the target system? Normally, PhysFS is very easy to compile.
Title: Re: Where is used PhySFS in Solarus ?
Post by: MetalZelda on November 02, 2015, 02:08:00 PM
Quote from: Christopho on November 02, 2015, 01:46:44 PM
What is the target system? Normally, PhysFS is very easy to compile.

I'm trying to port Solarus to the PSP, but physfs is the main issue afaik
I've tried to render it compatible with the psp (there are some files floating around the net) and it always give me an error while trying to compile the lib with the psp rewritten code ... (zip and dir are the culprit)
The files are old, and I don't even know if there are 100% compatible with the psp itself, considering the error it gave me
rewriting the whole library for this particular machine would be time consumming and though, useless