Index:
[thread]
[date]
[subject]
[author]
From: Marcus Sundberg <mackan@stacken.kth.se>
To : ggi-develop@eskimo.com
Date: Fri, 26 Mar 1999 22:20:24 +0000
Re: Visuals 'n stuff
Nicolai Haehnle wrote:
>
> Jim Kjellin wrote:
>
> > I'm currently in the process of porting a game to ggi (mainly linux but
> > other OS's if there is demand).
> >
> > Since the game was develope under Windows/DX (not by me mind you :P) it uses
> > a big bunch surfaces
> > for visual-fx and sprites etc.
>
> I'm also porting a DX game to GGI and I have this problem, too. I'm currently
> writing a GGI extension that does all the memory-visual stuff automatically.
> You don't have to cope with visuals any more when using it.
>
> Every drawmap (=surface) is represented by a structure which looks like this:
>
> typedef struct _ggidm_drawmap {
> ggi_visual_t vis;
> struct dm_visual *parent;
>
> struct _ggidm_drawmap *prev;
> struct _ggidm_drawmap *next;
>
> int flags;
> ggi_coord pos;
> ggi_coord size;
> } *ggidm_drawmap;
>
> The API is designed to make porting DX games as easy as possible (it's not
> complete yet):
>
> int ggiDMSetMode(ggi_visual_t vis, int sizex, int sizey, int frames,
> ggi_graphtype type);
>
> ggidm_drawmap ggiDMAddDrawmap(ggi_visual_t vis, int sizex, int sizey,
> int flags);
> ggidm_drawmap ggiDMGetVisibleDrawmap(ggi_visual_t vis, int frame);
> int ggiDMFlip(ggi_visual_t vis);
>
> int ggiDMCloseDrawmap(ggidm_drawmap dm);
> int ggiDMAcquired(ggidm_drawmap dm);
> int ggiDMAcquire(ggidm_drawmap dm, int acquire);
> int ggiDMBlit(ggidm_drawmap dest, int destx, int desty,
> ggidm_drawmap src, int srcx, int srcy, int dx, int dy,
> int flags);
> int ggiDMBlitToVisual(ggi_visual_t dest, int destx, int desty,
> ggidm_drawmap src, int srcx, int srcy, int dx, int dy,
> int flags);
> int ggiDMBlitFromVisual(ggidm_drawmap dest, int destx, int desty,
> ggi_visual_t src, int srcx, int srcy, int dx, int dy,
> int flags);
>
> Of course the library is far from being complete and I don't have a lot of time
> in the next two weeks.
> However, the main thing, i.e. drawmap allocation is already written (though not
> very efficient yet). It still needs lots of debugging, though...
>
> BTW: GGI doesn't seem to support transparent blitting, right? This is badly
> needed...
LibGGI supports everything you want it to, it's just a matter of writing
the right extension.
The reason LibGGI itself doesn't support transparent blitting is to
keep the core library as small as possible.
//Marcus
--
-------------------------------+------------------------------------
Marcus Sundberg | http://www.stacken.kth.se/~mackan/
Royal Institute of Technology | Phone: +46 707 295404
Stockholm, Sweden | E-Mail: mackan@stacken.kth.se
Index:
[thread]
[date]
[subject]
[author]