adonthell-devel
[Top][All Lists]
Advanced

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

Re: [Adonthell-devel] gfx update


From: Tyler Nielsen
Subject: Re: [Adonthell-devel] gfx update
Date: Sat, 8 Apr 2006 09:07:00 -0600



On 4/8/06, Kai Sterker <address@hidden> wrote:
On 4/7/06, Tyler Nielsen <address@hidden> wrote:

> Everyone,
>
>  I commited code that saves and loads pngs... If anyone gets a chance try running gfxtest.py now.

Works smooth :-). However, there might be a problem with endianess.
The color of the rendered item is somewhat different than the actual
png. I'll have a look at it, so don't worry.


> Also, PNG files support
> per pixel alpha.  Right now I ignore it, but I can add support for it if
> Adonthell can benefit from it.  Any consensus here?

I agree with Andrew here. Might be useful for spell effects.


I had a few thought's on graphic loading in general. We'll probably
have some objects that are composed of several png's, so they'll come
with a description in xml format. But many will come as a single file,
so we shouldn't require any additional xml files for them. So I would
suggest a object loading mechanism that gets a filename without
extension and first tries to load an xml file of that name, and if
there isn't one, falls back to the png plain. Guess this functionality
could go into our gfx cache.

Kai


_______________________________________________
Adonthell-devel mailing list
address@hidden
http://lists.nongnu.org/mailman/listinfo/adonthell-devel

Thanks for fixing the endianess.problem...  As far as the graphic loading is concerned, I'm not sure how easy it would be to abstract it so you don't know if your getting an xml or a png.  I started down this path will a gfx cache that returned drawable (the common class of animation and surface).  The problem is, the member functions will be different.  IE.   a png will have calls like set_mask, and a xml will have something like do_animation.  Because of this, I've broken the cache into surface_cache and animation_cache.  That way you know what you have and can make the correct calls.  If I'm missing something, let me know.

Tyler

reply via email to

[Prev in Thread] Current Thread [Next in Thread]