Back to index

gcompris  8.2.2
Defines | Functions | Variables
gletters.c File Reference
#include <string.h>
#include "gcompris/gcompris.h"

Go to the source code of this file.

Defines

#define SOUNDLISTFILE   PACKAGE
#define MAX_RAND_ATTEMPTS   5
#define DEFAULT_SUBLEVEL   8
#define FALL_RATE_BASE   40
#define FALL_RATE_MULT   100
#define DROP_RATE_BASE   1000
#define DROP_RATE_MULT   8000
#define MAXLEVEL   10

Functions

static void start_board (GcomprisBoard *agcomprisBoard)
static void pause_board (gboolean pause)
static void end_board (void)
static gboolean is_our_board (GcomprisBoard *gcomprisBoard)
static void set_level (guint level)
static gint key_press (guint keyval, gchar *commit_str, gchar *preedit_str)
static void gletter_config_start (GcomprisBoard *agcomprisBoard, GcomprisProfile *aProfile)
static void gletter_config_stop (void)
static GnomeCanvasItem * gletters_create_item (GnomeCanvasGroup *parent)
static gint gletters_drop_items (GtkWidget *widget, gpointer data)
static gint gletters_move_items (GtkWidget *widget, gpointer data)
static void gletters_destroy_item (GnomeCanvasItem *item)
static void gletters_destroy_items (void)
static void gletters_destroy_all_items (void)
static void gletters_next_level (void)
static void gletters_add_new_item (void)
static void player_win (GnomeCanvasItem *item)
static void player_loose (void)
static GnomeCanvasItem * item_find_by_title (const gunichar *title)
static gunichar * key_find_by_item (const GnomeCanvasItem *item)
static void level_set_score ()
int load_default_charset ()
int whitespace (char *buffer)
static void add_char (char *key, char *value, char *char_list)
gboolean unichar_comp (gpointer key, gpointer value, gpointer user_data)
gint is_falling_letter (gunichar unichar)
static void gletters_move_item (GnomeCanvasItem *item)
void destroy_canvas_item (gpointer item)
static void save_table (gpointer key, gpointer value, gpointer user_data)
static void conf_ok (GHashTable *table)

Variables

static GList * item_list = NULL
static GList * item2del_list = NULL
static GcomprisBoard * gcomprisBoard = NULL
static gint dummy_id = 0
static gint drop_items_id = 0
static float fallRateBase = FALL_RATE_BASE
static float fallRateMult = FALL_RATE_MULT
static float dropRateBase = DROP_RATE_BASE
static float dropRateMult = DROP_RATE_MULT
static int maxLevel
static char * letters_array [MAXLEVEL]
static int keyMapSize
static char ** keyMap
static GHashTable * letters_table = NULL
static guint32 fallSpeed = 0
static double speed = 0.0
static int gamewon
static gboolean with_sound = FALSE
static BoardPlugin menu_bp
static gboolean uppercase_only
static GcomprisProfileprofile_conf
static GcomprisBoard * board_conf

Define Documentation

#define DEFAULT_SUBLEVEL   8

Definition at line 43 of file gletters.c.

#define DROP_RATE_BASE   1000

Definition at line 61 of file gletters.c.

#define DROP_RATE_MULT   8000

Definition at line 63 of file gletters.c.

#define FALL_RATE_BASE   40

Definition at line 51 of file gletters.c.

#define FALL_RATE_MULT   100

Definition at line 53 of file gletters.c.

#define MAX_RAND_ATTEMPTS   5

Definition at line 27 of file gletters.c.

#define MAXLEVEL   10

Definition at line 78 of file gletters.c.

#define SOUNDLISTFILE   PACKAGE

Definition at line 26 of file gletters.c.


Function Documentation

static void add_char ( char *  key,
char *  value,
char *  char_list 
) [static]

Definition at line 365 of file gletters.c.

{
  strcat(char_list, key);
}

Here is the caller graph for this function:

static void conf_ok ( GHashTable *  table) [static]

