More nerds and a fairer shuffle algorithm.

--Sven
This commit is contained in:
Sven Neumann
1999-09-06 18:59:45 +00:00
parent 6b5f967d0c
commit 6ca8158aeb
4 changed files with 51 additions and 21 deletions

View File

@ -1,3 +1,9 @@
Mon Sep 6 21:00:57 MEST 1999 Sven Neumann <sven@gimp.org>
* app/about_dialog.c: added a few more contributors and changed
the algorithm slightly. Sorry, Lauri, this isn't against you, but
other people should have a chance to appear first too ;-)
1999-09-06 James Henstridge <james@daa.com.au>
* plug-ins/Makefile.am: conditionally compile pygimp.

View File

@ -25,8 +25,9 @@
#include "libgimp/gimpfeatures.h"
#include "config.h"
#include "libgimp/gimpintl.h"
#include "libgimp/gimpenv.h"
#include "libgimp/gimpintl.h"
#include "libgimp/gimpmath.h"
#include "about_dialog.h"
@ -91,16 +92,21 @@ static gchar *scroll_text[] =
"Tim Janik",
"Tuomas Kuosmanen",
"Peter Kirchgessner",
"Karin Kylander"
"Olof S Kylander",
"Nick Lamb",
"Karl LaRocca",
"Jens Lautenbacher",
"Laramie Leavitt",
"Elliot Lee",
"Marc Lehmann",
"Raph Levien",
"Adrian Likins",
"Tor Lillqvist",
"Ingo Luetkebohle",
"Josh MacDonald",
"Ed Mackey",
"Vidar Madsen",
"Marcelo Malheiros",
"Ian Main",
"Torsten Martinsen",
@ -111,8 +117,10 @@ static gchar *scroll_text[] =
"Sven Neumann",
"Stephen Robert Norris",
"Erik Nygren",
"Tomas Ogren",
"Miles O'Neal",
"Jay Painter",
"Asbjorn Pettersen",
"Mike Phillips",
"Raphael Quinet",
"James Robinson",
@ -133,7 +141,7 @@ static gchar *scroll_text[] =
static gint nscroll_texts = sizeof (scroll_text) / sizeof (scroll_text[0]);
static gint scroll_text_widths[100] = { 0 };
static gint cur_scroll_text = 0;
static gint cur_scroll_index = 0;
static gint cur_scroll_index;
static gint shuffle_array[ sizeof(scroll_text) / sizeof(scroll_text[0]) ];
@ -262,17 +270,17 @@ about_dialog_create (gint timeout)
for (i = 0; i < nscroll_texts; i++)
{
int j, k;
int j;
j = rand() % nscroll_texts;
k = rand() % nscroll_texts;
if (j != k)
if (i != j)
{
int t;
t = shuffle_array[j];
shuffle_array[j] = shuffle_array[k];
shuffle_array[k] = t;
shuffle_array[j] = shuffle_array[i];
shuffle_array[i] = t;
}
}
cur_scroll_text = rand() % nscroll_texts;
}
else
{

View File

@ -25,8 +25,9 @@
#include "libgimp/gimpfeatures.h"
#include "config.h"
#include "libgimp/gimpintl.h"
#include "libgimp/gimpenv.h"
#include "libgimp/gimpintl.h"
#include "libgimp/gimpmath.h"
#include "about_dialog.h"
@ -91,16 +92,21 @@ static gchar *scroll_text[] =
"Tim Janik",
"Tuomas Kuosmanen",
"Peter Kirchgessner",
"Karin Kylander"
"Olof S Kylander",
"Nick Lamb",
"Karl LaRocca",
"Jens Lautenbacher",
"Laramie Leavitt",
"Elliot Lee",
"Marc Lehmann",
"Raph Levien",
"Adrian Likins",
"Tor Lillqvist",
"Ingo Luetkebohle",
"Josh MacDonald",
"Ed Mackey",
"Vidar Madsen",
"Marcelo Malheiros",
"Ian Main",
"Torsten Martinsen",
@ -111,8 +117,10 @@ static gchar *scroll_text[] =
"Sven Neumann",
"Stephen Robert Norris",
"Erik Nygren",
"Tomas Ogren",
"Miles O'Neal",
"Jay Painter",
"Asbjorn Pettersen",
"Mike Phillips",
"Raphael Quinet",
"James Robinson",
@ -133,7 +141,7 @@ static gchar *scroll_text[] =
static gint nscroll_texts = sizeof (scroll_text) / sizeof (scroll_text[0]);
static gint scroll_text_widths[100] = { 0 };
static gint cur_scroll_text = 0;
static gint cur_scroll_index = 0;
static gint cur_scroll_index;
static gint shuffle_array[ sizeof(scroll_text) / sizeof(scroll_text[0]) ];
@ -262,17 +270,17 @@ about_dialog_create (gint timeout)
for (i = 0; i < nscroll_texts; i++)
{
int j, k;
int j;
j = rand() % nscroll_texts;
k = rand() % nscroll_texts;
if (j != k)
if (i != j)
{
int t;
t = shuffle_array[j];
shuffle_array[j] = shuffle_array[k];
shuffle_array[k] = t;
shuffle_array[j] = shuffle_array[i];
shuffle_array[i] = t;
}
}
cur_scroll_text = rand() % nscroll_texts;
}
else
{

View File

@ -25,8 +25,9 @@
#include "libgimp/gimpfeatures.h"
#include "config.h"
#include "libgimp/gimpintl.h"
#include "libgimp/gimpenv.h"
#include "libgimp/gimpintl.h"
#include "libgimp/gimpmath.h"
#include "about_dialog.h"
@ -91,16 +92,21 @@ static gchar *scroll_text[] =
"Tim Janik",
"Tuomas Kuosmanen",
"Peter Kirchgessner",
"Karin Kylander"
"Olof S Kylander",
"Nick Lamb",
"Karl LaRocca",
"Jens Lautenbacher",
"Laramie Leavitt",
"Elliot Lee",
"Marc Lehmann",
"Raph Levien",
"Adrian Likins",
"Tor Lillqvist",
"Ingo Luetkebohle",
"Josh MacDonald",
"Ed Mackey",
"Vidar Madsen",
"Marcelo Malheiros",
"Ian Main",
"Torsten Martinsen",
@ -111,8 +117,10 @@ static gchar *scroll_text[] =
"Sven Neumann",
"Stephen Robert Norris",
"Erik Nygren",
"Tomas Ogren",
"Miles O'Neal",
"Jay Painter",
"Asbjorn Pettersen",
"Mike Phillips",
"Raphael Quinet",
"James Robinson",
@ -133,7 +141,7 @@ static gchar *scroll_text[] =
static gint nscroll_texts = sizeof (scroll_text) / sizeof (scroll_text[0]);
static gint scroll_text_widths[100] = { 0 };
static gint cur_scroll_text = 0;
static gint cur_scroll_index = 0;
static gint cur_scroll_index;
static gint shuffle_array[ sizeof(scroll_text) / sizeof(scroll_text[0]) ];
@ -262,17 +270,17 @@ about_dialog_create (gint timeout)
for (i = 0; i < nscroll_texts; i++)
{
int j, k;
int j;
j = rand() % nscroll_texts;
k = rand() % nscroll_texts;
if (j != k)
if (i != j)
{
int t;
t = shuffle_array[j];
shuffle_array[j] = shuffle_array[k];
shuffle_array[k] = t;
shuffle_array[j] = shuffle_array[i];
shuffle_array[i] = t;
}
}
cur_scroll_text = rand() % nscroll_texts;
}
else
{