SDL_RWops isn’t an abstraction for files, it’s an abstraction for I/O,
the same way C++ has streams.
…which are abstractions of quantities of sequential data - or, in
layman’s terms, files. That’s what I meant.
I think you are taking SDL as a complete gaming platform. If it were
true, all the SDL_* libs would be merged into a single monolithic
library, like Allegro. Fortunately you don’t pay for what you don’t
use; if you want anything besides the basic multimedia handling that
SDL offers, you glue another library over it. That’s the way it always
worked, and I don’t see any reason to treat this specific
functionality as special, so that it would need to be merged inside
the core library.
Unfortunately, for it to be useful, just as SDL_RWops is at present, it
would need to be in the base library for other libraries to use it.
Also, from a design prespective, SDL_RWops is where this support would
belong. Are you suggesting I write a separate library that would
replace SDL_RWops with just the few additions I am proposing?
For example, text rendering is much more important than directory
handling, and it’s still provided by separated libraries - that in
turn use different approaches.
It’s also both platform independent (unlike directories) and much
heavier than this directory support would be. I’m basically talking
about a simple flag or two, a few more function pointers in SDL_RWops,
and a handful of simple additional functions that glue it to the
underlying dirent stuff.
Why do you think you’ll have less overhead if the directory handling
is included inside SDL?
I would certainly have less overhead than if I used physicsfs just to
peruse directories. There is also no good way I am aware to peruse
directories in any platform-independent way, and no way to take a
platform-independent directory argument without writing all this
platform-specific code myself, making my program stuck with working on
whatever systems I implement it for, rather than just depending on SDL
working on it.
And what about the people who don’t want to use this otherwise
unnecessary feature (becaue they either don’t need it, or they already
use another library)?
I wouldn’t be interfering with anything that already works, and would
not be adding any significant overhead to this existing API. And, do
you honestly feel that most games don’t require any saved settings?
Most SDL games I have seen either use a heavier library (which would
still be an option), or have had to include platform-specific code that
will find a config dir and save stuff to it. I’ve seen many an SDL app
for which this is the sole reason it only supports Windows. Kind of
defeats the point of SDL in my mind.
Somebody please correct me if the roadmap for SDL 1.3 includes
changing its meaning, but SDL stands for Simple DirectMedia Layer; it
doesn’t propose any solution for filesystem manipulation. I don’t
think this belongs to SDL at all, but for a ‘satelite’ library.
So, you favor removing the existing SDL_RWops from it? It can already
create new files and modify them, and is already in 1.2.
Anyways, the only one that can give the final word about it is Sam.
I’m among the ones that prefer SDL to remain as clean and reduced as
So am I, which is why I want this in there. It cleanly fits in
SDL_RWops as-is with very little internal changes and no significant
added overhead. It would be big gain for very little cost, and would
make platform-independent apps easier to write in SDL. It could
probably even allow PhysicsFS to be used more powerfully with any future
SDL_RWops directory-based implementations.On Sat, May 06, 2006 at 07:51:25PM -0300, Daniel K. O. wrote:
GPG public key: http://www.cs.binghamton.edu/~sgreene/gpg.key.txt
-------------- next part --------------
A non-text attachment was scrubbed…
Name: not available
Size: 189 bytes
Desc: Digital signature