Definition at line 800 of file gletters.c.

{
  if (!table){
    if (gcomprisBoard)
      pause_board(FALSE);
    return;
  }

  g_hash_table_foreach(table, save_table, NULL);

  if (gcomprisBoard){
    gc_locale_reset();

    GHashTable *config;

    if (profile_conf)
      config = gc_db_get_board_conf();
    else
      config = table;

    gc_locale_set(g_hash_table_lookup( config, "locale"));

    gchar *up_init_str = g_hash_table_lookup( config, "uppercase_only");

    if (up_init_str && (strcmp(up_init_str, "True")==0))
      uppercase_only = TRUE;
    else
      uppercase_only = FALSE;

    gchar *control_sound = g_hash_table_lookup( config, "with_sound");

    if (control_sound && strcmp(g_hash_table_lookup( config, "with_sound"),"True")==0)
      with_sound = TRUE;
    else
      with_sound = FALSE;

    if (profile_conf)
      g_hash_table_destroy(config);

    load_default_charset();

    level_set_score();
    gletters_next_level();

    pause_board(FALSE);

  }

  board_conf = NULL;
  profile_conf = NULL;

}

Here is the call graph for this function:

Here is the caller graph for this function:

void destroy_canvas_item ( gpointer  item)

Definition at line 580 of file gletters.c.

{
  //g_free(g_object_get_data (G_OBJECT(item),"unichar_key"));
  //g_free(g_object_get_data (G_OBJECT(item),"utf8_key"));
  gtk_object_destroy (GTK_OBJECT(item));
}

Here is the caller graph for this function:

static void end_board ( void  ) [static]

Definition at line 329 of file gletters.c.

{
  int i;
  if(gcomprisBoard!=NULL)
    {
      pause_board(TRUE);
      gc_score_end();
      gletters_destroy_all_items();
      g_message("freeing memory");
      for (i = 0; i < maxLevel; i++)
       g_free(letters_array[i]);

      for (i = 0; i < keyMapSize; i++)
       g_free(keyMap[i]);

      g_free(keyMap);
    }

  gc_locale_reset();

  gcomprisBoard = NULL;
}

Here is the call graph for this function:

static void gletter_config_start ( GcomprisBoard *  agcomprisBoard,
GcomprisProfile aProfile 
) [static]

Definition at line 854 of file gletters.c.

{
  board_conf = agcomprisBoard;
  profile_conf = aProfile;

  gchar *label;

  if (gcomprisBoard)
    pause_board(TRUE);

  label = g_strdup_printf("<b>%s</b> configuration\n for profile <b>%s</b>",
                       agcomprisBoard->name, aProfile ? aProfile->name : "");

  gc_board_config_window_display(label, (GcomprisConfCallback )conf_ok);

  g_free(label);

  /* init the combo to previously saved value */
  GHashTable *config = gc_db_get_conf( profile_conf, board_conf);

  gchar *locale = g_hash_table_lookup( config, "locale");

  gc_board_config_combo_locales( locale);

  gboolean up_init = FALSE;

  gchar *up_init_str = g_hash_table_lookup( config, "uppercase_only");

  if (up_init_str && (strcmp(up_init_str, "True")==0))
    up_init = TRUE;

  gc_board_conf_separator();

  gchar *control_sound = g_hash_table_lookup( config, "with_sound");
  if (control_sound && strcmp(g_hash_table_lookup( config, "with_sound"),"True")==0)
    with_sound = TRUE;
  else
    with_sound = FALSE;

  gc_board_config_boolean_box("Enable sounds", "with_sound", with_sound);

  gc_board_conf_separator();

  gc_board_config_boolean_box(_("Uppercase only text"),
                     "uppercase_only",
                     up_init);

}

Here is the call graph for this function:

static void gletter_config_stop ( void  ) [static]

Definition at line 909 of file gletters.c.

{
}
static void gletters_add_new_item ( void  ) [static]

Definition at line 690 of file gletters.c.

