diff --git a/ChangeLog b/ChangeLog index 1f325f2740..e0ad1e573e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,9 @@ +2004-11-05 Michael Natterer + + * plug-ins/maze/maze.c + * plug-ins/maze/maze_face.c: some irrelevant cleanups while doing + code review. + 2004-11-05 Michael Natterer * plug-ins/flame/flame.c: removed #undef GTK_DISABLE_DEPRECATED diff --git a/plug-ins/maze/maze.c b/plug-ins/maze/maze.c index 777dafb528..efbe7909ff 100644 --- a/plug-ins/maze/maze.c +++ b/plug-ins/maze/maze.c @@ -37,32 +37,27 @@ * */ -#ifndef SOLO_COMPILE #include "config.h" -#endif #include #include -#ifdef MAZE_DEBUG -#ifdef HAVE_UNISTD_H -#include -#endif -#endif -#include #include "libgimp/gimp.h" -#include "libgimp/stdplugins-intl.h" +#include "libgimp/gimpui.h" #include "maze.h" -extern gint maze_dialog (void); -static void query (void); -static void run (const gchar *name, - gint nparams, - const GimpParam *param, - gint *nreturn_vals, - GimpParam **return_vals); -static void maze (GimpDrawable *drawable); +#include "libgimp/stdplugins-intl.h" + + +static void query (void); +static void run (const gchar *name, + gint nparams, + const GimpParam *param, + gint *nreturn_vals, + GimpParam **return_vals); + +static void maze (GimpDrawable *drawable); static void mask_maze (gint32 selection_ID, guchar *maz, @@ -75,6 +70,9 @@ static void mask_maze (gint32 selection_ID, gint deadx, gint deady); +/* In maze_face.c */ +extern gint maze_dialog (void); + /* In algorithms.c */ extern void mazegen (gint pos, guchar *maz, @@ -106,6 +104,7 @@ extern void drawbox (GimpPixelRgn *dest_rgn, guint h, guint8 clr[4]); + GimpPlugInInfo PLUG_IN_INFO = { NULL, /* init_proc */ @@ -116,22 +115,23 @@ GimpPlugInInfo PLUG_IN_INFO = MazeValues mvals = { - /* Calling parameters */ - 5, /* Passage width */ - 5, /* Passage height */ - 0, /* seed */ - FALSE, /* Tileable? */ - 57, /* multiple * These two had "Experiment with this?" comments */ - 1, /* offset * in the maz.c source, so, lets expiriment. :) */ - DEPTH_FIRST, /* Algorithm */ - TRUE, /* random_seed */ + 5, /* Passage width */ + 5, /* Passage height */ + 0, /* seed */ + FALSE, /* Tileable? */ + 57, /* multiple * These two had "Experiment with this?" comments */ + 1, /* offset * in the maz.c source, so, lets expiriment. :) */ + DEPTH_FIRST, /* Algorithm */ + TRUE, /* random_seed */ }; GRand *gr; guint sel_w, sel_h; -MAIN () /*;*/ + +MAIN () + static void query () @@ -232,13 +232,13 @@ run (const gchar *name, if (status == GIMP_PDB_SUCCESS) { - mvals.width = (gint16) param[3].data.d_int16; - 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 = (guint32) param[7].data.d_int32; - mvals.multiple = (gint16) param[8].data.d_int16; - mvals.offset = (gint16) param[9].data.d_int16; + mvals.width = (gint16) param[3].data.d_int16; + 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 = (guint32) param[7].data.d_int32; + mvals.multiple = (gint16) param[8].data.d_int16; + mvals.offset = (gint16) param[9].data.d_int16; if (mvals.random_seed) mvals.seed = g_random_int (); diff --git a/plug-ins/maze/maze_face.c b/plug-ins/maze/maze_face.c index 8ae7946348..6ed86e6d6a 100644 --- a/plug-ins/maze/maze_face.c +++ b/plug-ins/maze/maze_face.c @@ -37,7 +37,7 @@ #define BORDER_TOLERANCE 1.00 /* maximum ratio of (max % divs) to width */ -#define ENTRY_WIDTH 75 +#define ENTRY_WIDTH 75 /* entscale stuff begin */ /* FIXME: Entry-Scale stuff is probably in libgimpui by now.