Commit da5b08e8 authored by Dave Neary's avatar Dave Neary Committed by David Neary
Browse files

libgimpwidgets/gimpwidgets.c libgimpwidgets/gimpwidgets.h


2002-11-24  Dave Neary  <bolsh@gimp.org>

        * libgimpwidgets/gimpwidgets.c
        * libgimpwidgets/gimpwidgets.h
        * plug-ins/common/blur.c
        * plug-ins/common/plasma.c
        * plug-ins/common/randomize.c
        * plug-ins/common/sinus.c
        * plug-ins/common/snoise.c
        * plug-ins/gflare/gflare.c
        * plug-ins/maze/algorithms.c
        * plug-ins/maze/maze.c
        * plug-ins/maze/maze.h
        * plug-ins/maze/maze_face.c: Changed the gimp random seed
        widget's behaviour and made associated changes in
        plug-ins that use it.
parent ba9c7fe9
2002-11-24 Dave Neary <bolsh@gimp.org>
* libgimpwidgets/gimpwidgets.c
* libgimpwidgets/gimpwidgets.h
* plug-ins/common/blur.c
* plug-ins/common/plasma.c
* plug-ins/common/randomize.c
* plug-ins/common/sinus.c
* plug-ins/common/snoise.c
* plug-ins/gflare/gflare.c
* plug-ins/maze/algorithms.c
* plug-ins/maze/maze.c
* plug-ins/maze/maze.h
* plug-ins/maze/maze_face.c: Changed the gimp random seed
widget's behaviour and made associated changes in
plug-ins that use it.
2002-11-24 Sven Neumann <sven@gimp.org>
 
* app/display/gimpdisplayshell-callbacks.c
......
......@@ -463,8 +463,7 @@ prim_tileable(gchar *maz, guint x, guint y)
max_progress=x*y/4;
/* Pick someplace to start. */
if (!mvals.defaultseed)
g_rand_set_seed (gr, rnd);
g_rand_set_seed (gr, rnd);
pos = x * 2 * g_rand_int_range (gr, 0, y/2) + 2 * g_rand_int_range(gr, 0, x/2);
......
......@@ -116,8 +116,6 @@ MazeValues mvals =
57, /* multiple * These two had "Experiment with this?" comments */
1, /* offset * in the maz.c source, so, lets expiriment. :) */
DEPTH_FIRST, /* Algorithm */
/* Interface options */
TRUE /* Default seed? */
};
GRand *gr;
......@@ -221,7 +219,7 @@ run (gchar *name,
mvals.height = (gint16) param[4].data.d_int16;
mvals.tile = (gint8) param[5].data.d_int8;
mvals.algorithm = (gint8) param[6].data.d_int8;
mvals.seed = (gint32) param[7].data.d_int32;
mvals.seed = (guint32) param[7].data.d_int32;
mvals.multiple = (gint16) param[8].data.d_int16;
mvals.offset = (gint16) param[9].data.d_int16;
}
......@@ -246,7 +244,7 @@ run (gchar *name,
gimp_displays_flush ();
if (run_mode == GIMP_RUN_INTERACTIVE ||
(mvals.defaultseed && run_mode == GIMP_RUN_WITH_LAST_VALS))
(run_mode == GIMP_RUN_WITH_LAST_VALS))
gimp_set_data ("plug_in_maze", &mvals, sizeof (MazeValues));
}
else
......
......@@ -27,13 +27,12 @@ typedef enum {
typedef struct {
gint width;
gint height;
guint seed;
guint32 seed;
gboolean tile;
gint multiple;
gint offset;
MazeAlgoType algorithm;
/* Interface options. */
gboolean defaultseed;
} MazeValues;
enum CellTypes {
......
......@@ -292,9 +292,7 @@ maze_dialog (void)
&mvals.tile);
/* Seed input box */
seed_hbox = gimp_random_seed_new (&mvals.seed,
&mvals.defaultseed,
TRUE, FALSE);
seed_hbox = gimp_random_seed_new (&mvals.seed);
gimp_table_attach_aligned (GTK_TABLE (table), 0, trow,
_("Seed:"), 1.0, 0.5,
seed_hbox, 1, TRUE);
......
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