Commit 871a31f7 authored by Michael Natterer's avatar Michael Natterer 😴

plug-ins: remove ddsplugin.h and add ddsread.h and ddswrite.h

parent 42564c07
Pipeline #120217 passed with stages
in 26 minutes and 32 seconds
......@@ -31,9 +31,10 @@ file_dds_SOURCES = \
dds.h \
color.c \
color.h \
ddsplugin.h \
ddsread.c \
ddsread.h \
ddswrite.c \
ddswrite.h \
dxt.c \
dxt.h \
dxt_tables.h \
......
......@@ -33,11 +33,20 @@
#include <libgimp/stdplugins-intl.h>
#include "ddsplugin.h"
#include "dds.h"
#include "ddsread.h"
#include "ddswrite.h"
#include "misc.h"
#define LOAD_PROC "file-dds-load"
#define SAVE_PROC "file-dds-save"
#define DECODE_YCOCG_PROC "color-decode-ycocg"
#define DECODE_YCOCG_SCALED_PROC "color-decode-ycocg-scaled"
#define DECODE_ALPHA_EXP_PROC "color-decode-alpha-exp"
typedef struct _Dds Dds;
typedef struct _DdsClass DdsClass;
......
......@@ -21,11 +21,22 @@
#ifndef __DDS_H__
#define __DDS_H__
#define DDS_PLUGIN_VERSION_MAJOR 3
#define DDS_PLUGIN_VERSION_MINOR 9
#define DDS_PLUGIN_VERSION_REVISION 90
#define DDS_PLUGIN_VERSION \
((guint) (DDS_PLUGIN_VERSION_MAJOR << 16) | \
(guint) (DDS_PLUGIN_VERSION_MINOR << 8) | \
(guint) (DDS_PLUGIN_VERSION_REVISION))
#define FOURCC(a, b, c, d) \
((unsigned int)((unsigned int)(a) ) | \
((unsigned int)(b) << 8) | \
((unsigned int)(c) << 16) | \
((unsigned int)(d) << 24))
((guint) ((guint)(a) ) | \
((guint)(b) << 8) | \
((guint)(c) << 16) | \
((guint)(d) << 24))
typedef enum
{
......
......@@ -42,7 +42,7 @@
#include <libgimp/stdplugins-intl.h>
#include "ddsplugin.h"
#include "ddsread.h"
#include "dds.h"
#include "dxt.h"
#include "endian_rw.h"
......
/*
* DDS GIMP plugin
*
* Copyright (C) 2004-2012 Shawn Kirst <skirst@gmail.com>,
* with parts (C) 2003 Arne Reuter <homepage@arnereuter.de> where specified.
*
* 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 <https://www.gnu.org/licenses/>.
*/
#ifndef __DDSREAD_H__
#define __DDSREAD_H__
extern GimpPDBStatusType read_dds (GFile *file,
GimpImage **image,
gboolean interactive,
GimpProcedure *procedure,
GObject *config);
#endif /* __DDSREAD_H__ */
......@@ -35,7 +35,7 @@
#include <libgimp/stdplugins-intl.h>
#include "ddsplugin.h"
#include "ddswrite.h"
#include "dds.h"
#include "dxt.h"
#include "mipmap.h"
......@@ -1936,24 +1936,21 @@ save_dialog (GimpImage *image,
GimpProcedure *procedure,
GObject *config)
{
GtkWidget *dialog;
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *grid;
GtkListStore *store;
GtkWidget *opt;
GtkWidget *check;
GtkWidget *frame;
GimpImageBaseType basetype;
gboolean run;
GtkWidget *dialog;
GtkWidget *vbox;
GtkWidget *hbox;
GtkWidget *grid;
GtkListStore *store;
GtkWidget *opt;
GtkWidget *check;
GtkWidget *frame;
gboolean run;
if (is_cubemap || is_volume || is_array)
g_object_set (config,
"save-type", DDS_SAVE_SELECTED_LAYER,
NULL);
basetype = gimp_image_base_type (image);
dialog = gimp_procedure_dialog_new (procedure,
GIMP_PROCEDURE_CONFIG (config),
_("Export Image as DDS"));
......
......@@ -18,23 +18,10 @@
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*/
#ifndef __DDSPLUGIN_H__
#define __DDSPLUGIN_H__
#ifndef __DDSWRITE_H__
#define __DDSWRITE_H__
#define DDS_PLUGIN_VERSION_MAJOR 3
#define DDS_PLUGIN_VERSION_MINOR 9
#define DDS_PLUGIN_VERSION_REVISION 90
#define DDS_PLUGIN_VERSION \
((unsigned int)(DDS_PLUGIN_VERSION_MAJOR << 16) | \
(unsigned int)(DDS_PLUGIN_VERSION_MINOR << 8) | \
(unsigned int)(DDS_PLUGIN_VERSION_REVISION))
extern GimpPDBStatusType read_dds (GFile *file,
GimpImage **image,
gboolean interactive,
GimpProcedure *procedure,
GObject *config);
extern GimpPDBStatusType write_dds (GFile *file,
GimpImage *image,
GimpDrawable *drawable,
......@@ -43,11 +30,4 @@ extern GimpPDBStatusType write_dds (GFile *file,
GObject *config);
#define LOAD_PROC "file-dds-load"
#define SAVE_PROC "file-dds-save"
#define DECODE_YCOCG_PROC "color-decode-ycocg"
#define DECODE_YCOCG_SCALED_PROC "color-decode-ycocg-scaled"
#define DECODE_ALPHA_EXP_PROC "color-decode-alpha-exp"
#endif /* __DDSPLUGIN_H__ */
#endif /* __DDSWRITE_H__ */
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment