Commit 9c36d3e8 authored by Sven Neumann's avatar Sven Neumann Committed by Sven Neumann
Browse files

plug_ins/common/Makefile.am added back spheredesigner so it gets some

2003-01-07  Sven Neumann  <sven@gimp.org>

	* plug_ins/common/Makefile.am
	* plug_ins/common/plugin_defs.pl: added back spheredesigner so it
	gets some testing again. Needs a good bunch of UI cleanup.

	* plug-ins/common/spheredesigner.c (loadit): use
	locale-independent functions to parse doubles.
parent 01dbd2c3
2003-01-07 Sven Neumann <sven@gimp.org>
* plug_ins/common/Makefile.am
* plug_ins/common/plugin_defs.pl: added back spheredesigner so it
gets some testing again. Needs a good bunch of UI cleanup.
* plug-ins/common/spheredesigner.c (loadit): use
locale-independent functions to parse doubles.
2003-01-06 Manish Singh <yosh@gimp.org>
* lots of files in plug-ins: cleanup, removed unecessary
G_OBJECT() casts.
 
......
......@@ -106,6 +106,7 @@ smooth_palette
snoise
sobel
sparkle
spheredesigner
spread
struc
sunras
......
......@@ -119,6 +119,7 @@ libexec_PROGRAMS = \
snoise \
sobel \
sparkle \
spheredesigner \
spread \
struc \
sunras \
......@@ -1388,6 +1389,18 @@ sparkle_LDADD = \
$(GTK_LIBS) \
$(INTLLIBS)
spheredesigner_SOURCES = \
spheredesigner.c
spheredesigner_LDADD = \
$(top_builddir)/libgimp/libgimpui-$(LT_RELEASE).la \
$(top_builddir)/libgimp/libgimp-$(LT_RELEASE).la \
$(top_builddir)/libgimpwidgets/libgimpwidgets-$(LT_RELEASE).la \
$(top_builddir)/libgimpcolor/libgimpcolor-$(LT_RELEASE).la \
$(top_builddir)/libgimpbase/libgimpbase-$(LT_RELEASE).la \
$(GTK_LIBS) \
$(INTLLIBS)
spread_SOURCES = \
spread.c
......
......@@ -103,6 +103,7 @@
'snoise' => { libdep => 'gtk', ui => 1 },
'sobel' => { libdep => 'gtk', ui => 1 },
'sparkle' => { libdep => 'gtk', ui => 1 },
'spheredesigner' => { libdep => 'gtk', ui => 1 },
'spread' => { libdep => 'gtk', ui => 1 },
'struc' => { libdep => 'gtk', ui => 1 },
'sunras' => { libdep => 'gtk', ui => 1 },
......
......@@ -25,15 +25,13 @@
#include "config.h"
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#ifdef HAVE_SYS_TIME_H
#include <sys/time.h>
#endif
#include <errno.h>
#ifdef HAVE_UNISTD_H
#include <unistd.h>
#endif
#include <stdlib.h>
#include <string.h>
#ifdef __GNUC__
#warning GTK_DISABLE_DEPRECATED
......@@ -1548,7 +1546,7 @@ char *mklabel(texture *t)
if(t->majtype == 0) strcpy(tmps, _("Texture"));
else if(t->majtype == 1) strcpy(tmps, _("Bumpmap"));
else if(t->majtype == 2) strcpy(tmps, _("Light"));
else strcpy(tmps, _("(unknown!?)"));
else strcpy(tmps, "(unknown!?)");
if((t->majtype == 0) || (t->majtype == 1)) {
strcat(tmps, " / ");
l = textures;
......@@ -1743,27 +1741,67 @@ void deltexture(void)
void loadit(const gchar *fn)
{
FILE *f;
char line[1024];
int i;
FILE *f;
gchar *end;
gchar line[1024];
gint i;
texture *t;
s.com.numtexture = 0;
f = fopen(fn, "rt");
while(!feof(f)) {
if(!fgets(line, 1023, f)) break;
if (!fgets (line, 1023, f))
break;
i = s.com.numtexture;
t = &s.com.texture[i];
setdefaults(t);
sscanf(line, "%d %d %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf %lf\n",
&t->majtype, &t->type,
&t->color1.x,&t->color1.y,&t->color1.z,&t->color1.w,
&t->color2.x,&t->color2.y,&t->color2.z,&t->color2.w,
&t->oscale, &t->turbulence.x, &t->amount, &t->exp,
&t->scale.x,&t->scale.y,&t->scale.z,
&t->rotate.x,&t->rotate.y,&t->rotate.z,
&t->translate.x,&t->translate.y,&t->translate.z);
if (sscanf (line, "%d %d %s", &t->majtype, &t->type, end) != 3)
t->color1.x = g_ascii_strtod (end, &end);
if (end && errno != ERANGE)
t->color1.y = g_ascii_strtod (end, &end);
if (end && errno != ERANGE)
t->color1.z = g_ascii_strtod (end, &end);
if (end && errno != ERANGE)
t->color1.w = g_ascii_strtod (end, &end);
if (end && errno != ERANGE)
t->color2.x = g_ascii_strtod (end, &end);
if (end && errno != ERANGE)
t->color2.y = g_ascii_strtod (end, &end);
if (end && errno != ERANGE)
t->color2.z = g_ascii_strtod (end, &end);
if (end && errno != ERANGE)
t->color2.w = g_ascii_strtod (end, &end);
if (end && errno != ERANGE)
t->oscale = g_ascii_strtod (end, &end);
if (end && errno != ERANGE)
t->turbulence.x = g_ascii_strtod (end, &end);
if (end && errno != ERANGE)
t->amount = g_ascii_strtod (end, &end);
if (end && errno != ERANGE)
t->exp = g_ascii_strtod (end, &end);
if (end && errno != ERANGE)
t->scale.x = g_ascii_strtod (end, &end);
if (end && errno != ERANGE)
t->scale.y = g_ascii_strtod (end, &end);
if (end && errno != ERANGE)
t->scale.z = g_ascii_strtod (end, &end);
if (end && errno != ERANGE)
t->rotate.x = g_ascii_strtod (end, &end);
if (end && errno != ERANGE)
t->rotate.y = g_ascii_strtod (end, &end);
if (end && errno != ERANGE)
t->rotate.z = g_ascii_strtod (end, &end);
if (end && errno != ERANGE)
t->translate.x = g_ascii_strtod (end, &end);
if (end && errno != ERANGE)
t->translate.y = g_ascii_strtod (end, &end);
if (end && errno != ERANGE)
t->translate.z = g_ascii_strtod (end, &end);
s.com.numtexture++;
}
fclose(f);
......@@ -1843,7 +1881,7 @@ void fileselect(int action)
{
static GtkWidget *windows[2] = {NULL,NULL};
char *titles[] = { N_("Open file"), N_("Save file") };
char *titles[] = { N_("Open File"), N_("Save File") };
void *handlers[] = { loadpreset_ok, savepreset_ok };
if(!windows[action]) {
......
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