+/*
+ * 2ooM: The Master of Orion II Reverse Engineering Project
+ * Routines for rendering LBX images to a GdkPixbuf.
+ * Copyright (C) 2010 Nick Bowler
+ *
+ * This program is free software: you can redistribute it and/or modify
+ * it under the terms of the GNU General Public License as published by
+ * the Free Software Foundation, either version 3 of the License, or
+ * (at your option) any later version.
+ *
+ * This program is distributed in the hope that it will be useful,
+ * but WITHOUT ANY WARRANTY; without even the implied warranty of
+ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
+ * GNU General Public License for more details.
+ *
+ * You should have received a copy of the GNU General Public License
+ * along with this program. If not, see <http://www.gnu.org/licenses/>.
+ */
#include <assert.h>
#include <gtk/gtk.h>
out[3] = -1; /* opaque */
}
-int render_to_pixbuf(LBX_IMG *image, GdkPixbuf *pixbuf, unsigned frame)
+int render_to_pixbuf(struct lbx_image *image, GdkPixbuf *pixbuf, unsigned frame)
{
unsigned char **framedata, **framemask, *outbuf;
struct lbx_imginfo info;
unsigned stride;
- lbximg_getinfo(image, &info);
+ lbx_img_getinfo(image, &info);
assert(info.width == gdk_pixbuf_get_width(pixbuf));
assert(info.height == gdk_pixbuf_get_height(pixbuf));
- framedata = lbximg_getframe(image, frame);
+ framedata = lbx_img_getframe(image, frame);
g_return_val_if_fail(framedata, -1);
- framemask = lbximg_getmask(image);
+ framemask = lbx_img_getmask(image);
outbuf = gdk_pixbuf_get_pixels(pixbuf);
stride = gdk_pixbuf_get_rowstride(pixbuf);