Platon Technologies
not logged in Login Registration
EnglishSlovak
open source software development celebrating 10 years of open source development! Friday, October 16, 2026

Diff for games/mines/mines.c between version 1.8 and 1.9

version 1.8, 2003/07/16 17:02:17 version 1.9, 2003/07/16 17:30:26
Line 1 
Line 1 
 /* $Platon: games/mines/mines.c,v 1.7 2003/07/16 16:59:12 nepto Exp $ */  /* $Platon: games/mines/mines.c,v 1.8 2003/07/16 17:02:17 nepto Exp $ */
   
   #define PSQUARE_DYNAMIC_ALLOCATION      (0)
   
 /* CONSTS */  /* CONSTS */
 #define EXENAME     "mines.exe"  #define EXENAME     "mines.exe"
Line 17 
Line 19 
 #define DIFFPOINT       (3)     /* !!! DIFFOFFSET+DIFFPOINT must equal 16 */  #define DIFFPOINT       (3)     /* !!! DIFFOFFSET+DIFFPOINT must equal 16 */
 #define DEFNX           (30)                                            /* default x size */  #define DEFNX           (30)                                            /* default x size */
 #define DEFNY           (25)                                            /* default y size */  #define DEFNY           (25)                                            /* default y size */
 #define MAXNX           ((getmaxx()+1)/MINBARSIZE)      /* MAXIMUM x size */  
 #define MAXNY           ((getmaxy()+1)/MINBARSIZE)      /* MAXIMUM y size */  
 #define INFOXSIZE       (textwidth(infostr3[0])+10)  #define INFOXSIZE       (textwidth(infostr3[0])+10)
 #define INFOYSIZE       (textheight(infostr3[0])*INFOLINES+(itabsize+1)*6)  #define INFOYSIZE       (textheight(infostr3[0])*INFOLINES+(itabsize+1)*6)
 #define INFOLINES       (14)  #define INFOLINES       (14)
 #define DEFITABSIZE     (0)  #define DEFITABSIZE     (0)
 #define FADESTEPS       (1)  #define FADESTEPS       (1)
   
   #if PSQUARE_DYNAMIC_ALLOCATION
   #  define MAXNX         ((getmaxx()+1)/MINBARSIZE)      /* MAXIMUM x size */
   #  define MAXNY         ((getmaxy()+1)/MINBARSIZE)      /* MAXIMUM y size */
   #else
   #  define MAXNX         (80)    /* MAXIMUM x size */
   #  define MAXNY         (60)    /* MAXIMUM y size */
   #endif
   
 #define I_BCKCOLOR      BLACK  #define I_BCKCOLOR      BLACK
 #define I_RCTCOLOR      LIGHTGRAY  #define I_RCTCOLOR      LIGHTGRAY
 #define I_TXTCOLOR      LIGHTGREEN  #define I_TXTCOLOR      LIGHTGREEN
Line 120  typedef struct stsquare
Line 128  typedef struct stsquare
 #if PLATON_SYSTEM_MSDOS  #if PLATON_SYSTEM_MSDOS
 extern unsigned _stklen = 65000U;  extern unsigned _stklen = 65000U;
 #endif  #endif
   #if PSQUARE_DYNAMIC_ALLOCATION
 STSQUARE *psquare;  STSQUARE *psquare;
   #else
   STSQUARE psquare[MAXNX * MAXNY];
   #endif
 /* All unneccessary question marks will be removed. */  /* All unneccessary question marks will be removed. */
 char infostr1[]="Super Mines v????????? - (c) 1999 Condy software inc.",  char infostr1[]="Super Mines v????????? - (c) 1999 Condy software inc.",
         infostr2[]="Ondrej Jomb¡k - Gymn zium Bil¡kova 24 - Okt va C - 1998/99",          infostr2[]="Ondrej Jomb¡k - Gymn zium Bil¡kova 24 - Okt va C - 1998/99",
Line 245  int main(int argc,char*argv[])
Line 257  int main(int argc,char*argv[])
                                         SetData();                                          SetData();
                                         SetMines();                                          SetMines();
                                 } while (DoAll());                                  } while (DoAll());
                                 free(psquare);psquare=NULL;  #if PSQUARE_DYNAMIC_ALLOCATION
                                 free(infosafe);infosafe=NULL;                                  free(psquare);
                                   psquare = NULL;
   #endif
                                   free(infosafe);
                                   infosafe = NULL;
                                 break;                                  break;
                         case 2:                          case 2:
                                 HscTable();                                  HscTable();
Line 502  void SetData(void) /* {{{ */
Line 518  void SetData(void) /* {{{ */
                 if ((barsize*nx<=getmaxx()+1)&&(barsize*ny<=getmaxy()+1))                  if ((barsize*nx<=getmaxx()+1)&&(barsize*ny<=getmaxy()+1))
                         break;                          break;
   
   #if PSQUARE_DYNAMIC_ALLOCATION
         if ((psquare=(STSQUARE *)calloc(nx*ny,sizeof(STSQUARE))) == NULL) {          if ((psquare=(STSQUARE *)calloc(nx*ny,sizeof(STSQUARE))) == NULL) {
                 my_graph_close();                  my_graph_close();
                 puts(ERR_MEMORY);                  puts(ERR_MEMORY);
                 exit(1);                  exit(1);
         }          }
   #endif
 } /* }}} */  } /* }}} */
   
 /*----------------------------------------------------------------------*/  /*----------------------------------------------------------------------*/

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

Platon Group <platon@platon.org> http://platon.org/
Copyright © 2002-2006 Platon Group
Site powered by Metafox CMS
Go to Top