X-Git-Url: https://git.draconx.ca/gitweb/liblbx.git/blobdiff_plain/e5fa9ca748b73c6008754ce2c48e9a85a78a1f17..5ca921b28d5ca2964e19dad8f9b8614b2aebca4d:/src/gui/lbxgui.c diff --git a/src/gui/lbxgui.c b/src/gui/lbxgui.c index 7eed44f..a3212a6 100644 --- a/src/gui/lbxgui.c +++ b/src/gui/lbxgui.c @@ -37,7 +37,7 @@ static GtkBuilder *builder; static GtkWidget *canvas; static GdkGC *bg_gc; -static LBXimg *image; +static struct lbx_image *image; static GdkPixbuf *framebuf; @@ -152,7 +152,7 @@ gboolean canvas_expose(GtkWidget *canvas, GdkEventExpose *event, gpointer data) return TRUE; } -static int alloc_framebuffer(LBXimg *image) +static int alloc_framebuffer(struct lbx_image *image) { struct lbx_imginfo info; GtkSpinButton *spin; @@ -179,10 +179,10 @@ static int close_image(void *handle) return 0; } -static LBXimg *load_lbx_image(LBX *archive, unsigned index) +static struct lbx_image *load_lbx_image(struct lbx *archive, unsigned index) { LBXfile *file; - LBXimg *image; + struct lbx_image *image; file = lbx_file_open(archive, index); g_return_val_if_fail(file, NULL); @@ -198,7 +198,7 @@ void set_override(GtkComboBox *combo) GtkTreeIter iter; gpointer lbx; guint index; - LBXimg *img; + struct lbx_image *img; memset(palette_override, 0, sizeof palette_override); if (!gtk_combo_box_get_active_iter(combo, &iter)) @@ -248,7 +248,7 @@ void set_image(GtkComboBox *combo) GtkTreeIter iter; gpointer lbx; guint index; - LBXimg *img; + struct lbx_image *img; if (image) { lbx_img_close(image); @@ -317,7 +317,7 @@ static int load_archive(const char *path) gchar *basename; GtkTreeIter iter1, iter2; unsigned nfiles; - LBX *lbx; + struct lbx *lbx; lbx = lbx_fopen(path); if (!lbx) @@ -331,8 +331,7 @@ static int load_archive(const char *path) -1); g_free(basename); - nfiles = lbx_numfiles(lbx); - for (unsigned i = 0; i < nfiles; i++) { + for (unsigned i = 0; i < lbx->nfiles; i++) { struct lbx_statbuf stat; lbx_file_stat(lbx, i, &stat);