Re: [AD] search path?

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On 2009-04-15, Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
> On Wed April 15 2009, Elias Pschernig wrote:
> > Thomas Fjellstrom wrote:
> > > My original code had a couple functions to set and get individual vtable
> > > functions. The enum had items for each function.
> > >
> > > al_fs_set_hook(ALLEGRO_FSHOOK_FWRITE, _al_fs_stdio_fwrite); // blah
> >
> > Ah, that wouldn't work well in a multi-threaded environment. I want to be
> > able for something to spawn a thread, and that thread then opens a zip file
> > and loads the data in it. The main thread should not be affected by it.
> 
> Why would you change the fshooks for a single thread? Any zip supporting 
> fshook addon will have to know about the normal filesystem. so setting it once 
> at the beginning (init_zip_addon()) will do just fine.

How would you do the following?  Assume a normal single-threaded program.

- I want to load my game resources from .zip files.

- I'm using a 3rd party GUI library which has skins in plain PNG files.
  It uses al_load_bitmap().

- I want read/write config files in memory buffers, as I will be transferring
  them to/from a game server over the network. (Allegro will not be handling
  the networking part, just the config files.)

Peter





Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/