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.4 and 1.5

version 1.4, 2003/06/22 18:40:34 version 1.5, 2003/06/27 02:18:31
Line 1 
Line 1 
 /* $Platon: games/mines/mines.c,v 1.3 2003/05/21 13:58:30 nepto Exp $ */  /* $Platon: games/mines/mines.c,v 1.4 2003/06/22 18:40:34 nepto Exp $ */
   
 /* CONSTS */  /* CONSTS */
 #define EXENAME     "mines.exe"  #define EXENAME     "mines.exe"
Line 43 
Line 43 
                 ||isininfo(xoff-1+(x+1)*barsize,yoff-1+(y+1)*barsize)||isininfo(xoff+x*barsize,yoff-1+(y+1)*barsize))                  ||isininfo(xoff-1+(x+1)*barsize,yoff-1+(y+1)*barsize)||isininfo(xoff+x*barsize,yoff-1+(y+1)*barsize))
 #define HideInfo()      WriteInfo(0xffff,0xffff)  #define HideInfo()      WriteInfo(0xffff,0xffff)
 #define ShowInfo()      WriteInfo(infox,infoy)  #define ShowInfo()      WriteInfo(infox,infoy)
 #define FadeIn()        fade_in(FADESTEPS)  #if PLATON_SYSTEM_WIN32
 #define FadeOut()       fade_out(FADESTEPS)  #  define FadeIn()              (void)kbhit()
   #  define FadeOut()             (void)kbhit()
   #else
   #  define FadeIn()      fade_in(FADESTEPS)
   #  define FadeOut()     fade_out(FADESTEPS)
   #endif
   
 #define YES 1  #define YES 1
 #define NO  0  #define NO  0
Line 65 
Line 70 
 #  include <dos2linux.h>  #  include <dos2linux.h>
 #endif  #endif
   
 #if PLATON_SYSTEM_MSDOS  #if PLATON_SYSTEM_MSDOS || PLATON_SYSTEM_WIN32
 #  include <conio.h>  #  include <conio.h>
 #  include <dos.h>  #  include <dos.h>
   #endif
   
   #if PLATON_SYSTEM_WIN32
   #  include <dos2win32.h>
   #  include <winbgim.h>
   #endif
   
   #if PLATON_SYSTEM_MSDOS
 #  include <alloc.h>  #  include <alloc.h>
 #endif  #endif
   
Line 80 
Line 93 
 /* #include "data.h" FOR MINES IMAGE */  /* #include "data.h" FOR MINES IMAGE */
 #include "hiscore.h"  #include "hiscore.h"
   
 #if PLATON_SYSTEM_MSDOS  #if PLATON_SYSTEM_MSDOS || PLATON_SYSTEM_WIN32
 #  define RAND_INT(__lo, __hi)  (__lo + random(__hi - __lo + 1))  #  define RAND_INT(__lo, __hi)  (__lo + random(__hi - __lo + 1))
 #endif  #endif
   
Line 212  int main(int argc,char*argv[])
Line 225  int main(int argc,char*argv[])
         }          }
 #if PLATON_SYSTEM_MSDOS  #if PLATON_SYSTEM_MSDOS
         hiscore_init(argv[0], HISCORE_AUTODETECT);          hiscore_init(argv[0], HISCORE_AUTODETECT);
 #endif  #elif PLATON_SYSTEM_WIN32
 #if PLATON_SYSTEM_SVGALIB          hiscore_init("c:\\windows\\mines.hsc", 0L);
   #elif PLATON_SYSTEM_SVGALIB
         hiscore_init("/var/lib/games/mines/hiscore.dat", 0L);          hiscore_init("/var/lib/games/mines/hiscore.dat", 0L);
   #else
   #  error hiscore not initialized
 #endif  #endif
         if (GraphInit() < 0)          if (GraphInit() < 0)
                 return 1;                  return 1;
Line 366  BYTE MainMenu(void) /* {{{ */
Line 382  BYTE MainMenu(void) /* {{{ */
                                 DrawNormButton(450,296,"","OK",RED,WHITE,WHITE);                                  DrawNormButton(450,296,"","OK",RED,WHITE,WHITE);
                                 showmouse();                                  showmouse();
                                 while (!(but=releasebutton(0,&x,&y))||!isinnormbutton(x,y,450,296)) {                                  while (!(but=releasebutton(0,&x,&y))||!isinnormbutton(x,y,450,296)) {
                                           if (kbhit()) /* catching characters */
                                                   getch(); /* in keyboard buffer  */
                                         if (but) {                                          if (but) {
                                                 if (isinnormbutton(x,y,450,254) != 0) { /* Reset */                                                  if (isinnormbutton(x,y,450,254) != 0) { /* Reset */
                                                         hidemouse();                                                          hidemouse();
Line 776  BYTE DoAll(void) /* {{{ */
Line 794  BYTE DoAll(void) /* {{{ */
                 }                  }
                 if (but&&isininfo(x,y)) {                  if (but&&isininfo(x,y)) {
                         WORD xx,yy;                          WORD xx,yy;
                         while (!releasebutton(but-1,&xx,&yy));                          while (!releasebutton(but-1,&xx,&yy))
                                   if (kbhit()) /* catching characters */
                                           getch(); /* in keyboard buffer  */
                         hidemouse();                          hidemouse();
                         if (xx!=x||yy!=y)                          if (xx!=x||yy!=y)
                                 WriteInfo(xx-(x-infox),yy-(y-infoy));                                  WriteInfo(xx-(x-infox),yy-(y-infoy));

Legend:
Removed from v.1.4  
changed lines
  Added in v.1.5

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