diff options
| author | Jacob1 <jfu614@gmail.com> | 2012-05-24 17:08:55 (GMT) |
|---|---|---|
| committer | Jacob1 <jfu614@gmail.com> | 2012-05-24 17:08:55 (GMT) |
| commit | 5edd224344b427f75f0740217e10cb4e44313a5d (patch) | |
| tree | 740c6b6833b30d26daa161f70177e99c03ccb950 /src/graphics.c | |
| parent | f49f4ea2413464ebdfac6ee0be32c1b282839c63 (diff) | |
| download | powder-5edd224344b427f75f0740217e10cb4e44313a5d.zip powder-5edd224344b427f75f0740217e10cb4e44313a5d.tar.gz | |
custom graphics functions with lua (not finished yet)
Diffstat (limited to 'src/graphics.c')
| -rw-r--r-- | src/graphics.c | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/graphics.c b/src/graphics.c index c47c44e..60d23b0 100644 --- a/src/graphics.c +++ b/src/graphics.c @@ -47,6 +47,9 @@ #include <font.h> #include <misc.h> #include "hmap.h" +#ifdef LUACONSOLE +#include <luaconsole.h> +#endif #if defined(LIN32) || defined(LIN64) #include "icon.h" @@ -1854,8 +1857,17 @@ void render_parts(pixel *vid) } else if(!(colour_mode & COLOUR_BASC)) //Don't get special effects for BASIC colour mode { +#ifdef LUACONSOLE + if (lua_gr_func[t]) + { + colr = luacon_graphics_update(t,i); + } + else if (ptypes[t].graphics_func) + { +#else if (ptypes[t].graphics_func) { +#endif if ((*(ptypes[t].graphics_func))(&(parts[i]), nx, ny, &pixel_mode, &cola, &colr, &colg, &colb, &firea, &firer, &fireg, &fireb)) //That's a lot of args, a struct might be better { graphicscache[t].isready = 1; |