{
  gletters_create_item(gnome_canvas_root(gcomprisBoard->canvas));
}

Here is the call graph for this function:

Here is the caller graph for this function:

static GnomeCanvasItem * gletters_create_item ( GnomeCanvasGroup *  parent) [static]

Definition at line 587 of file gletters.c.

{
  GnomeCanvasItem *item;
  gint i,j,k;
  guint x;
  gunichar *lettersItem;
  gchar *str_p, *letter;

  if (!letters_table)
    {
      letters_table = g_hash_table_new_full (g_int_hash, g_int_equal, g_free, destroy_canvas_item);
    }

  /* Beware, since we put the letters in a hash table, we do not allow the same
   * letter to be displayed two times
   */

  g_warning("dump: %d, %s\n",gcomprisBoard->level,letters_array[gcomprisBoard->level-1]);

  k = g_utf8_strlen(letters_array[gcomprisBoard->level-1],-1);

  lettersItem = g_new(gunichar,1);
  gint attempt=0;
  do
    {
      attempt++;
      str_p = letters_array[gcomprisBoard->level-1];
      i = (int)((float)k*rand()/(RAND_MAX+1.0));

      for(j = 0; j < i; j++)
       {
         str_p=g_utf8_next_char(str_p);
       }

      *lettersItem = g_utf8_get_char (str_p);

    } while((attempt<MAX_RAND_ATTEMPTS) && (item_find_by_title(lettersItem)!=NULL));

  if (item_find_by_title(lettersItem)!=NULL)
    {
      g_free(lettersItem);
      return NULL;
    }

  letter = g_new0(gchar, 6);
  g_unichar_to_utf8 ( *lettersItem, letter);

  if (with_sound)
    {
      gchar *str2 = NULL;
      gchar *letter_unichar_name = gc_sound_alphabet(letter);

      str2 = g_strdup_printf("sounds/$LOCALE/alphabet/%s", letter_unichar_name);

      gc_sound_play_ogg(str2, NULL);

      g_free(letter_unichar_name);
      g_free(str2);
    }

  item =                                  \
    gnome_canvas_item_new (parent,
                        gnome_canvas_group_get_type (),
                        "x", (double) 0,
                        "y", (double) -12,
                        NULL);

  x = 80 + (int)((float)(gcomprisBoard->width-160)*rand()/(RAND_MAX+1.0));
  gnome_canvas_item_new (GNOME_CANVAS_GROUP(item),
                      gnome_canvas_text_get_type (),
                      "text", letter,
                      "font", gc_skin_font_board_huge_bold,
                      "x", (double) x,
                      "y", (double) -20,
                      "anchor", GTK_ANCHOR_CENTER,
                      "fill_color_rgba", 0x8c8cFFFF,
                      NULL);
  x -= 2;
  gnome_canvas_item_new (GNOME_CANVAS_GROUP(item),
                      gnome_canvas_text_get_type (),
                      "text", letter,
                      "font", gc_skin_font_board_huge_bold,
                      "x", (double) x,
                      "y", (double) -22,
                      "anchor", GTK_ANCHOR_CENTER,
                      "fill_color_rgba", 0x254c87FF,
                      NULL);

  g_object_set_data (G_OBJECT(item), "unichar_key", lettersItem);
  g_object_set_data (G_OBJECT(item), "utf8_key", letter);

  item_list = g_list_append (item_list, item);

  /* Add letter to hash table of all falling letters. */
  g_hash_table_insert (letters_table, lettersItem, item);

  g_free(letter);

  g_warning("done\n");

  return (item);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void gletters_destroy_all_items ( void  ) [static]

Definition at line 544 of file gletters.c.

{
  GnomeCanvasItem *item;

  if(item_list)
    while(g_list_length(item_list)>0)
      {
       item = g_list_nth_data(item_list, 0);
       gletters_destroy_item(item);
      }

  /* Delete the letters_table */
  if(letters_table) {
    g_hash_table_destroy (letters_table);
    letters_table=NULL;
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void gletters_destroy_item ( GnomeCanvasItem *  item) [static]

Definition at line 515 of file gletters.c.

{
  gunichar *key;

  key = key_find_by_item(item);

  item_list = g_list_remove (item_list, item);

  item2del_list = g_list_remove (item2del_list, item);

  /* Remove old letter; this destroy the canvas item  */
  g_warning("destroying %d", *key);
  g_hash_table_remove (letters_table, key);

}

Here is the call graph for this function:

Here is the caller graph for this function:

static void gletters_destroy_items ( void  ) [static]

Definition at line 532 of file gletters.c.

{
  GnomeCanvasItem *item;

  while(g_list_length(item2del_list)>0)
    {
      item = g_list_nth_data(item2del_list, 0);
      gletters_destroy_item(item);
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static gint gletters_drop_items ( GtkWidget *  widget,
gpointer  data 
) [static]

Definition at line 699 of file gletters.c.

{
  gletters_add_new_item();

  drop_items_id = gtk_timeout_add (fallSpeed,
                               (GtkFunction) gletters_drop_items, NULL);
  return (FALSE);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void gletters_move_item ( GnomeCanvasItem *  item) [static]

Definition at line 497 of file gletters.c.

{
  double x1, y1, x2, y2;

  gnome_canvas_item_move(item, 0, 2.0);

  gnome_canvas_item_get_bounds    (item,
                               &x1,
                               &y1,
                               &x2,
                               &y2);

  if(y1>gcomprisBoard->height) {
    item2del_list = g_list_append (item2del_list, item);
    player_loose();
  }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static gint gletters_move_items ( GtkWidget *  widget,
gpointer  data 
) [static]

Definition at line 566 of file gletters.c.

{
  g_list_foreach (item_list, (GFunc) gletters_move_item, NULL);

  /* Destroy items that falls out of the canvas */
  gletters_destroy_items();

  dummy_id = gtk_timeout_add (speed,
                           (GtkFunction) gletters_move_items, NULL);

  return(FALSE);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void gletters_next_level ( void  ) [static]

Definition at line 480 of file gletters.c.

Here is the call graph for this function:

Here is the caller graph for this function:

gint is_falling_letter ( gunichar  unichar)

Definition at line 381 of file gletters.c.

{
  GnomeCanvasItem *item;

  if ((item = g_hash_table_find(letters_table,
                            unichar_comp,
                            &unichar)))
    {
      player_win(item);
      return TRUE;
    }
  return FALSE;
}

Here is the call graph for this function:

Here is the caller graph for this function:

static gboolean is_our_board ( GcomprisBoard *  gcomprisBoard) [static]

Definition at line 458 of file gletters.c.

{
  if (gcomprisBoard)
    {
      if(g_strcasecmp(gcomprisBoard->type, "gletters")==0)
       {
         /* Set the plugin entry */
         gcomprisBoard->plugin=&menu_bp;

         return TRUE;
       }
    }
  return FALSE;
}
static GnomeCanvasItem * item_find_by_title ( const gunichar *  title) [static]

Definition at line 767 of file gletters.c.

{
  if (!letters_table)
    return NULL;

  return g_hash_table_lookup (letters_table, title);
}

Here is the caller graph for this function:

static gunichar * key_find_by_item ( const GnomeCanvasItem *  item) [static]

Definition at line 761 of file gletters.c.

{
  return g_object_get_data (G_OBJECT(item), "unichar_key");
}

Here is the caller graph for this function:

static gint key_press ( guint  keyval,
gchar *  commit_str,
gchar *  preedit_str 
) [static]

Definition at line 395 of file gletters.c.

                                                                           {
  gint length_passed, i;
  gunichar c;
  gchar  list_of_letters[255];
  gchar *str;

  if(!gcomprisBoard)
    return FALSE;

  /* i suppose even numbers are passed through IM_context */
  if ((commit_str == NULL) && (preedit_str == NULL))
    return FALSE;

  gchar *string_passed;
  if (commit_str)
    string_passed = commit_str;
  else
    string_passed = preedit_str;

  str = g_strdup(string_passed);

  length_passed = g_utf8_strlen(string_passed, -1);

  for (i=0; i < length_passed; i++){
    c = g_utf8_get_char (string_passed);
    if (is_falling_letter(c)){
      gc_im_reset();
      return TRUE;
    }

    /* if uppercase_only is set we do not care about upper or lower case at all */
    gint level_uppercase;
    if (uppercase_only)
      level_uppercase = 10;
    else
      level_uppercase = 3;

    /* for 2 (or all) first level don't care abour uppercase/lowercase */
    if ((gcomprisBoard->level < level_uppercase) &&
       (is_falling_letter(g_unichar_toupper(c)))){
      gc_im_reset();
      return TRUE;
    }

    string_passed = g_utf8_next_char (string_passed);
  }

  list_of_letters[0] = '\0';

  /* We have to loop to concat the letters */
  g_hash_table_foreach (letters_table,
                     (GHFunc) add_char,
                     list_of_letters);

  /* Log what happened, what was expected, what we got */

  gc_log_set_comment(gcomprisBoard, list_of_letters, str);
  g_free(str);

  return TRUE;
}

Here is the call graph for this function:

static void level_set_score ( ) [static]

Definition at line 167 of file gletters.c.

                              {
  int l;

  g_message("letters_array length for level %d is %ld\n",
           gcomprisBoard->level,
           g_utf8_strlen(letters_array[gcomprisBoard->level-1],-1));
  l = g_utf8_strlen(letters_array[gcomprisBoard->level-1],-1)/3;
  gcomprisBoard->number_of_sublevel = (DEFAULT_SUBLEVEL>l?DEFAULT_SUBLEVEL:l);

  gc_score_start(SCORESTYLE_NOTE,
                     gcomprisBoard->width - 220,
                     gcomprisBoard->height - 50,
                     gcomprisBoard->number_of_sublevel);
  gc_bar_set(GC_BAR_CONFIG|GC_BAR_LEVEL);
}

Here is the call graph for this function:

Here is the caller graph for this function:

Definition at line 219 of file gletters.c.

                           {
  g_message("in load_default_charset\n");

  gchar *numbers;
  gchar *alphabet_lowercase;
  gchar *alphabet_uppercase;

  /* TRANSLATORS: Put here the numbers in your language */
  numbers=_("0123456789");
  g_assert(g_utf8_validate(numbers,-1,NULL)); // require by all utf8-functions

  /* TRANSLATORS: Put here the alphabet lowercase in your language */
  alphabet_lowercase=_("abcdefghijklmnopqrstuvwxyz");
  g_assert(g_utf8_validate(alphabet_lowercase,-1,NULL)); // require by all utf8-functions

  g_warning("Using lowercase %s", alphabet_lowercase);

  /* TRANSLATORS: Put here the alphabet uppercase in your language */
  alphabet_uppercase=_("ABCDEFGHIJKLMNOPQRSTUVWXYZ");
  g_assert(g_utf8_validate(alphabet_uppercase,-1,NULL)); // require by all utf8-functions
  g_warning("Using uppercase %s", alphabet_uppercase);

  letters_array[0] = g_strdup(alphabet_uppercase);
  letters_array[1] = g_strdup_printf("%s%s",
                                 alphabet_uppercase,
                                 numbers);
  if (!uppercase_only){
  letters_array[2] = g_strdup(alphabet_lowercase);
  letters_array[3] = g_strdup_printf("%s%s",
                                 alphabet_lowercase,
                                 numbers);
  letters_array[4] = g_strdup_printf("%s%s",
                                 alphabet_lowercase,
                                 alphabet_uppercase);
  letters_array[5] = g_strdup_printf("%s%s%s",
                                 alphabet_lowercase,
                                 alphabet_uppercase,
                                 numbers);
  } else{
    g_warning("Uppercase only is set");
      letters_array[2] = g_strdup(alphabet_uppercase);
    letters_array[3] = g_strdup_printf("%s%s",
                                   alphabet_uppercase,
                                   numbers);
    letters_array[4] = g_strdup_printf("%s%s",
                                   alphabet_uppercase,
                                   numbers);
    letters_array[5] = g_strdup_printf("%s%s",
                                   alphabet_uppercase,
                                   numbers);
  }


  keyMapSize = 0;
  maxLevel = 6;
  return TRUE;
}

Here is the caller graph for this function:

static void pause_board ( gboolean  pause) [static]

Definition at line 183 of file gletters.c.

{
  if(gcomprisBoard==NULL)
    return;

  if(pause)
    {
      if (dummy_id) {
       gtk_timeout_remove (dummy_id);
       dummy_id = 0;
      }
      if (drop_items_id) {
       gtk_timeout_remove (drop_items_id);
       drop_items_id = 0;
      }
    }
  else
    {
      if(gamewon == TRUE) /* the game is won */
       {
         level_set_score();
         gletters_next_level();
       }

      if(!drop_items_id) {
       drop_items_id = gtk_timeout_add (1000,
                                    (GtkFunction) gletters_drop_items, NULL);
      }
      if(!dummy_id) {
       dummy_id = gtk_timeout_add (1000, (GtkFunction) gletters_move_items, NULL);
      }
    }
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void player_loose ( void  ) [static]

Definition at line 752 of file gletters.c.

{
  g_warning("entering player_loose\n");

  gc_sound_play_ogg ("sounds/crash.ogg", NULL);
  g_warning("leaving player_loose\n");
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void player_win ( GnomeCanvasItem *  item) [static]

Definition at line 708 of file gletters.c.

{
  g_message("in player_win\n");

  gletters_destroy_item(item);
  gc_sound_play_ogg ("sounds/gobble.ogg", NULL);

  gcomprisBoard->sublevel++;

  if(gcomprisBoard->sublevel > gcomprisBoard->number_of_sublevel)
    {
      /* Try the next level */
      gcomprisBoard->level++;
      if(gcomprisBoard->level>gcomprisBoard->maxlevel) { // the current board is finished : bail out
        gc_score_end();
       gc_bonus_end_display(BOARD_FINISHED_RANDOM);
       return;
      }

      gamewon = TRUE;
      gletters_destroy_all_items();
      gc_bonus_display(gamewon, BONUS_SMILEY);
    }
  else
    {
      gc_score_set(gcomprisBoard->sublevel);

      /* Drop a new item now to speed up the game */
      if(g_list_length(item_list)==0)
       {
         if (drop_items_id) {
           /* Remove pending new item creation to sync the falls */
           gtk_timeout_remove (drop_items_id);
           drop_items_id = 0;
         }
         if(!drop_items_id) {
           drop_items_id = gtk_timeout_add (0,
                                        (GtkFunction) gletters_drop_items, NULL);
         }
       }
    }
  g_warning("leaving player_win\n");
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void save_table ( gpointer  key,
gpointer  value,
gpointer  user_data 
) [static]

Definition at line 788 of file gletters.c.

{
  gc_db_set_board_conf ( profile_conf,
                         board_conf,
                         (gchar *) key,
                         (gchar *) value);
}

Here is the call graph for this function:

Here is the caller graph for this function:

static void set_level ( guint  level) [static]

Definition at line 353 of file gletters.c.

{

  if(gcomprisBoard!=NULL)
    {
      gcomprisBoard->level=level;
      level_set_score();
      gletters_next_level();
    }
}

Here is the call graph for this function:

static void start_board ( GcomprisBoard *  agcomprisBoard) [static]

Definition at line 290 of file gletters.c.

{
  GHashTable *config = gc_db_get_board_conf();

  gc_locale_set(g_hash_table_lookup( config, "locale"));

  gchar *up_init_str = g_hash_table_lookup( config, "uppercase_only");

  if (up_init_str && (strcmp(up_init_str, "True")==0))
    uppercase_only = TRUE;
  else
    uppercase_only = FALSE;

  gchar *control_sound = g_hash_table_lookup( config, "with_sound");

  if (control_sound && strcmp(g_hash_table_lookup( config, "with_sound"),"True")==0)
    with_sound = TRUE;
  else
    with_sound = FALSE;

  g_hash_table_destroy(config);

  if(agcomprisBoard!=NULL)
    {
      gcomprisBoard=agcomprisBoard;
      load_default_charset();
      gc_set_background(gnome_canvas_root(gcomprisBoard->canvas), "images/scenery_background.png");
      gcomprisBoard->maxlevel=maxLevel;
      gcomprisBoard->level = 1;
      level_set_score();
      gletters_next_level();
      gamewon = FALSE;
      pause_board(FALSE);
    }
}

Here is the call graph for this function:

gboolean unichar_comp ( gpointer  key,
gpointer  value,
gpointer  user_data 
)

Definition at line 370 of file gletters.c.

{
  gunichar *target = (gunichar *) user_data;
  if (*((gunichar *)key) == *target)
    return TRUE;

  return FALSE;
}

Here is the caller graph for this function:

int whitespace ( char *  buffer)

Definition at line 277 of file gletters.c.

                             {
  int i;
  i = 0;
  while(buffer[i] != '\0') {
    if(buffer[i] == ' ' || buffer[i] == '\t' || buffer[i++] == '\n')
      continue;
    else return FALSE;
  }
  return TRUE;
}

Variable Documentation

GcomprisBoard* board_conf [static]

Definition at line 786 of file gletters.c.

gint drop_items_id = 0 [static]

Definition at line 35 of file gletters.c.

float dropRateBase = DROP_RATE_BASE [static]

Definition at line 62 of file gletters.c.

float dropRateMult = DROP_RATE_MULT [static]

Definition at line 64 of file gletters.c.

gint dummy_id = 0 [static]

Definition at line 34 of file gletters.c.

float fallRateBase = FALL_RATE_BASE [static]

Definition at line 52 of file gletters.c.

float fallRateMult = FALL_RATE_MULT [static]

Definition at line 54 of file gletters.c.

guint32 fallSpeed = 0 [static]

Definition at line 123 of file gletters.c.

int gamewon [static]

Definition at line 125 of file gletters.c.

GcomprisBoard* gcomprisBoard = NULL [static]

Definition at line 32 of file gletters.c.

GList* item2del_list = NULL [static]

Definition at line 30 of file gletters.c.

GList* item_list = NULL [static]

Definition at line 29 of file gletters.c.

char** keyMap [static]

Definition at line 94 of file gletters.c.

int keyMapSize [static]

Definition at line 93 of file gletters.c.

char* letters_array[MAXLEVEL] [static]

Definition at line 80 of file gletters.c.

GHashTable* letters_table = NULL [static]

Definition at line 97 of file gletters.c.

int maxLevel [static]

Definition at line 79 of file gletters.c.

BoardPlugin menu_bp [static]
Initial value:
  {
    NULL,
    NULL,
    N_("Simple Letters"),
    N_("Type the falling letters before they reach the ground"),
    "Bruno Coudoin <bruno.coudoin@free.fr>",
    NULL,
    NULL,
    NULL,
    NULL,
    start_board,
    pause_board,
    end_board,
    is_our_board,
    key_press,
    NULL,
    set_level,
    NULL,
    NULL,
    gletter_config_start,
    gletter_config_stop
  }

Definition at line 130 of file gletters.c.

Definition at line 785 of file gletters.c.

double speed = 0.0 [static]

Definition at line 124 of file gletters.c.

gboolean uppercase_only [static]

Definition at line 217 of file gletters.c.

gboolean with_sound = FALSE [static]

Definition at line 127 of file gletters.c.