Re: [AD] support for mod files |
[ Thread Index |
Date Index
| More lists.liballeg.org/allegro-developers Archives
]
- To: "Coordination of admins/developers of the game programming library Allegro" <alleg-developers@xxxxxxxxxx>
- Subject: Re: [AD] support for mod files
- From: Matthew Leverton <meffer@xxxxxxxxxx>
- Date: Tue, 6 Apr 2010 22:22:13 -0500
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