[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Major API change for SDL 0.9.11



Sam Lantinga wrote:

>[Catching up on old e-mail...]
>> >                 SDL_LoadBMP(SDL_RWFromFile("sample.bmp", "rb"), 1, ...);
>> >         The SDL_LoadBMP() function will close the opened file automatically.
>
>> How does SDL_RWFromFile () work? In particular - how do you determine
>> where to get the file? If I want e.g. open something contained in a PPlay
>> PakFile, how do I tell SDL_RWFromFile() and how does it contact the PPlay 
>> File mechanism?
>
>You would write a new datasource, implementing the stdio-like functions
>for Pakfiles.  You could then pass the new PPlay PakFile datasource to
>the SDL library transparently - i.e. without ever recompiling SDL. :)
>Once this was done, SDL WAV and BMP file loading would immediately get 
>all the benefits of PPlay PakFiles in your code.

Do you have sample code for that?


	Christian

--

Drive A: not responding...Formatting C: instead