static int suppressClocks = 0;\r
static int suppressOneKey = 0;\r
static HANDLE hAccelJAWS;\r
+extern int jawsClock;\r
\r
typedef struct { char *name; int code; } MenuItemDesc;\r
\r
Xpos--;\r
}\r
SayString("empty", FALSE);\r
+\r
}\r
}\r
}\r
}\r
\r
VOID\r
-SayClockTime()\r
+SayClockTime(int warning)\r
{\r
char buf1[50], buf2[50];\r
char *str1, *str2;\r
static long int lastWhiteTime, lastBlackTime;\r
\r
- suppressClocks = 1; // if user is using alt+T command, no reason to display them\r
+ if(!warning) {\r
+ suppressClocks = jawsClock = 1; // if user is using alt+T command, no reason to display them\r
if(abs(lastWhiteTime - whiteTimeRemaining) < 1000 && abs(lastBlackTime - blackTimeRemaining) < 1000)\r
suppressClocks = 0; // back on after two requests in rapid succession\r
+ else if(gameMode == EditGame || gameMode == BeginningOfGame) {\r
+ appData.clockMode = TRUE;\r
+ if(!pausing) StartClocks();\r
+ }\r
+ }\r
snprintf(buf1, sizeof(buf1)/sizeof(buf1[0]),"%s", TimeString(whiteTimeRemaining));\r
str1 = buf1;\r
SayString("White clock", FALSE);\r
SayString(str2, FALSE);\r
lastWhiteTime = whiteTimeRemaining;\r
lastBlackTime = blackTimeRemaining;\r
+ if(pausing) SayString("neither clock is running", FALSE);\r
SayString("", TRUE); // flush\r
}\r
\r
return (x%3000 == 0);\r
}\r
\r
+VOID\r
+TimeWarning()\r
+{\r
+ int ta, t = (whiteTimeRemaining < blackTimeRemaining ? whiteTimeRemaining: blackTimeRemaining);\r
+ char *p = appData.alarmTimes;\r
+ static int last_t;\r
+ t = (t + 1000)/2000;\r
+ if(t > last_t) last_t = 0;\r
+ while((ta = atoi(p))) {\r
+ if(t == ta/2 && t != last_t) {\r
+ last_t = t;\r
+ if(sounds[(int)SoundAlarm].name[0] == NULLCHAR) SayString("time warning", FALSE), SayClockTime(1);\r
+ else PlayAlarmSound();\r
+ }\r
+ p = strchr(p, ','); if(p == NULL) break;\r
+ p++;\r
+ }\r
+}\r
+\r
#define JAWS_ARGS \\r
{ "beepOffBoard", ArgInt, (LPVOID) beeps, TRUE, (ArgIniType) 1 },\\r
{ "beepEmpty", ArgInt, (LPVOID) (beeps+1), TRUE, (ArgIniType) 0 },\\r
{ "beepWhite", ArgInt, (LPVOID) (beeps+2), TRUE, (ArgIniType) 0 },\\r
{ "beepBlack", ArgInt, (LPVOID) (beeps+3), TRUE, (ArgIniType) 0 },\\r
{ "beepHoldings", ArgInt, (LPVOID) (beeps+4), TRUE, (ArgIniType) 0 },\\r
+ { "alarmTimes", ArgString, (LPVOID) &appData.alarmTimes, TRUE, (ArgIniType) "" },\\r
\r
#define JAWS_ALT_INTERCEPT \\r
if(suppressOneKey) {\\r
break;\\r
\\r
case IDM_SayClockTime: /*Say the clock time */\\r
- SayClockTime();\\r
+ SayClockTime(0);\\r
break;\\r
\\r
case IDM_SayWhosTurn: /* Say whos turn it its */\\r
\r
#define JAWS_DELETE(X)\r
\r
-#define JAWS_SILENCE if(suppressClocks) return;\r
+#define JAWS_SILENCE TimeWarning(); if(suppressClocks) return;\r
\r
#define JAWS_COPYRIGHT \\r
SetDlgItemText(hDlg, OPT_MESS, "Auditory/Keyboard Enhancements By: Ed Rodriguez (sort of)");\r