#!/usr/bin/env python # -*- coding: utf8 -*- #*********************************************************************** # pysycache : a tool for learn to use the mouse # Copyright (C) 2005-2006 Vincent DEROO (vincent.pysycache@free.fr) # # This tool is free software; you can redistribute it and/or # modify it under the terms of the GNU Library General Public # License as published by the Free Software Foundation; either # version 2 of the License, or (at your option) any later version. # # This library is distributed in the hope that it will be useful, # but WITHOUT ANY WARRANTY; without even the implied warranty of # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # Library General Public License for more details. # # You should have received a copy of the GNU Library General Public # License along with this library; if not, write to the Free # Software Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA. #*********************************************************************** #******************************************************************************* # Importation des modules #******************************************************************************* import sys import getopt, string import random, os #marge de la zone de jeu MARGELEFT = 9 MARGETOP = 9 GRepPysycache = "" #le repertoire de l'application GBtnMenu = 999 #numero du bouton du menu GIdxThemes = 0 #numero du theme utilise GIdxImage = 0 #numero de l'image dans le theme GTabPhotos = [] #tableau d'information sur les photos GNbPhotos = 999 #nombre de photos a decouvrir GTabButtons = [] #tableau d'information sur les boutons GNbButtons = 999 #nombre d'elements a ranger GTabCarreau = [] #tableau d'information sur les carreaux GTailleLarg = 10 #largeur d'un carreau GTailleHaut = 10 #hauteur d'un carreau GTailleCarreau = 0 #indicateur de taille des carreaux (0 : grand, 1 moyen, 2 petit) GNbCarreau = 999 #nombre de carreau (largeur x longueur) GTypeSouris = 3 #0 : on joue en bougeant la souris #activite move #1 : on a gagne #2 : on joue en bougeant la souris MAIS on est en train # de dessiner les cache #3 : on ne traite pas les evt (pas dessin) #activite click : #1 : on est proche d'une photo #2 : on a clique pour voir la photo GWithSound = 0 #1 : with sounds, 0 without sound GWithFullScreen = 1 #1 : with fullscreen 0 in window GWithCredits = 1 #1 : show credits 0 hide credits GWithHelp = 1 #1 : show the sounds of help GModeJeu = 0 #0 : normal #1 : fantome #2 : chrono GPosDepX = 720 #position X (en partant de la gauche) GPosDepY = 250 #position Y (en partant du haut) GSpeed = 3 #vitesse pour l'activite boutons tpsdebut = 0 #temps de depart de l'affichage GMyLocale = "en_EN"