[EMAIL PROTECTED] (Christoph Egger) writes:

> > Making it _read_ files does not gain you anything over any other
> > approach, and is plain wrong.
> 
> No. You can easily write a ggiviewer for example (have a look at the
> attachment).

If you do what I suggest you can replace the code:

>       file_vis = ggiOpen("display-file:./author19.bmp");
> 
>       ggiCheckMode(file_vis, tm);
>       ggiSetMode(vis, tm);
> 
>       ggiCrossBlit(file_vis, 0,0, tm->virt.x,tm->virt.y, vis,0,0);

with:

gflLoadImageToVis(vis, "./author19.bmp");

and you have not added a bunch of kludgy bloat to the file target.
(gfl == GGI File Loader)

> > Especially considering that you can't do anything with a visual
> > until you have set a mode, and ggiSetMode() clears the visual...
> 
> I can't follow you here. Please explain it more detailed.

The ggiCheckMode() and ggiCrossBlit() in your program invokes
undefined behaviour, because you have not set a mode on file_vis.
If you did set a mode on file_vis it would be all black.

//Marcus
-- 
-------------------------------+------------------------------------
        Marcus Sundberg        | http://www.stacken.kth.se/~mackan
 Royal Institute of Technology |       Phone: +46 707 295404
       Stockholm, Sweden       |   E-Mail: [EMAIL PROTECTED]

Reply via email to