(c)Gildo
/***************************************************************************
                     begin                : 8 july 2002
                     copyright            : (C) 2002 by Mauro Meneghin 
                                                        (nick Gildo)
                     email                : mmeneghin@inwind.it
***************************************************************************/

/***************************************************************************
*                                                                          *
*   This program is free software; you can redistribute it and/or modify   *
*   it under the terms of the GNU General Public License as published by   *
*   the Free Software Foundation; either version 2 of the License, or      *
*   (at your option) any later version, that you can found at www.gnu.org, *
*   this program is intended only for educational purpouses, and I'm not   *
*    responsable of any negative effect that you can have using this       *
*    program.                                                              *
***************************************************************************/
                                                                           


hello I'm Gildo, this is a game dama to play in 2 on the net from console.

this game runs from console (not from X)
and displays images using the framebuffer ( /dev/fb0 )

to install you need:

a) root access, becouse often the framebuffer is only writable from root
   if it's so you can change the permission of /dev/fb0 with
   # chmod o+w /dev/fb0
   in every case, so now you can continue from a common user

b) libungif, that is a library to decode the gif file format,
   if you want you can create your png (with libpng) or jpg or bmp images and 
   use those, I give you png.c,jpg.c,bmp.c files too (part of fbv project that 
   is not mine) 
   

# ./configure
# make
# ./dama


this will start the dama as a server, and tell you on what port the game is 
listening:
# ./dama  

so, tell that port number to your friend and it will play with you with this 
command:
# ./dama IP_OF_THE_DAMA_SERVER PORT_OF_THE_DAMA_SERVER

the rules of the dama game are simple, a piece move up in diagonal of only one 
box and eat of two, else when you arrive at the top most box you have done a 
dama, and dama has a bigger power


instructions:
  move the cursor when is your turn with (perhaps you can use direction keys 
                                          too):
  h  (move left)
  j  (move down)
  k  (move hight)
  l  (move right)     (as in vi editor)
  space  (select/do the move)
  enter  (finish the move, so I can eat 2 pieces in one turn of mine (with 3 
          spaces) and at end enter)
  q  (quit)


*********
comments:

I thought to this game in a general way for some classes as:
  GScene (the theathre, graphical scene)
  GObject (base class for the objects)
  GStatic (done becouse I thought to the eventually of an animate object too, 
           if you want to do)
  GObjInstance (I have done this becouse if I have 10 objects that use the 
                same image I don't want to
                allocate memory for 10 equal images)
  
a lot of things aren't nice, I'm not much happy of for example the design of 
dama.C that I wrote in little time, but don't worry 

I wasn't be able to change the frame buffer resolution:  
 ioctl(fh, FBIOPUT_VSCREENINFO, var) in function setVarScreenInfo()
 tell me invalid argument
I wasn't be able to Refresh() the image when I switch to the right tty
 and only when I am on it,
 if I change tty and after I return to that I see black, and is needed to
 refresh the image pressing a key


I have used some code of an image viewer called fbv, it's very nice, and I'm 
happy to have found that nice program


bye from:
  Gildo  mmeneghin@inwind.it

if you are a woman with long legs I wait your email :)

