root/modules/games/gui_4wins.c

/* [<][>][^][v][top][bottom][index][help] */

DEFINITIONS

This source file includes following definitions.
  1. isFull
  2. set_stone
  3. unset_stone
  4. ki_isBadColumn
  5. ki_3
  6. ki_2
  7. ki_findColumn
  8. draw_txt_message
  9. change_player
  10. win_query
  11. win
  12. draw_mode
  13. change_mode
  14. set
  15. move_cursor
  16. gui_4wins_init
  17. basic_module_init
  18. gui_4wins_kbd_process
  19. gui_4wins_draw

   1 //Conect4: Kettmeister, CHDKLover german forum (forum.chdk-treff.de)
   2 #include "camera_info.h"
   3 #include "stdlib.h"
   4 #include "keyboard.h"
   5 #include "lang.h"
   6 #include "conf.h"
   7 #include "gui.h"
   8 #include "gui_osd.h"
   9 #include "gui_draw.h"
  10 #include "gui_lang.h"
  11 #include "gui_batt.h"
  12 #include "gui_mbox.h"
  13 #include "modes.h"
  14 
  15 #include "module_def.h"
  16 
  17 void gui_game_menu_kbd_process();
  18 int gui_4wins_kbd_process();
  19 void gui_4wins_draw();
  20 
  21 gui_handler GUI_MODE_4WINS = 
  22     /*GUI_MODE_4WINS*/  { GUI_MODE_MODULE, gui_4wins_draw, gui_4wins_kbd_process, gui_game_menu_kbd_process, 0, GUI_MODE_FLAG_NODRAWRESTORE };
  23 
  24 #define BORDER           20
  25 #define XBORDER          (camera_screen.disp_left+BORDER)
  26 #define RECT_SIZE        30
  27 #define BORDER_TOP       RECT_SIZE
  28 #define FIELD_HEIGHT 7
  29 #define FIELD_WIDTH      7
  30 #define P1_COLOR         COLOR_BLUE
  31 #define P2_COLOR         COLOR_GREEN
  32 #define BK_COLOR         COLOR_GREY
  33 #define FIELD_COLOR      MAKE_COLOR(COLOR_GREY_LT,COLOR_GREY_LT)//(füllfarbe,rand)
  34 #define TEXT_COLOR   MAKE_COLOR(COLOR_GREY, COLOR_WHITE)
  35 #define INFO_COLOR   COLOR_GREY_LT
  36 #define INFO_TEXT_COLOR   MAKE_COLOR(INFO_COLOR, COLOR_WHITE)
  37 
  38 char cursor_position,cur_player=1;
  39 char field[FIELD_HEIGHT][FIELD_WIDTH];
  40 char finished=0;
  41 char badColumns[7];
  42 char in_game=0;
  43 char mode_rival=0; //1=person 0=cam
  44 char count_win[2]={0,0};
  45 
  46 //-------------------------------------------------------------------
  47 static char isFull(int column)
  48 {
  49         if(field[column-1][6]) 
  50                 return 1; 
  51         else 
  52                 return 0;
  53 }
  54 
  55 static char set_stone(int column, char player, char visible)
  56 {
  57         int i;
  58     in_game=1;
  59         if(!isFull(column))
  60         {
  61                 for(i=1;field[column-1][i];i++);                        //1 ist wichtig (0=Fundament)
  62                 if (visible) {
  63                         draw_ellipse((XBORDER+((column-1)*RECT_SIZE))+15, (BORDER+((6-i)*RECT_SIZE))+15+BORDER_TOP, 10,10, (cur_player==1)?P1_COLOR:P2_COLOR, DRAW_FILLED);
  64                 }
  65                 field[column-1][i]=player;
  66                 return 1;
  67         } 
  68         else return 0;
  69 }
  70 /*====================      KI   ===========================*/
  71 static void unset_stone(int column)
  72 {
  73   int i;
  74   for(i=1;(i<=6)&&field[column-1][i];i++);                      //1 ist wichtig (0=Fundament)
  75   field[column-1][i-1]=0;
  76 }
  77 
  78 char ki_isBadColumn(int column){
  79   if(badColumns[column-1]) return column; else return 0;
  80 }
  81 
  82 char ki_3(char player) {
  83   int i,j;
  84   //waagerecht und Diagonal (über Anstieg)
  85   for(i=0;i<=3;i++){            // column
  86     for(j=1;j<=6;j++){          //row 
  87       if(field[i][j]==player&&field[i+1][j]==player&&field[i+2][j]==player&&field[i+3][j]==0&&field[i+3][j-1]) return i+4;      //***-
  88       if(field[i][j]==player&&field[i+1][j]==player&&field[i+2][j]==0&&field[i+3][j]==player&&field[i+2][j-1]) return i+3;      //**-*
  89       if(field[i][j]==player&&field[i+1][j]==0&&field[i+2][j]==player&&field[i+3][j]==player&&field[i+1][j-1]) return i+2;      //*-**
  90       if(field[i][j]==0&&field[i+1][j]==player&&field[i+2][j]==player&&field[i+3][j]==player&&field[i][j-1]) return i+1;        //-***
  91     }
  92     for(j=1;j<=3;j++){
  93       if(field[i][j]==player&&field[i+1][j+1]==player&&field[i+2][j+2]==player&&field[i+3][j+3]==0&&field[i+3][j+3-1]) return i+4;      //***-
  94       if(field[i][j]==player&&field[i+1][j+1]==player&&field[i+2][j+2]==0&&field[i+3][j+3]==player&&field[i+2][j+2-1]) return i+3;      //**-*
  95       if(field[i][j]==player&&field[i+1][j+1]==0&&field[i+2][j+2]==player&&field[i+3][j+3]==player&&field[i+1][j+1-1]) return i+2;      //*-**
  96       if(field[i][j]==0&&field[i+1][j+1]==player&&field[i+2][j+2]==player&&field[i+3][j+3]==player&&field[i][j-1]) return i+1;          //-***
  97     }
  98     for(j=4;j<=6;j++){
  99         if(field[i][j]==player&&field[i+1][j-1]==player&&field[i+2][j-2]==player&&field[i+3][j-3]==0&&field[i+3][j-3-1]) return i+4;    //***-
 100         if(field[i][j]==player&&field[i+1][j-1]==player&&field[i+2][j-2]==0&&field[i+3][j-3]==player&&field[i+2][j-2-1]) return i+3;    //**-*
 101         if(field[i][j]==player&&field[i+1][j-1]==0&&field[i+2][j-2]==player&&field[i+3][j-3]==player&&field[i+1][j-1-1]) return i+2;    //*-**
 102         if(field[i][j]==0&&field[i+1][j-1]==player&&field[i+2][j-2]==player&&field[i+3][j-3]==player&&field[i][j-1]) return i+1;                //-***
 103     }
 104   }
 105   //Unterreihentrick in allen ebenen
 106   for(i=0;i<=2;i++){
 107     for(j=1;j<=6;j++) if(field[i][j]==0&&field[i+1][j]==player&&field[i+2][j]==0&&field[i+3][j]==player&&field[i+4][j]==0&&field[i][j-1]&&field[i+2][j-1]&&field[i+4][j-1]) return i+3; //_*_*_
 108     for(j=1;j<=3;j++) if(field[i][j]==0&&field[i+1][j+1]==player&&field[i+2][j+2]==0&&field[i+3][j+3]==player&&field[i+4][j+4]==0&&field[i][j-1]&&field[i+2][j+2-1]&&field[i+4][j+4-1]) return i+3;     //_*_*_
 109     for(j=4;j<=6;j++) if(field[i][j]==0&&field[i+1][j-1]==player&&field[i+2][j-2]==0&&field[i+3][j-3]==player&&field[i+4][j-4]==0&&field[i][j-1]&&field[i+2][j-2-1]&&field[i+4][j-4-1]) return i+3;     //_*_*_
 110   }
 111   //senkrecht
 112   for(i=0;i<=6;i++) for(j=1;j<=3;j++) if(field[i][j]==player&&field[i][j+1]==player&&field[i][j+2]==player&&field[i][j+3]==0) return i+1;
 113   return 0;
 114 }
 115 
 116 char ki_2(char player) {
 117   int i,j;
 118   //waagerecht und Diagonal über Anstieg
 119   for(i=0;i<=3;i++){            //column
 120     for(j=1;j<=6;j++){          //row 
 121       if(field[i][j]==player&&field[i+1][j]==player&&field[i+2][j]==0&&field[i+3][j]==0&&(field[i+2][j-1]||field[i+3][j-1])&&!ki_isBadColumn(i+3)) return i+3;  //**-- return und if ändern
 122       if(field[i][j]==player&&field[i+1][j]==0&&field[i+2][j]==0&&field[i+3][j]==player&&(field[i+1][j-1]||field[i+2][j-1])&&!ki_isBadColumn(i+2)) return i+2;  //*--* (i+3 geht auch)
 123       if(field[i][j]==0&&field[i+1][j]==0&&field[i+2][j]==player&&field[i+3][j]==player&&(field[i][j-1]||field[i+1][j-1])&&!ki_isBadColumn(i+2)) return i+2;    //--**
 124       if(field[i][j]==0&&field[i+1][j]==player&&field[i+2][j]==0&&field[i+3][j]==player&&(field[i][j-1]||field[i+2][j-1])&&!ki_isBadColumn(i+3)) return i+3;    //-*-*
 125       if(field[i][j]==player&&field[i+1][j]==0&&field[i+2][j]==player&&field[i+3][j]==0&&(field[i+1][j-1]||field[i+3][j-1])&&!ki_isBadColumn(i+2)) return i+2;  //*-*-
 126     }
 127     for(j=1;j<=3;j++){
 128       if(field[i][j]==player&&field[i+1][j+1]==player&&field[i+2][j+2]==0&&field[i+3][j+3]==0&&field[i+2][j+2-1]&&!ki_isBadColumn(i+3)) return i+3;     //**-- return und if ändern
 129       if(field[i][j]==player&&field[i+1][j+1]==player&&field[i+2][j+2]==0&&field[i+3][j+3]==0&&field[i+3][j+3-1]&&!ki_isBadColumn(i+3)) return i+4;     //**-- return und if ändern
 130       if(field[i][j]==player&&field[i+1][j+1]==0&&field[i+2][j+2]==0&&field[i+3][j+3]==player&&(field[i+1][j+1-1]||field[i+2][j+2-1])&&!ki_isBadColumn(i+2)) return i+2;        //*--* (i+3 geht auch)
 131       if(field[i][j]==0&&field[i+1][j+1]==0&&field[i+2][j+2]==player&&field[i+3][j+3]==player&&(field[i][j-1]||field[i+1][j+1-1])&&!ki_isBadColumn(i+2)) return i+2;    //--**
 132       if(field[i][j]==0&&field[i+1][j+1]==player&&field[i+2][j+2]==0&&field[i+3][j+3]==player&&(field[i][j-1]||field[i+2][j+2-1])&&!ki_isBadColumn(i+3)) return i+3;    //-*-*
 133       if(field[i][j]==player&&field[i+1][j+1]==0&&field[i+2][j+2]==player&&field[i+3][j+3]==0&&(field[i+1][j+1-1]||field[i+3][j+3-1])&&!ki_isBadColumn(i+2)) return i+2;        //*-*-
 134     }
 135     for(j=4;j<=6;j++){
 136       if(field[i][j]==player&&field[i+1][j-1]==player&&field[i+2][j-2]==0&&field[i+3][j-3]==0&&field[i+2][j-2-1]&&!ki_isBadColumn(i+3)) return i+3;     //**-- return und if ändern
 137       if(field[i][j]==player&&field[i+1][j-1]==player&&field[i+2][j-2]==0&&field[i+3][j-3]==0&&field[i+3][j-3-1]&&!ki_isBadColumn(i+3)) return i+4;     //**-- return und if ändern
 138       if(field[i][j]==player&&field[i+1][j-1]==0&&field[i+2][j-2]==0&&field[i+3][j-3]==player&&(field[i+1][j-1-1]||field[i+2][j-2-1])&&!ki_isBadColumn(i+2)) return i+2;        //*--* (i+3 geht auch)
 139       if(field[i][j]==0&&field[i+1][j-1]==0&&field[i+2][j-2]==player&&field[i+3][j-3]==player&&(field[i][j-1]||field[i+1][j-1-1])&&!ki_isBadColumn(i+2)) return i+2;    //--**
 140       if(field[i][j]==0&&field[i+1][j-1]==player&&field[i+2][j-2]==0&&field[i+3][j-3]==player&&(field[i][j-1]||field[i+2][j-2-1])&&!ki_isBadColumn(i+3)) return i+3;    //-*-*
 141       if(field[i][j]==player&&field[i+1][j-1]==0&&field[i+2][j-2]==player&&field[i+3][j-3]==0&&(field[i+1][j-1-1]||field[i+3][j-3-1])&&!ki_isBadColumn(i+2)) return i+2;        //*-*-
 142     }
 143   }
 144   //senkrecht
 145   for(i=0;i<=6;i++) for(j=1;j<=3;j++) if(field[i][j]==player&&field[i][j+1]==player&&field[i][j+2]==0&&!ki_isBadColumn(i+1)) return i+1;
 146   return 0;
 147 }
 148 
 149 char ki_findColumn(char mode, char player) {                                                    //player = 1|2
 150   char erg=0, cam=player, otherplayer, i, counter=0;
 151   otherplayer=(player==1)?2:1;
 152   switch(mode) {
 153   case 'b':
 154   case 1: erg=ki_3(cam);                                                                                                //ich3
 155           if(!erg&&mode!='b') erg=ki_3(otherplayer); else break;                //du3
 156           if(!erg) {                                                                                                    //ungünstige Spalten ermitteln
 157             for(i=1;i<=7;i++) {
 158               if(!isFull(i)) {
 159                 set_stone(i,9,0);                                                                               //Stein setzen 9=irgendwas
 160                 badColumns[i-1]=ki_findColumn('b',otherplayer);                 //ungünstige Spalten ermitteln b=bad
 161                 if(!badColumns[i-1]) badColumns[i-1]=ki_findColumn('b',cam);
 162                 unset_stone(i);
 163               } else badColumns[i-1]=9;                                                         //9=full
 164             }
 165           } else break;
 166           erg=ki_2(cam);                                                                                                //ich2 (für passivere Methode vertauschen)
 167           if(!erg) erg=ki_2(otherplayer); else break;                                   //du2
 168           if(!erg) erg=(!isFull(4)&&!ki_isBadColumn(4))?4:0; else break;//mitte
 169           if(!erg) do erg=(rand()%7)+1; while((isFull(erg)||erg==0||ki_isBadColumn(erg))&&counter++<100);       //zufall
 170           if(counter>100) for(i=1;i<=7;i++) if(!isFull(i)) erg=i;
 171           break;
 172   }
 173   return erg;
 174 }
 175 /*======================= K I   END ===============================*/
 176 void draw_txt_message(char* text) {
 177     coord w, x, y;
 178     twoColors cl = MAKE_COLOR(COLOR_RED, COLOR_WHITE);
 179     w = (strlen(text) + 2) * FONT_WIDTH;
 180 
 181     x = (camera_screen.width-w)>>1;
 182     y = ((camera_screen.height)>>1);
 183     draw_rectangle(x, y, x+w, y+FONT_HEIGHT+8, cl, RECT_BORDER2|DRAW_FILLED|RECT_ROUND_CORNERS);
 184     draw_string_justified(x, y+4, text, cl, 0, w, TEXT_CENTER);
 185 }
 186 //-------------------------------------------------------------------
 187 static void change_player()
 188 {
 189         if (cur_player==1) cur_player=2; else cur_player=1;
 190         draw_ellipse((XBORDER+((cursor_position)*RECT_SIZE))+15, BORDER+10, 10,10, (cur_player==1)?P1_COLOR:P2_COLOR, DRAW_FILLED);
 191 }
 192 //-------------------------------------------------------------------
 193 static char win_query()
 194 {
 195         int i=0,j=0;
 196 
 197         for(i=0;i<4;i++)
 198         {
 199                 for(j=1;j<4;j++)
 200                 {
 201                         // '1'
 202                         if(field[i][j]==1 && field[i+1][j+1]==1 && field[i+2][j+2]==1 && field[i+3][j+3]==1) return 1; // diagonal  >  
 203                         if(field[i][j+3]==1 && field[i+1][j+2]==1 && field[i+2][j+1]==1 && field[i+3][j]==1) return 1; // diagonal  >  /
 204                         // '2'
 205                         if(field[i][j]==2 && field[i+1][j+1]==2 && field[i+2][j+2]==2 && field[i+3][j+3]==2) return 1;// diagonal  >  
 206                         if(field[i][j+3]==2 && field[i+1][j+2]==2 && field[i+2][j+1]==2 && field[i+3][j]==2) return 1;// diagonal  >  /
 207                 }
 208         }
 209         
 210         for(i=0;i<7;i++)
 211         {
 212                 for(j=1;j<4;j++)
 213                 {
 214                         if(field[i][j]==2 && field[i][j+1]==2 && field[i][j+2]==2 && field[i][j+3]==2) return 1; // vertical  >  |
 215                         if(field[i][j]==1 && field[i][j+1]==1 && field[i][j+2]==1 && field[i][j+3]==1) return 1; // vertical  >  |
 216                 }
 217         }
 218         
 219         for(i=0;i<4;i++)
 220         {
 221                 for(j=1;j<7;j++)
 222                 {
 223                         if(field[i][j]==2 && field[i+1][j]==2 && field[i+2][j]==2 && field[i+3][j]==2) return 1; // horizontal  >  -
 224                         if(field[i][j]==1 && field[i+1][j]==1 && field[i+2][j]==1 && field[i+3][j]==1) return 1;        // horizontal  >  -
 225                 }
 226         }
 227 
 228         if (isFull(1) && isFull(2) && isFull(3) && isFull(4) && isFull(5) && isFull(6) && isFull(7)) return 9;
 229         
 230         return 0;
 231 }
 232 //-------------------------------------------------------------------
 233 void win() {
 234   if(win_query()==1){
 235     finished=1;
 236     count_win[cur_player-1]++;
 237     draw_txt_message(lang_str((cur_player==1)?LANG_CONNECT4_P1_WIN:(mode_rival)?LANG_CONNECT4_P2_WIN:LANG_CONNECT4_CAM_WIN));
 238   }     else if (win_query()==9) {
 239     finished=1;
 240     draw_txt_message(lang_str(LANG_CONNECT4_DRAW));
 241   }
 242   change_player();
 243 }
 244 //-------------------------------------------------------------------
 245 void draw_mode()
 246 {
 247     int x = camera_screen.disp_left + 30*FONT_WIDTH;
 248     draw_string_justified(x, 4*FONT_HEIGHT, (mode_rival==1) ? lang_str(LANG_CONNECT4_HUMAN) : "cam", TEXT_COLOR, 0, 12*FONT_WIDTH, TEXT_LEFT|TEXT_FILL);
 249 }
 250 //-------------------------------------------------------------------
 251 void change_mode()
 252 {
 253         cur_player=1;
 254         count_win[0]=count_win[1]=0;
 255         if(mode_rival==1)
 256                 mode_rival=0;   //CAM
 257         else
 258                 mode_rival=1;   //HUMAN
 259         draw_mode();
 260 }
 261 //-------------------------------------------------------------------
 262 void set()
 263 {
 264         if(finished==0)
 265         {
 266                 if(cursor_position==7 && in_game==0)    
 267                 {
 268                         change_mode();
 269                 }
 270                 else
 271                 {
 272                         if(cur_player==1 || (cur_player==2 && mode_rival==1)) if(set_stone(cursor_position+1,cur_player,1)) win();
 273                         if((mode_rival==0 && cur_player==2) && !finished) if(set_stone(ki_findColumn(1, cur_player),cur_player, 1)) win();
 274                 }
 275         }
 276 }
 277 //-------------------------------------------------------------------
 278 static void move_cursor(int in_x_pos)
 279 {
 280         draw_ellipse((XBORDER+((cursor_position)*RECT_SIZE))+15, BORDER+10, 10,10,BK_COLOR, DRAW_FILLED);
 281         if(in_game)
 282         {
 283                 if(cursor_position==0 && in_x_pos<0) 
 284                         cursor_position=7+in_x_pos; 
 285                 else 
 286                         cursor_position=(cursor_position+in_x_pos)%7;
 287         }
 288         else
 289         {
 290                 if(cursor_position==0 && in_x_pos<0) 
 291                         cursor_position=8+in_x_pos; 
 292                 else 
 293                         cursor_position=(cursor_position+in_x_pos)%8;
 294         }
 295         draw_ellipse((XBORDER+((cursor_position)*RECT_SIZE))+15, BORDER+10, 10,10, (cur_player==1)?P1_COLOR:P2_COLOR, DRAW_FILLED);
 296 }
 297 //-------------------------------------------------------------------
 298 int gui_4wins_init() 
 299 {
 300         static char str[16];
 301         int i=0,j=0;
 302 
 303         cursor_position=3;
 304         finished=in_game=0;
 305         srand(time(NULL));
 306         
 307         draw_rectangle(camera_screen.disp_left, 0, camera_screen.disp_right, camera_screen.height-1, MAKE_COLOR(BK_COLOR,BK_COLOR), RECT_BORDER0|DRAW_FILLED);          // draw backgraund
 308         draw_rectangle(XBORDER, BORDER+BORDER_TOP, XBORDER+(7*RECT_SIZE), BORDER+(6*RECT_SIZE)+BORDER_TOP, FIELD_COLOR, RECT_BORDER0|DRAW_FILLED);
 309         draw_rectangle(camera_screen.disp_left+240, 90, camera_screen.disp_left+360-BORDER, 240-10, MAKE_COLOR(INFO_COLOR,INFO_COLOR), RECT_BORDER0|DRAW_FILLED|RECT_ROUND_CORNERS);
 310     draw_string(camera_screen.disp_left+12*FONT_WIDTH, 0, lang_str(LANG_MENU_GAMES_CONNECT4), TEXT_COLOR);
 311     draw_line(camera_screen.disp_left,15,camera_screen.disp_left+360,15,COLOR_GREY_LT);
 312 
 313         for(i=0;i<7;i++)
 314         {
 315                 for(j=0;j<6;j++)
 316                 {
 317                         field[i][j+1]=0;
 318                         draw_ellipse(XBORDER+(i*RECT_SIZE)+(RECT_SIZE/2), BORDER+(j*RECT_SIZE)+(RECT_SIZE/2)+BORDER_TOP, 10, 10, BK_COLOR, DRAW_FILLED);
 319                 }
 320         }
 321         for(i=0;i<7;i++)
 322         {
 323                 field[i][0]=9;
 324         }
 325 
 326         move_cursor(0);
 327         draw_string(camera_screen.disp_left+30*FONT_WIDTH, 3*FONT_HEIGHT, lang_str(LANG_CONNECT4_RIVAL), TEXT_COLOR);
 328     sprintf(str, "%d",count_win[0]);
 329         draw_string(camera_screen.disp_left+34*FONT_WIDTH, camera_screen.height-9*FONT_HEIGHT, str, MAKE_COLOR(INFO_COLOR, P1_COLOR));
 330     sprintf(str, ":");
 331         draw_string(camera_screen.disp_left+36*FONT_WIDTH, camera_screen.height-9*FONT_HEIGHT, str, INFO_TEXT_COLOR);
 332     sprintf(str, "%d",count_win[1]);
 333         draw_string(camera_screen.disp_left+38*FONT_WIDTH, camera_screen.height-9*FONT_HEIGHT, str, MAKE_COLOR(INFO_COLOR, P2_COLOR));
 334         draw_mode();
 335         if(cur_player==2&&!mode_rival) set();
 336 
 337     gui_set_mode(&GUI_MODE_4WINS);
 338 
 339         return 1;
 340 }
 341 
 342 int basic_module_init() {
 343   return gui_4wins_init();
 344 }
 345 
 346 //-------------------------------------------------------------------
 347 int gui_4wins_kbd_process() 
 348 {
 349         switch (kbd_get_autoclicked_key()) 
 350         {
 351                 case KEY_SET:
 352                     if(!finished) set(); else gui_4wins_init();
 353                         break;
 354                 case KEY_LEFT:
 355                         if(finished==0)
 356                                 move_cursor(-1);
 357                         break;
 358                 case KEY_RIGHT:
 359                         if(finished==0)
 360                                 move_cursor(1);
 361                         break;
 362         }
 363     return 0;
 364 }
 365 //-------------------------------------------------------------------
 366 void gui_4wins_draw() {
 367   static char str[16];
 368   sprintf(str, "Batt: %3d%%", get_batt_perc());
 369   draw_string(camera_screen.disp_left+31*FONT_WIDTH, camera_screen.height-2*FONT_HEIGHT, str, INFO_TEXT_COLOR);
 370   gui_osd_draw_clock(camera_screen.disp_left+34*FONT_WIDTH,camera_screen.height-3*FONT_HEIGHT,INFO_TEXT_COLOR,1);
 371 }
 372 
 373 #include "simple_game.c"
 374 
 375 /******************** Module Information structure ******************/
 376 
 377 ModuleInfo _module_info =
 378 {
 379     MODULEINFO_V1_MAGICNUM,
 380     sizeof(ModuleInfo),
 381     SIMPLE_MODULE_VERSION,              // Module version
 382 
 383     ANY_CHDK_BRANCH, 0, OPT_ARCHITECTURE,                       // Requirements of CHDK version
 384     ANY_PLATFORM_ALLOWED,               // Specify platform dependency
 385 
 386     -LANG_MENU_GAMES_CONNECT4,  // Module name
 387     MTYPE_GAME,
 388 
 389     &_librun.base,
 390 
 391     ANY_VERSION,                // CONF version
 392     CAM_SCREEN_VERSION,         // CAM SCREEN version
 393     ANY_VERSION,                // CAM SENSOR version
 394     ANY_VERSION,                // CAM INFO version
 395 };

/* [<][>][^][v][top][bottom][index][help] */