Re: [AD] support for mod files

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


On Tue, Apr 6, 2010 at 7:07 PM, Thomas Fjellstrom <tfjellstrom@xxxxxxxxxx> wrote:
> I think it might require a windows specific fshook driver. One that uses
> HANDLEs rather than FILEs. Unless Win32 has a way to turn a FILE into a
> HANDLE.
>

I wrote a minimal stream class, used like:

~~~
ALLEGRO_FILE *fp = al_fopen("c:\\mysha2.bmp", "rb");

AllegroStream s(fp);
Gdiplus::Image *img = new Gdiplus::Image(&s, false);

if (img)
  std::cout << "image: " << img->GetWidth() << "x" << img->GetHeight()
<< std::endl;

delete img;
al_fclose(fp);
~~~

It works fine so far, although I haven't tried it on anything except
the standard file interface.

--
Matthew Leverton




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